Fix activator map (thanks DM3FAM for the report)

pull/12/head^2
Manuel Kasper 2022-08-11 21:44:03 +02:00
rodzic 6495b4c641
commit 8e02be05b2
1 zmienionych plików z 8 dodań i 1 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
<template>
<MglMap v-if="(mapCenter || bounds) && mapStyle" :key="summit.code" :mapStyle="mapStyle" :bounds="bounds" :fitBoundsOptions="fitBoundsOptions" :center="mapCenter" :zoom="12.5" :attributionControl="false" @load="onMapLoaded" @click="onMapClicked" @contextmenu="onMapRightClicked" @idle="onMapIdle">
<MglMap v-if="(mapCenter || bounds) && mapStyle" :key="mapKey" :mapStyle="mapStyle" :bounds="bounds" :fitBoundsOptions="fitBoundsOptions" :center="mapCenter" :zoom="12.5" :attributionControl="false" @load="onMapLoaded" @click="onMapClicked" @contextmenu="onMapRightClicked" @idle="onMapIdle">
<MglGeolocateControl v-if="!$mq.mobile || isEnlarged" :positionOptions="{ enableHighAccuracy: true }" :fitBoundsOptions="{ maxZoom: 12.5 }" :trackUserLocation="true" position="top-right" />
<MglNavigationControl v-if="!$mq.mobile" position="top-right" :showCompass="false" />
<MglScaleControl v-if="!$mq.mobile || isEnlarged" position="bottom-left" />
@ -101,6 +101,13 @@ export default {
mapOptions.regions = false
mapOptions.inactive = this.showInactiveSummits
return mapOptions
},
mapKey () {
if (this.summit) {
return this.summit.code
} else {
return undefined
}
}
},
methods: {