X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/bad28a6478fb5c96b438c18de1b1d90a456c7e6c..b0453833b1e699a65ba1e9918eb8a5d8e02eb6e0:/app/assets/javascripts/map.js.erb diff --git a/app/assets/javascripts/map.js.erb b/app/assets/javascripts/map.js.erb index 1299fb510..9c3aa9e36 100644 --- a/app/assets/javascripts/map.js.erb +++ b/app/assets/javascripts/map.js.erb @@ -98,8 +98,14 @@ function addMarkerToMap(position, icon, description) { } function addObjectToMap(url, zoom, callback) { - var layer = new OpenLayers.Layer.GML("Objects", url, { - format: OpenLayers.Format.OSM, + var layer = new OpenLayers.Layer.Vector("Objects", { + strategies: [ + new OpenLayers.Strategy.Fixed() + ], + protocol: new OpenLayers.Protocol.HTTP({ + url: url, + format: new OpenLayers.Format.OSM() + }), style: { strokeColor: "blue", strokeWidth: 3, @@ -137,8 +143,6 @@ function addObjectToMap(url, zoom, callback) { }); map.addLayer(layer); - - layer.loadGML(); } function addBoxToMap(boxbounds, id, outline) {