mirror of
https://github.com/maputnik/editor.git
synced 2025-12-28 17:10:01 +00:00
Warning when style parameter is used
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user