mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-29 11:33:46 +01:00
Small fixed.
This commit is contained in:
3
.check-author.yml
Normal file
3
.check-author.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
exclude:
|
||||||
|
languages
|
||||||
@@ -39,7 +39,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_variant'][1] = 'Tile vari
|
|||||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'][0] = 'Activate layer';
|
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'][0] = 'Activate layer';
|
||||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'][1] = 'Activate layer on the map.';
|
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'][1] = 'Activate layer on the map.';
|
||||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference'][0] = 'Reference';
|
$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference'][0] = 'Reference';
|
||||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference'][1] = 'Choose the reference layer.';
|
$GLOBALS['TL_LANG']['tl_leaflet_layer']['reference'][1] = 'Choose the reference layer. Otherwise the same javscript object is used.';
|
||||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['standalone'][0] = 'Standalone';
|
$GLOBALS['TL_LANG']['tl_leaflet_layer']['standalone'][0] = 'Standalone';
|
||||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['standalone'][1] = 'Integrate reference as a copy of the referenced layer.';
|
$GLOBALS['TL_LANG']['tl_leaflet_layer']['standalone'][1] = 'Integrate reference as a copy of the referenced layer.';
|
||||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['markerCluster'][0] = 'Marker cluster';
|
$GLOBALS['TL_LANG']['tl_leaflet_layer']['markerCluster'][0] = 'Marker cluster';
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class VectorsLayerMapper extends AbstractLayerMapper implements GeoJsonMapper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($definition instanceof GeoJson) {
|
if ($definition instanceof GeoJson || $definition instanceof GeoJsonAjax) {
|
||||||
if ($model->pointToLayer) {
|
if ($model->pointToLayer) {
|
||||||
$definition->setPointToLayer(new Expression($model->pointToLayer));
|
$definition->setPointToLayer(new Expression($model->pointToLayer));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,9 @@
|
|||||||
namespace Netzmacht\Contao\Leaflet\Subscriber;
|
namespace Netzmacht\Contao\Leaflet\Subscriber;
|
||||||
|
|
||||||
use Netzmacht\Javascript\Event\BuildEvent;
|
use Netzmacht\Javascript\Event\BuildEvent;
|
||||||
|
use Netzmacht\Javascript\Event\EncodeValueEvent;
|
||||||
use Netzmacht\LeafletPHP\Definition\Map;
|
use Netzmacht\LeafletPHP\Definition\Map;
|
||||||
|
use Netzmacht\LeafletPHP\Definition\Type\Icon;
|
||||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -29,9 +31,12 @@ class EncoderSubscriber implements EventSubscriberInterface
|
|||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
BuildEvent::NAME => array(
|
BuildEvent::NAME => array(
|
||||||
array('startWrapper', 1000),
|
array('startWrapper', 100),
|
||||||
array('endWrapper', -1000)
|
array('endWrapper', -100),
|
||||||
)
|
),
|
||||||
|
EncodeValueEvent::NAME => array(
|
||||||
|
array('encodeIcons', 100)
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,4 +76,14 @@ class EncoderSubscriber implements EventSubscriberInterface
|
|||||||
$event->getOutput()->addLine($line);
|
$event->getOutput()->addLine($line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function encodeIcons(EncodeValueEvent $event)
|
||||||
|
{
|
||||||
|
$value = $event->getValue();
|
||||||
|
|
||||||
|
if ($value instanceof Icon) {
|
||||||
|
$event->addLine('ContaoLeaflet.getIcon(\'' . $value->getId() . '\')');
|
||||||
|
$event->stopPropagation();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user