mirror of
https://github.com/maputnik/editor.git
synced 2026-09-01 09:57:27 +00:00
Added style formatting into apistore
This commit is contained in:
@@ -114,6 +114,18 @@ function replaceAccessTokens(mapStyle, opts={}) {
|
||||
return changedStyle
|
||||
}
|
||||
|
||||
function stripAccessTokens(mapStyle) {
|
||||
const changedMetadata = {
|
||||
...mapStyle.metadata
|
||||
};
|
||||
delete changedMetadata['maputnik:mapbox_access_token'];
|
||||
delete changedMetadata['maputnik:openmaptiles_access_token'];
|
||||
return {
|
||||
...mapStyle,
|
||||
metadata: changedMetadata
|
||||
};
|
||||
}
|
||||
|
||||
export default {
|
||||
ensureStyleValidity,
|
||||
emptyStyle,
|
||||
@@ -121,4 +133,5 @@ export default {
|
||||
generateId,
|
||||
getAccessToken,
|
||||
replaceAccessTokens,
|
||||
stripAccessTokens,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user