templates: align map on existing markers (#51261)

This commit is contained in:
Frédéric Péters 2021-03-08 15:22:20 +01:00
parent 8e218a0cb0
commit a3b19f62d2
3 changed files with 3 additions and 0 deletions

View File

@ -100,6 +100,7 @@ $('#similar-list a.plus1').click(function() {
return L.marker(latlng, {icon: marker});
}
});
map.fitBounds(geo_json.getBounds(), {maxZoom: 18});
geo_json.addTo(map);
$(map).trigger('moveend');
}

View File

@ -98,6 +98,7 @@ $('#similar-list a.plus1').click(function() {
return L.marker(latlng, {icon: marker});
}
});
map.fitBounds(geo_json.getBounds(), {maxZoom: 18});
geo_json.addTo(map);
$(map).trigger('moveend');
}

View File

@ -98,6 +98,7 @@ $('#similar-list a.plus1').click(function() {
return L.marker(latlng, {icon: marker});
}
});
map.fitBounds(geo_json.getBounds(), {maxZoom: 18});
geo_json.addTo(map);
$(map).trigger('moveend');
}