diff --git a/src/Netzmacht/Contao/Leaflet/Frontend/MapElement.php b/src/Netzmacht/Contao/Leaflet/Frontend/MapElement.php index 5e6717a..d05b520 100644 --- a/src/Netzmacht/Contao/Leaflet/Frontend/MapElement.php +++ b/src/Netzmacht/Contao/Leaflet/Frontend/MapElement.php @@ -78,7 +78,7 @@ class MapElement extends \ContentElement protected function compile() { try { - $mapId = 'ce_map_' . ($this->cssID[0] ?: $this->id); + $mapId = 'map_' . ($this->cssID[0] ?: ('ce_' . $this->id)); $map = $this->mapService->getJavascript($this->leaflet_map, null, $mapId); $GLOBALS['TL_BODY'][] = ''; diff --git a/src/Netzmacht/Contao/Leaflet/Frontend/MapModule.php b/src/Netzmacht/Contao/Leaflet/Frontend/MapModule.php index 413e42e..37b136d 100644 --- a/src/Netzmacht/Contao/Leaflet/Frontend/MapModule.php +++ b/src/Netzmacht/Contao/Leaflet/Frontend/MapModule.php @@ -74,7 +74,7 @@ class MapModule extends \Module protected function compile() { try { - $mapId = 'mod_map_' . ($this->cssID[0] ?: $this->id); + $mapId = 'map_' . ($this->cssID[0] ?: ('mod_' . $this->id)); $map = $this->mapService->getJavascript($this->leaflet_map, null, $mapId); $GLOBALS['TL_BODY'][] = '';