mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-30 06:55:33 +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 { downloadGlyphsMetadata, downloadSpriteMetadata } from '../libs/metadata'
|
||||||
import {latest, validate} from '@mapbox/mapbox-gl-style-spec'
|
import {latest, validate} from '@mapbox/mapbox-gl-style-spec'
|
||||||
import style from '../libs/style'
|
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 { undoMessages, redoMessages } from '../libs/diffmessage'
|
||||||
import { StyleStore } from '../libs/stylestore'
|
import { StyleStore } from '../libs/stylestore'
|
||||||
import { ApiStyleStore } from '../libs/apistore'
|
import { ApiStyleStore } from '../libs/apistore'
|
||||||
|
@ -148,8 +148,11 @@ export default class App extends React.Component {
|
||||||
|
|
||||||
const styleUrl = initialStyleUrl()
|
const styleUrl = initialStyleUrl()
|
||||||
if(styleUrl) {
|
if(styleUrl) {
|
||||||
this.styleStore = new StyleStore()
|
if(window.confirm("Load style from URL and discard current changes?")) {
|
||||||
loadStyleUrl(styleUrl, mapStyle => this.onStyleChanged(mapStyle))
|
this.styleStore = new StyleStore()
|
||||||
|
loadStyleUrl(styleUrl, mapStyle => this.onStyleChanged(mapStyle))
|
||||||
|
}
|
||||||
|
removeStyleQuerystring()
|
||||||
} else {
|
} else {
|
||||||
this.styleStore.init(err => {
|
this.styleStore.init(err => {
|
||||||
if(err) {
|
if(err) {
|
||||||
|
|
Loading…
Reference in a new issue