mirror of
https://github.com/maputnik/editor.git
synced 2026-01-06 13:30:03 +00:00
Compare commits
3 Commits
v1.5.0-bet
...
v1.5.0-bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1ddf4e57e | ||
|
|
64e65dc7d3 | ||
|
|
1e07a88aed |
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "maputnik",
|
||||
"version": "1.5.0-beta2",
|
||||
"version": "1.5.0-beta3",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "maputnik",
|
||||
"version": "1.5.0-beta2",
|
||||
"version": "1.5.0-beta3",
|
||||
"description": "A MapboxGL visual style editor",
|
||||
"main": "''",
|
||||
"scripts": {
|
||||
|
||||
@@ -92,9 +92,6 @@ function replaceSourceAccessToken(mapStyle, sourceName, opts={}) {
|
||||
...mapStyle,
|
||||
sources: changedSources
|
||||
}
|
||||
if (mapStyle.glyphs) {
|
||||
changedStyle.glyphs = changedStyle.glyphs.replace('{key}', accessToken)
|
||||
}
|
||||
return changedStyle
|
||||
}
|
||||
|
||||
@@ -105,6 +102,13 @@ function replaceAccessTokens(mapStyle, opts={}) {
|
||||
changedStyle = replaceSourceAccessToken(changedStyle, sourceName, opts);
|
||||
})
|
||||
|
||||
if (mapStyle.glyphs && mapStyle.glyphs.match(/\.tilehosting\.com/)) {
|
||||
changedStyle = {
|
||||
...changedStyle,
|
||||
glyphs: mapStyle.glyphs.replace('{key}', getAccessToken("openmaptiles", mapStyle, opts))
|
||||
}
|
||||
}
|
||||
|
||||
return changedStyle
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user