diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d9a0c2..c5c5723 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## 3.1.0 - 2018-01-11 +## 3.1.1 - 2018-12-07 + +[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.0...3.1.1) + +### Fixed + + - Fix missing marker cluster icon. + - Ignore markers without coordinates to prevent uncaught exception caused by invalid coordinates. + +## 3.1.0 - 2018-11-01 [Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.4...3.1.0) diff --git a/src/Bundle/Resources/config/layers.yml b/src/Bundle/Resources/config/layers.yml index c6dcc77..5e65deb 100644 --- a/src/Bundle/Resources/config/layers.yml +++ b/src/Bundle/Resources/config/layers.yml @@ -32,7 +32,7 @@ parameters: markercluster: children: true - icon: 'bundles/netzmachtcontaoleaflet/img/markercluster.png' + icon: 'bundles/netzmachtcontaoleaflet/img/cluster.png' tile: children: false diff --git a/src/Listener/Dca/LeafletDcaListener.php b/src/Listener/Dca/LeafletDcaListener.php index a8737ee..871574c 100644 --- a/src/Listener/Dca/LeafletDcaListener.php +++ b/src/Listener/Dca/LeafletDcaListener.php @@ -122,6 +122,7 @@ class LeafletDcaListener $data['marker'] = json_encode($latLng); } catch (\Exception $e) { // LatLng throws an exception of value could not be created. Just let the value empty when. + $data['marker'] = null; } return $this->templateEngine->render('toolkit:be:be_leaflet_geocode.html5', $data); diff --git a/src/Model/MarkerModel.php b/src/Model/MarkerModel.php index f1159ba..8064a1d 100644 --- a/src/Model/MarkerModel.php +++ b/src/Model/MarkerModel.php @@ -44,7 +44,18 @@ class MarkerModel extends AbstractActiveModel public static function findByFilter($pid, ?Filter $filter = null) { if (!$filter) { - return static::findActiveBy('pid', $pid, ['order' => 'sorting']); + $table = static::getTable(); + + return static::findBy( + [ + $table . '.active=1', + $table . '.pid=?', + $table . '.latitude>0', + $table . '.longitude>0', + ], + [$pid], + ['order' => 'sorting'] + ); } switch (true) {