mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-01 20:43:52 +01:00
Remove dependency of url builder.
This commit is contained in:
@@ -66,7 +66,6 @@ trait HybridTrait
|
||||
*/
|
||||
public function generate()
|
||||
{
|
||||
RequestUrl::setFor($this->getIdentifier());
|
||||
$this->handleAjaxRequest();
|
||||
|
||||
if (TL_MODE === 'BE') {
|
||||
@@ -102,8 +101,10 @@ trait HybridTrait
|
||||
protected function compile()
|
||||
{
|
||||
try {
|
||||
RequestUrl::setFor($this->getIdentifier());
|
||||
$mapId = 'map_' . ($this->cssID[0] ?: ('ce_' . $this->id));
|
||||
$map = $this->mapService->getJavascript($this->leaflet_map, null, $mapId);
|
||||
RequestUrl::setFor(null);
|
||||
|
||||
$GLOBALS['TL_BODY'][] = '<script>' . $map .'</script>';
|
||||
|
||||
|
||||
@@ -47,8 +47,8 @@ class RequestUrl
|
||||
'format' => $format != 'geojson' ? $format: null
|
||||
);
|
||||
|
||||
$param = base64_encode(implode(',', $params));
|
||||
$param = rawurlencode(base64_encode(implode(',', $params)) . '==');
|
||||
|
||||
return \Config::get('websitePath') . '/' . \Frontend::addToUrl('leaflet=' . $param);
|
||||
return \Config::get('websitePath') . '/' . \Frontend::addToUrl('leaflet=' . $param, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user