mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2026-10-14 14:46:12 +02:00
Fix double rendering of map data.
This commit is contained in:
1 parent
52186055d9
commit
6d0c533922
2 files changed
+2
-7
No files matched your search
@@ -19,7 +19,6 @@ use Netzmacht\Javascript\Type\Value\Expression;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Definition\GeoJson\FeatureCollection;
|
||||
use Netzmacht\LeafletPHP\Definition\Group\GeoJson;
|
||||
use Netzmacht\LeafletPHP\Definition\Group\LayerGroup;
|
||||
use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds;
|
||||
use Netzmacht\LeafletPHP\Definition\UI\Marker;
|
||||
|
||||
@@ -93,7 +92,7 @@ class MarkersLayerMapper extends AbstractLayerMapper implements GeoJsonMapper
|
||||
DefinitionMapper $mapper,
|
||||
LatLngBounds $bounds = null
|
||||
) {
|
||||
if ($definition instanceof LayerGroup) {
|
||||
if ($definition instanceof GeoJson) {
|
||||
$collection = $this->loadMarkerModels($model);
|
||||
|
||||
if ($collection) {
|
||||
@@ -101,9 +100,7 @@ class MarkersLayerMapper extends AbstractLayerMapper implements GeoJsonMapper
|
||||
$definition->addLayer($mapper->handle($item));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($definition instanceof GeoJson) {
|
||||
if ($model->pointToLayer) {
|
||||
$definition->setPointToLayer(new Expression($model->pointToLayer));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user