mirror of
https://github.com/maputnik/editor.git
synced 2026-07-25 15:27:27 +00:00
Fixed broken token replacer function.
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"mapbox": "pk.eyJ1IjoibW9yZ2Vua2FmZmVlIiwiYSI6ImNpeHJmNXNmZTAwNHIycXBid2NqdTJibjMifQ.Dv1-GDpTWi0NP6xW9Fct1w",
|
"mapbox": "pk.eyJ1IjoibW9yZ2Vua2FmZmVlIiwiYSI6ImNpeHJmNXNmZTAwNHIycXBid2NqdTJibjMifQ.Dv1-GDpTWi0NP6xW9Fct1w",
|
||||||
"openmaptiles": "Og58UhhtiiTaLVlPtPgs",
|
"openmaptiles": "Og58UhhtiiTaLVlPtPgs",
|
||||||
"thunderforest_transport": "b71f7f0ba4064f5eb9e903859a9cf5c6",
|
"thunderforest": "b71f7f0ba4064f5eb9e903859a9cf5c6"
|
||||||
"thunderforest_outdoors": "b71f7f0ba4064f5eb9e903859a9cf5c6"
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -99,7 +99,7 @@ function replaceSourceAccessToken(mapStyle, key, opts={}) {
|
|||||||
function replaceAccessTokens(mapStyle, opts={}) {
|
function replaceAccessTokens(mapStyle, opts={}) {
|
||||||
let changedStyle = mapStyle;
|
let changedStyle = mapStyle;
|
||||||
|
|
||||||
Object.keys(tokens).forEach((tokenKey) => {
|
Object.keys(mapStyle.sources).forEach((tokenKey) => {
|
||||||
changedStyle = replaceSourceAccessToken(changedStyle, tokenKey, opts);
|
changedStyle = replaceSourceAccessToken(changedStyle, tokenKey, opts);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user