toodego: don't handle geojson surfaces for now

This commit is contained in:
Frédéric Péters 2021-09-28 09:13:15 +02:00
parent c0d7b5d8e5
commit f5b10eb0d7
1 changed files with 9 additions and 4 deletions

View File

@ -456,10 +456,13 @@ $(function() {
}
});
map.each_marker(function(marker) {
if (! map.getBounds().contains(marker.getLatLng())) {
if (! map.hasLayer(marker)) {
return;
}
if (! map.hasLayer(marker)) {
if (marker.feature.geometry.type != 'Point') {
return;
}
if (! map.getBounds().contains(marker.getLatLng())) {
return;
}
var marker_tile_identifier = map_marker_identifier(this.slug, marker);
@ -534,8 +537,10 @@ $(function() {
var query = $('#mapsearch input').val();
map.each_marker(function(marker) {
found++;
if (map_bounds.contains(marker.getLatLng())) {
found_in_padded_bounds++;;
if (marker.feature.geometry.type == 'Point') {
if (map_bounds.contains(marker.getLatLng())) {
found_in_padded_bounds++;;
}
}
});