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