mirror of
https://github.com/maputnik/editor.git
synced 2025-12-26 08:00:01 +00:00
Change Maptiler URLs
This commit is contained in:
@@ -50,9 +50,9 @@ function normalizeSourceURL (url, apiToken="") {
|
||||
}
|
||||
|
||||
function setFetchAccessToken(url, mapStyle) {
|
||||
const matchesTilehosting = url.match(/\.tilehosting\.com/);
|
||||
const matchesMaptiler = url.match(/\.maptiler\.com/);
|
||||
const matchesThunderforest = url.match(/\.thunderforest\.com/);
|
||||
if (matchesTilehosting) {
|
||||
if (matchesMaptiler) {
|
||||
const accessToken = style.getAccessToken("openmaptiles", mapStyle, {allowFallback: true})
|
||||
if (accessToken) {
|
||||
return url.replace('{key}', accessToken)
|
||||
|
||||
Reference in New Issue
Block a user