diff --git a/web/typo3conf/ext/ep_theme/Configuration/TypoScript/ContentElements/gmap.ts b/web/typo3conf/ext/ep_theme/Configuration/TypoScript/ContentElements/gmap.ts index b991d541..98af47b8 100644 --- a/web/typo3conf/ext/ep_theme/Configuration/TypoScript/ContentElements/gmap.ts +++ b/web/typo3conf/ext/ep_theme/Configuration/TypoScript/ContentElements/gmap.ts @@ -2,7 +2,26 @@ tt_content.gmap =< tt_content.teaser_product tt_content.gmap { templateName = Gmap dataProcessing { - 10 = EP\EpTheme\DataProcessing\TeaserProcessor + 10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor + 10 { + table = tx_epproducts_domain_model_hotel + where.data = field:tx_eptheme_context_hotel + where.wrap = uid=| + pidInList = {$plugin.tx_epproducts.settings.hotelsStoragePid} + as = hotel + + dataProcessing { + 10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor + 10 { + table = tx_epproducts_domain_model_region + where.data = field:region + where.wrap = uid=| + pidInList = {$plugin.tx_epproducts.settings.destinationsStoragePid} + recursive = 2 + as = region + } + } + } } settings.googleMapsApiKey = {$plugin.tx_eptheme.settings.googleMapsApiKey} } diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/Gmap.vue b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/Gmap.vue index e54c7762..5f1557bc 100644 --- a/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/Gmap.vue +++ b/web/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/Gmap.vue @@ -35,7 +35,7 @@ }]; } this.map = new googleMaps.Map(this.$refs.container, this.mapOptions); - if (this.markers.length) { + if (this.markers != null) { const bounds = new googleMaps.LatLngBounds(); const infoWindow = new googleMaps.InfoWindow({maxWidth: 200}); for (let item of this.markers) { diff --git a/web/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/Gmap.html b/web/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/Gmap.html index 46f8e416..0a68a842 100644 --- a/web/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/Gmap.html +++ b/web/typo3conf/ext/ep_theme/Resources/Private/Templates/FluidStyledContent/Gmap.html @@ -1,7 +1,6 @@ @@ -9,8 +8,8 @@