diff --git a/components/EventMapDialog.vue b/components/EventMapDialog.vue
new file mode 100644
index 00000000..378f2719
--- /dev/null
+++ b/components/EventMapDialog.vue
@@ -0,0 +1,65 @@
+
+v-card
+ v-container
+ div(:style="{'height': mapHeight}")
+ Map.mt-4(:place='event.place' :height='mapHeight' )
+
+ v-row.my-4.d-flex.flex-column.align-center.text-center
+ .text-h6
+ v-icon(v-text='mdiMapMarker' )
+ nuxt-link.ml-2.text-decoration-none(v-text="event.place.name" :to='`/place/${event.place.name}`')
+ .mx-2(v-text="`${event.place.address}`")
+ v-card-actions
+ v-row(color='primary')
+ //- p.my-4(v-text="$t('common.getting_there')")
+ v-btn.ml-2(icon large :href="routeBy('foot')")
+ v-icon(v-text='mdiWalk')
+ v-btn.ml-2(icon large :href="routeBy('bike')")
+ v-icon(v-text='mdiBike')
+ v-btn.ml-2(icon large :href="routeBy('car')")
+ v-icon(v-text='mdiCar')
+ v-spacer
+ v-btn(@click='$emit("close")' outlined) Close
+
+
diff --git a/components/Map.vue b/components/Map.vue
index a62b2beb..be67663a 100644
--- a/components/Map.vue
+++ b/components/Map.vue
@@ -1,43 +1,26 @@
client-only(placeholder='Loading...' )
- v-card
- v-container
- LMap(ref="map"
- id="leaflet-map-dialog"
- :zoom="zoom"
- :options="{attributionControl: false}"
- :center="center")
- LControlAttribution(position='bottomright' prefix="")
- LTileLayer(
- :url="url"
- :attribution="attribution")
- LMarker(
- :lat-lng="marker.coordinates")
+ LMap(ref="leafletMap"
+ id="leaflet-map"
+ :style="{ 'height': height }"
+ :zoom="zoom"
+ :options="{attributionControl: false}"
+ :center="center")
+ LControlAttribution(position='bottomright' prefix="")
+ LTileLayer(
+ @tileload="$emit('tileload')"
+ @tileerror="$emit('tileerror')"
+ :url="url"
+ :attribution="attribution")
+ LMarker(v-if="showMarker"
+ :lat-lng="marker.coordinates")
- v-row.my-4.d-flex.flex-column.align-center.text-center
- .text-h6
- v-icon(v-text='mdiMapMarker' )
- nuxt-link.ml-2.text-decoration-none(v-text="event.place.name" :to='`/place/${event.place.name}`')
- .mx-2(v-text="`${event.place.address}`")
- v-card-actions
- v-row
- //- p.my-4(v-text="$t('common.getting_there')")
- v-btn.ml-2(icon large :href="routeBy('foot')")
- v-icon(v-text='mdiWalk')
- v-btn.ml-2(icon large :href="routeBy('bike')")
- v-icon(v-text='mdiBike')
- v-btn.ml-2(icon large :href="routeBy('car')")
- v-icon(v-text='mdiCar')
- v-spacer
- v-btn(@click='$emit("close")' outlined) Close
diff --git a/components/WhereInputAdvanced.vue b/components/WhereInputAdvanced.vue
index bcaf5bdd..d81faa11 100644
--- a/components/WhereInputAdvanced.vue
+++ b/components/WhereInputAdvanced.vue
@@ -38,7 +38,7 @@ v-card
:rules="$validators.longitude")
p.mt-4(v-if='place.isNew' v-html="$t('event.address_geocoded_disclaimer')")
- MapEdit.mt-4(:place='place' v-if="(settings.allow_geolocation && place.name !== 'online' && place.latitude && place.longitude)" )
+ Map.mt-4(:place='place' v-if="(settings.allow_geolocation && place.name !== 'online' && place.latitude && place.longitude)" )
v-divider(v-if='settings.allow_online_event && showGeocoded')
@@ -76,7 +76,7 @@ export default {
onlineLocations: { type: Array, default: [] }
},
components: {
- [process.client && 'MapEdit']: () => import('@/components/MapEdit.vue')
+ [process.client && 'Map']: () => import('@/components/Map.vue')
},
data ({$store}) {
return {
diff --git a/components/admin/Geolocation.vue b/components/admin/Geolocation.vue
index f1b23061..0c64a559 100644
--- a/components/admin/Geolocation.vue
+++ b/components/admin/Geolocation.vue
@@ -49,8 +49,13 @@ v-card
:label="$t('admin.tilelayer_provider_attribution')"
:placeholder="tilelayer_provider_attribution_default")
- div(id="leaflet-map-preview" max-height='10px')
- //- Map
+ Map(:key='mapKey' v-if='mapPreview'
+ @tileerror='tilelayerTestError'
+ @tileload='tilelayerTestSuccess'
+ height="20rem"
+ showMarker=false
+ :mapCenter='mapCenter'
+ :zoom='12')
v-card-actions
v-spacer
@@ -61,19 +66,19 @@ v-card
-
diff --git a/components/admin/Places.vue b/components/admin/Places.vue
index e1d7c11c..ee80662f 100644
--- a/components/admin/Places.vue
+++ b/components/admin/Places.vue
@@ -62,7 +62,7 @@ v-container
:label="$t('common.longitude')"
:rules="$validators.longitude")
- MapEdit.mt-4(:place.sync='place' :key="dialog" v-if="settings.allow_geolocation && place.name !== 'online' && place.latitude && place.longitude")
+ Map.mt-4(:place.sync='place' :key="dialog" v-if="settings.allow_geolocation && place.name !== 'online' && place.latitude && place.longitude")
v-card-actions
v-spacer
@@ -96,7 +96,7 @@ import geolocation from '../../server/helpers/geolocation/index'
export default {
components: {
- [process.client && 'MapEdit']: () => import('@/components/MapEdit.vue')
+ [process.client && 'Map']: () => import('@/components/Map.vue')
},
data( {$store} ) {
return {
diff --git a/pages/event/_slug.vue b/pages/event/_slug.vue
index b719419b..3991c8ec 100644
--- a/pages/event/_slug.vue
+++ b/pages/event/_slug.vue
@@ -177,7 +177,7 @@ v-container#event.pa-2.pa-sm-2(itemscope itemtype="https://schema.org/Event" v-t
EmbedEvent(:event='event' @close='showEmbed=false')
v-dialog(v-show='settings.allow_geolocation && event.place.latitude && event.place.longitude' v-model='mapModal' :fullscreen='$vuetify.breakpoint.xsOnly' destroy-on-close)
- Map(:event='event' @close='mapModal=false')
+ EventMapDialog(:event='event' @close='mapModal=false')