]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/map.js.erb
Remove unnecessary delete statement
[rails.git] / app / assets / javascripts / map.js.erb
index fc2f955a8400ebb10b74892506fe6e8c2faf4296..5299340480fa4a243d94fef17ba63d3034549a9d 100644 (file)
@@ -106,13 +106,13 @@ function addMarkerToMap(position, icon, description) {
    return marker;
 }
 
-function addObjectToMap(url, zoom, callback) {
+function addObjectToMap(object, zoom, callback) {
    var layer = new OpenLayers.Layer.Vector("Objects", {
       strategies: [ 
           new OpenLayers.Strategy.Fixed()
       ],
       protocol: new OpenLayers.Protocol.HTTP({
-          url: url,
+          url: OSM.apiUrl(object),
           format: new OpenLayers.Format.OSM()
       }),
       style: {
@@ -196,7 +196,6 @@ function openMapPopup(marker, description) {
 function closeMapPopup() {
    if (popup) {
       map.removePopup(popup);
-      delete popup;
    }
 }