mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-01 04:24:02 +01:00
Fixes for supporting latest javascript builder.
This commit is contained in:
@@ -15,7 +15,7 @@ use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
|||||||
use Netzmacht\Contao\Leaflet\Mapper\GeoJsonMapper;
|
use Netzmacht\Contao\Leaflet\Mapper\GeoJsonMapper;
|
||||||
use Netzmacht\Contao\Leaflet\Model\MarkerModel;
|
use Netzmacht\Contao\Leaflet\Model\MarkerModel;
|
||||||
use Netzmacht\Contao\Leaflet\Frontend\RequestUrl;
|
use Netzmacht\Contao\Leaflet\Frontend\RequestUrl;
|
||||||
use Netzmacht\Javascript\Type\Value\Expression;
|
use Netzmacht\JavascriptBuilder\Type\Expression;
|
||||||
use Netzmacht\LeafletPHP\Definition;
|
use Netzmacht\LeafletPHP\Definition;
|
||||||
use Netzmacht\LeafletPHP\Definition\GeoJson\FeatureCollection;
|
use Netzmacht\LeafletPHP\Definition\GeoJson\FeatureCollection;
|
||||||
use Netzmacht\LeafletPHP\Definition\Group\GeoJson;
|
use Netzmacht\LeafletPHP\Definition\Group\GeoJson;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
|||||||
use Netzmacht\Contao\Leaflet\Mapper\GeoJsonMapper;
|
use Netzmacht\Contao\Leaflet\Mapper\GeoJsonMapper;
|
||||||
use Netzmacht\Contao\Leaflet\Model\VectorModel;
|
use Netzmacht\Contao\Leaflet\Model\VectorModel;
|
||||||
use Netzmacht\Contao\Leaflet\Frontend\RequestUrl;
|
use Netzmacht\Contao\Leaflet\Frontend\RequestUrl;
|
||||||
use Netzmacht\Javascript\Type\Value\Expression;
|
use Netzmacht\JavascriptBuilder\Type\Expression;
|
||||||
use Netzmacht\LeafletPHP\Definition;
|
use Netzmacht\LeafletPHP\Definition;
|
||||||
use Netzmacht\LeafletPHP\Definition\GeoJson\ConvertsToGeoJsonFeature;
|
use Netzmacht\LeafletPHP\Definition\GeoJson\ConvertsToGeoJsonFeature;
|
||||||
use Netzmacht\LeafletPHP\Definition\GeoJson\FeatureCollection;
|
use Netzmacht\LeafletPHP\Definition\GeoJson\FeatureCollection;
|
||||||
|
|||||||
@@ -12,10 +12,10 @@
|
|||||||
namespace Netzmacht\Contao\Leaflet\Subscriber;
|
namespace Netzmacht\Contao\Leaflet\Subscriber;
|
||||||
|
|
||||||
use Netzmacht\Contao\Leaflet\Frontend\RequestUrl;
|
use Netzmacht\Contao\Leaflet\Frontend\RequestUrl;
|
||||||
use Netzmacht\Javascript\Encoder;
|
use Netzmacht\JavascriptBuilder\Encoder;
|
||||||
use Netzmacht\Javascript\Event\EncodeValueEvent;
|
use Netzmacht\JavascriptBuilder\Symfony\Event\EncodeValueEvent;
|
||||||
use Netzmacht\Javascript\Event\GetReferenceEvent;
|
use Netzmacht\JavascriptBuilder\Symfony\Event\EncodeReferenceEvent;
|
||||||
use Netzmacht\Javascript\Exception\EncodeValueFailed;
|
use Netzmacht\JavascriptBuilder\Exception\EncodeValueFailed;
|
||||||
use Netzmacht\LeafletPHP\Definition\Group\GeoJson;
|
use Netzmacht\LeafletPHP\Definition\Group\GeoJson;
|
||||||
use Netzmacht\LeafletPHP\Definition\Type\Icon;
|
use Netzmacht\LeafletPHP\Definition\Type\Icon;
|
||||||
use Netzmacht\LeafletPHP\Plugins\Omnivore\OmnivoreLayer;
|
use Netzmacht\LeafletPHP\Plugins\Omnivore\OmnivoreLayer;
|
||||||
@@ -38,18 +38,18 @@ class EncoderSubscriber implements EventSubscriberInterface
|
|||||||
array('encodeIcons', 1000),
|
array('encodeIcons', 1000),
|
||||||
array('loadLayer', 100),
|
array('loadLayer', 100),
|
||||||
),
|
),
|
||||||
GetReferenceEvent::NAME => array('referenceIcon', 100),
|
EncodeReferenceEvent::NAME => array('referenceIcon', 100),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create icon reference to the contao leaflet icon registry.
|
* Create icon reference to the contao leaflet icon registry.
|
||||||
*
|
*
|
||||||
* @param GetReferenceEvent $event The subscribed event.
|
* @param EncodeReferenceEvent $event The subscribed event.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function referenceIcon(GetReferenceEvent $event)
|
public function referenceIcon(EncodeReferenceEvent $event)
|
||||||
{
|
{
|
||||||
$value = $event->getObject();
|
$value = $event->getObject();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user