Commit 58fccdbf authored by Peter Vanhee's avatar Peter Vanhee
Browse files

Triggering a jquery event when a new feature gets added to the map. This...

Triggering a jquery event when a new feature gets added to the map. This allows anyone else to register using $(document).bind('leaflet.feature', function(e, lFeature, feature) { }});
parent 782027b1
Loading
Loading
Loading
Loading
+3 −0
Changes for leaflet.drupal.js: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -65,6 +65,9 @@
              lFeature.bindPopup(feature.popup);
            }
          }

          // Allow others to do something with the feature that was just added to the map
          $(document).trigger('leaflet.feature', [lFeature, feature]);
        }

        // add layer switcher