Replace static maps, fix z-index issue

This commit is contained in:
Björn Fromme
2018-09-11 17:00:41 +02:00
parent 86d39b4ac4
commit 7311c4beda
3 changed files with 21 additions and 13 deletions
@@ -35,8 +35,10 @@
}); });
this.map.setZoom(this.zoom); this.map.setZoom(this.zoom);
if (this.lat && this.lng) { if (this.lat && this.lng) {
const center = L.latLng(this.lat, this.lng); const position = L.latLng(this.lat, this.lng);
this.map.setView(center); const marker = L.marker(position);
marker.addTo(this.map);
this.map.setView(position);
} else if (this.markers) { } else if (this.markers) {
const bounds = L.latLngBounds(); const bounds = L.latLngBounds();
for (let item of this.markers) { for (let item of this.markers) {
@@ -63,3 +65,9 @@
} }
} }
</script> </script>
<style>
.leaflet-top, .leaflet-bottom {
z-index: 490 !important;
}
</style>
@@ -11,6 +11,7 @@
import Calendar from './Calendar.vue' import Calendar from './Calendar.vue'
import FacebookPixel from './FacebookPixel.vue' import FacebookPixel from './FacebookPixel.vue'
import WatchlistToggle from './WatchlistToggle.vue' import WatchlistToggle from './WatchlistToggle.vue'
import Gmap from './Gmap.vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import 'dayjs/locale/de' import 'dayjs/locale/de'
@@ -24,7 +25,8 @@
AjaxContent, AjaxContent,
Calendar, Calendar,
FacebookPixel, FacebookPixel,
WatchlistToggle WatchlistToggle,
Gmap
}, },
data () { data () {
return { return {
@@ -89,16 +89,14 @@
src="{ep:uri.video(value: product.video)}"></iframe> src="{ep:uri.video(value: product.video)}"></iframe>
</div> </div>
</f:if> </f:if>
<f:comment>
<div class="ep-sidebar ep-snow"> <div class="ep-sidebar ep-snow">
<p><strong>Lage</strong></p> <p><strong>Lage</strong></p>
<div> <div>
<a href="{ep:gmapsUrl(hotel: hotel)}" target="_blank" title="{hotel.name}"> <a href="{ep:gmapsUrl(hotel: hotel)}" target="_blank" title="{hotel.name}">
{ep:gmapsStaticMap(hotel: hotel, width: 330, height: 200)} <gmap lat="{hotel.latitude}" lng="{hotel.longitude}" :zoom="12"></gmap>
</a> </a>
</div> </div>
</div> </div>
</f:comment>
<f:render partial="Region/Webcam" arguments="{region: region}"/> <f:render partial="Region/Webcam" arguments="{region: region}"/>
<f:render partial="RegionMaps" arguments="{region: product.region}"/> <f:render partial="RegionMaps" arguments="{region: product.region}"/>
<f:render partial="RegionAward" arguments="{region: product.region}"/> <f:render partial="RegionAward" arguments="{region: product.region}"/>
@@ -195,7 +193,7 @@
<p><strong>Lage</strong></p> <p><strong>Lage</strong></p>
<div> <div>
<a href="{ep:gmapsUrl(hotel: hotel)}" target="_blank" title="{hotel.name}"> <a href="{ep:gmapsUrl(hotel: hotel)}" target="_blank" title="{hotel.name}">
{ep:gmapsStaticMap(hotel: hotel, width: 330, height: 200)} <gmap lat="{hotel.latitude}" lng="{hotel.longitude}" :zoom="12"></gmap>
</a> </a>
</div> </div>
</div> </div>