Use new Leaflet setPopupContent method
authorTom Hughes <tom@compton.nu>
Thu, 27 Jun 2013 21:40:23 +0000 (22:40 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 27 Jun 2013 21:40:23 +0000 (22:40 +0100)
app/assets/javascripts/index/notes.js.erb

index 2121c21..6a7c503 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()
       ));
@@ -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);
         }
       }
     });