diff --git a/src/components/Map.vue b/src/components/Map.vue index 4cafb57..744a5e0 100644 --- a/src/components/Map.vue +++ b/src/components/Map.vue @@ -189,7 +189,13 @@ export default defineComponent({ location = store.state.parsedUrl.location; if(!oldValue) { - this.scheduledZoom = store.state.parsedUrl?.zoom || newValue.defaultZoom || store.state.configuration.defaultZoom; + if(typeof store.state.parsedUrl?.zoom !== 'undefined') { + this.scheduledZoom = store.state.parsedUrl?.zoom; + } else if(typeof newValue.defaultZoom !== 'undefined') { + this.scheduledZoom = newValue.defaultZoom; + } else { + this.scheduledZoom = store.state.configuration.defaultZoom; + } } store.commit(MutationTypes.CLEAR_PARSED_URL, undefined); @@ -198,7 +204,13 @@ export default defineComponent({ location = newValue.center; } - this.scheduledZoom = this.scheduledZoom || newValue.defaultZoom || store.state.configuration.defaultZoom; + if(typeof this.scheduledZoom === 'undefined') { + if(typeof newValue.defaultZoom !== 'undefined') { + this.scheduledZoom = newValue.defaultZoom; + } else { + this.scheduledZoom = store.state.configuration.defaultZoom; + } + } //Set pan location for when the projection changes this.scheduledPan = location;