mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-27 14:48:00 +01:00
Warning when style parameter is used
This commit is contained in:
parent
b0adb8cd3d
commit
9cac5305cd
1 changed files with 6 additions and 3 deletions
|
@ -23,7 +23,7 @@ import SurveyModal from './modals/SurveyModal'
|
|||
import { downloadGlyphsMetadata, downloadSpriteMetadata } from '../libs/metadata'
|
||||
import {latest, validate} from '@mapbox/mapbox-gl-style-spec'
|
||||
import style from '../libs/style'
|
||||
import { initialStyleUrl, loadStyleUrl } from '../libs/urlopen'
|
||||
import { initialStyleUrl, loadStyleUrl, removeStyleQuerystring } from '../libs/urlopen'
|
||||
import { undoMessages, redoMessages } from '../libs/diffmessage'
|
||||
import { StyleStore } from '../libs/stylestore'
|
||||
import { ApiStyleStore } from '../libs/apistore'
|
||||
|
@ -148,8 +148,11 @@ export default class App extends React.Component {
|
|||
|
||||
const styleUrl = initialStyleUrl()
|
||||
if(styleUrl) {
|
||||
this.styleStore = new StyleStore()
|
||||
loadStyleUrl(styleUrl, mapStyle => this.onStyleChanged(mapStyle))
|
||||
if(window.confirm("Load style from URL and discard current changes?")) {
|
||||
this.styleStore = new StyleStore()
|
||||
loadStyleUrl(styleUrl, mapStyle => this.onStyleChanged(mapStyle))
|
||||
}
|
||||
removeStyleQuerystring()
|
||||
} else {
|
||||
this.styleStore.init(err => {
|
||||
if(err) {
|
||||
|
|
Loading…
Reference in a new issue