mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-30 00:44:39 +01:00
Use replaceAccessToken onStyleChanged
This commit is contained in:
parent
da17646b8d
commit
24aa2fd5fa
1 changed files with 6 additions and 1 deletions
|
@ -258,6 +258,11 @@ export default class App extends React.Component {
|
|||
|
||||
this.revisionStore.addRevision(newStyle)
|
||||
if(save) this.saveStyle(newStyle)
|
||||
this.setState({
|
||||
mapStyle: style.replaceAccessTokens(newStyle, {allowFallback: true}),
|
||||
errors: [],
|
||||
})
|
||||
this.fetchSources()
|
||||
this.setState({
|
||||
mapStyle: newStyle,
|
||||
errors: [],
|
||||
|
@ -266,9 +271,9 @@ export default class App extends React.Component {
|
|||
this.setState({
|
||||
errors: errors.map(err => err.message)
|
||||
})
|
||||
this.fetchSources()
|
||||
}
|
||||
|
||||
this.fetchSources();
|
||||
}
|
||||
|
||||
onUndo = () => {
|
||||
|
|
Loading…
Reference in a new issue