diff --git a/src/components/App.jsx b/src/components/App.jsx index 88cc50c5..9dd3a5a7 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -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) diff --git a/src/config/tilesets.json b/src/config/tilesets.json index 3973b585..a586c103 100644 --- a/src/config/tilesets.json +++ b/src/config/tilesets.json @@ -1,7 +1,7 @@ { "openmaptiles": { "type": "vector", - "url": "https://maps.tilehosting.com/data/v3.json?key={key}", + "url": "https://api.maptiler.com/tiles/v3/tiles.json?key={key}", "title": "OpenMapTiles" }, "thunderforest_transport": { diff --git a/src/libs/style.js b/src/libs/style.js index ee2041b4..8f90dd6b 100644 --- a/src/libs/style.js +++ b/src/libs/style.js @@ -101,7 +101,7 @@ function replaceAccessTokens(mapStyle, opts={}) { changedStyle = replaceSourceAccessToken(changedStyle, sourceName, opts); }) - if (mapStyle.glyphs && mapStyle.glyphs.match(/\.tilehosting\.com/)) { + if (mapStyle.glyphs && mapStyle.glyphs.match(/\.maptiler\.com/)) { const newAccessToken = getAccessToken("openmaptiles", mapStyle, opts); if (newAccessToken) { changedStyle = {