From c0a9a6c681571a3fd912d04a4e9cbbbc470481d0 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 9 Jan 2015 23:53:56 +0100 Subject: [PATCH] Change map id generation. --- src/Netzmacht/Contao/Leaflet/Frontend/MapElement.php | 2 +- src/Netzmacht/Contao/Leaflet/Frontend/MapModule.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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'][] = '';