mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-28 11:04:08 +01:00
Ignore markers without defined coordinates.
This commit is contained in:
@@ -10,7 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.0...hotfix/3.1.1)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix missing marker cluster icon
|
||||
- Ignore markers without coordinates
|
||||
|
||||
## 3.1.0 - 2018-01-11
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user