From fd28c2563a802775fa8d45639a1a60c29d67e999 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 27 Jul 2015 16:56:40 +0200 Subject: JS: remove automatic zoom on JSON loading --- chimere/static/chimere/js/jquery.chimere.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'chimere') diff --git a/chimere/static/chimere/js/jquery.chimere.js b/chimere/static/chimere/js/jquery.chimere.js index 0af3f47..16a7832 100644 --- a/chimere/static/chimere/js/jquery.chimere.js +++ b/chimere/static/chimere/js/jquery.chimere.js @@ -986,16 +986,15 @@ OpenLayers.Layer.MapQuestOSM = OpenLayers.Class(OpenLayers.Layer.XYZ, { // add json layer addJSON: function(json_url){ settings.layerJson = new OpenLayers.Layer.Vector("GeoJSON", { - projection: EPSG_PROJECTION, - strategies: [new OpenLayers.Strategy.Fixed()], + projection: EPSG_DISPLAY_PROJECTION, + strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.HTTP({ url: json_url, format: new OpenLayers.Format.GeoJSON() }) }); settings.map.addLayer(settings.layerJson); - settings.map.zoomToExtent(settings.layerJson.getDataExtent()); - // settings.layerJson.setOpacity(0.5); + settings.layerJson.setOpacity(0.8); }, // Put a route on the map addRoute: function(route) { -- cgit v1.2.3