forked from Snck3rs/contao-leaflet-maps
Change map id generation.
This commit is contained in:
@@ -78,7 +78,7 @@ class MapElement extends \ContentElement
|
|||||||
protected function compile()
|
protected function compile()
|
||||||
{
|
{
|
||||||
try {
|
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);
|
$map = $this->mapService->getJavascript($this->leaflet_map, null, $mapId);
|
||||||
|
|
||||||
$GLOBALS['TL_BODY'][] = '<script>' . $map .'</script>';
|
$GLOBALS['TL_BODY'][] = '<script>' . $map .'</script>';
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ class MapModule extends \Module
|
|||||||
protected function compile()
|
protected function compile()
|
||||||
{
|
{
|
||||||
try {
|
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);
|
$map = $this->mapService->getJavascript($this->leaflet_map, null, $mapId);
|
||||||
|
|
||||||
$GLOBALS['TL_BODY'][] = '<script>' . $map .'</script>';
|
$GLOBALS['TL_BODY'][] = '<script>' . $map .'</script>';
|
||||||
|
|||||||
Reference in New Issue
Block a user