forked from Snck3rs/contao-leaflet-maps
Remove dependency of url builder.
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
"contao/core":">=3.2,<3.5-dev",
|
||||
"contao-community-alliance/dependency-container":"~1.0",
|
||||
"contao-community-alliance/event-dispatcher":"~1.0",
|
||||
"contao-community-alliance/url-builder":"~1.1",
|
||||
"netzmacht/contao-leaflet-libraries": "~0.7",
|
||||
"netzmacht/php-javascript-builder": "~1.0",
|
||||
"netzmacht/php-leaflet": "~0.7",
|
||||
|
||||
@@ -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