]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/notes.js.erb
Use new Leaflet setPopupContent method
[rails.git] / app / assets / javascripts / index / notes.js.erb
index 7336c49ec60121e25ee4a8e02ba837e6b82d2fc6..6a7c50373d8173207c0e7439d45d55a15c3d64e4 100644 (file)
@@ -87,7 +87,7 @@ $(document).ready(function () {
     if (marker)
     {
       marker.setIcon(noteIcons[feature.properties.status]);
-      marker._popup.setContent(createPopupContent(
+      marker.setPopupContent(createPopupContent(
         marker, feature.properties, 
         $(marker._popup._content).find("textarea").val()
       ));
@@ -115,7 +115,7 @@ $(document).ready(function () {
     var size = bounds.getSize();
 
     if (size <= OSM.MAX_NOTE_REQUEST_AREA) {
-      var url = "/api/" + OSM.API_VERSION + "/notes.json?bbox=" + bounds.toBBOX();
+      var url = "/api/" + OSM.API_VERSION + "/notes.json?bbox=" + bounds.toBBoxString();
 
       if (noteLoader) noteLoader.abort();
 
@@ -231,7 +231,7 @@ $(document).ready(function () {
           var popupContent = createPopupContent(marker, feature.properties);
 
           marker.setIcon(noteIcons[feature.properties.status]);
-          marker._popup.setContent(popupContent);
+          marker.setPopupContent(popupContent);
         }
       }
     });