Add backwards compability for tilehosting URLs

This commit is contained in:
pathmapper
2019-04-06 12:00:48 +02:00
parent cb3f93c67d
commit fb7b30c81d
2 changed files with 3 additions and 2 deletions

View File

@@ -101,7 +101,7 @@ function replaceAccessTokens(mapStyle, opts={}) {
changedStyle = replaceSourceAccessToken(changedStyle, sourceName, opts);
})
if (mapStyle.glyphs && mapStyle.glyphs.match(/\.maptiler\.com/)) {
if (mapStyle.glyphs && (mapStyle.glyphs.match(/\.tilehosting\.com/) || mapStyle.glyphs.match(/\.maptiler\.com/))) {
const newAccessToken = getAccessToken("openmaptiles", mapStyle, opts);
if (newAccessToken) {
changedStyle = {