Commit 9df8543d authored by Eric Duminil's avatar Eric Duminil
Browse files

Only zoom extent when a feature is added.

parent d818e19f
......@@ -85,7 +85,7 @@ var regionChooser = (function(){
var geoJsonFormat = new ol.format.GeoJSON();
var kmlFormat = new ol.format.KML({extractStyles: false});
kml_layer.addEventListener("change", function() {
kml_source.addEventListener("addfeature", function() {
map.getView().fitExtent(kml_source.getExtent(), (map.getSize()));
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment