mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-11-10 09:37:45 +01:00
Fixed broken token replacer function.
This commit is contained in:
parent
0384181ee1
commit
a7620f83a6
2 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue