Skip to content
Snippets Groups Projects
Verified Commit 94a554c6 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Zoom map to markers.

parent 8c55485a
No related branches found
No related tags found
No related merge requests found
function map_init(map, options) {
$.getJSON(geojson, function (data) {
L.geoJson(data, {
var layer = L.geoJson(data, {
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.popupContent);
}
}).addTo(map);
map.fitBounds(layer.getBounds());
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment