Change Maptiler URLs

This commit is contained in:
pathmapper committed 2019-04-03 09:51:43 +02:00
1 parent 76cb5a6b7c
commit cb3f93c67d
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -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)