]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/assets/leaflet/leaflet.locationfilter.js
Update to latest leaflet-locationfilter plugin
[rails.git] / vendor / assets / leaflet / leaflet.locationfilter.js
index a17f1a5affbc5e779be21299ef0333c543258448..9a0af4db4e59bd17215d7ddfd11029eecbaed317 100644 (file)
@@ -114,7 +114,6 @@ L.LocationFilter = L.Class.extend({
 
     onAdd: function(map) {
         this._map = map;
-        this._layer = new L.LayerGroup();
 
         if (this.options.enableButton || this.options.adjustButton) {
             this._initializeButtonContainer();
@@ -285,6 +284,8 @@ L.LocationFilter = L.Class.extend({
             return;
         }
 
+        this._layer = new L.LayerGroup();
+
         // Calculate filter bounds
         this._calculateBounds();