X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8d76be71bbb8a799cbf0627dee170f26ade5a11f..97bb13595750d2ba5d03a5abe2ede7cd11a8a481:/app/assets/javascripts/index/browse.js diff --git a/app/assets/javascripts/index/browse.js b/app/assets/javascripts/index/browse.js index b6a388d81..3f888c1cd 100644 --- a/app/assets/javascripts/index/browse.js +++ b/app/assets/javascripts/index/browse.js @@ -1,6 +1,5 @@ OSM.initializeBrowse = function (map) { var browseBounds; - var selectedLayer; var dataLayer = map.dataLayer; dataLayer.setStyle({ @@ -92,7 +91,6 @@ OSM.initializeBrowse = function (map) { url: url, success: function (xml) { dataLayer.clearLayers(); - selectedLayer = null; var features = dataLayer.buildFeatures(xml); @@ -118,18 +116,6 @@ OSM.initializeBrowse = function (map) { } function onSelect(layer) { - // Unselect previously selected feature - if (selectedLayer) { - selectedLayer.setStyle(selectedLayer.originalStyle); - } - - // Redraw in selected style - layer.originalStyle = layer.options; - layer.setStyle({ color: "#0000ff", weight: 8 }); - OSM.router.route("/" + layer.feature.type + "/" + layer.feature.id); - - // Stash the currently drawn feature - selectedLayer = layer; } };