]> git.openstreetmap.org Git - rails.git/commitdiff
Update to latest leaflet-locationfilter plugin
authorTom Hughes <tom@compton.nu>
Mon, 18 Nov 2013 17:41:33 +0000 (17:41 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 18 Nov 2013 17:43:46 +0000 (17:43 +0000)
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;
 
     onAdd: function(map) {
         this._map = map;
-        this._layer = new L.LayerGroup();
 
         if (this.options.enableButton || this.options.adjustButton) {
             this._initializeButtonContainer();
 
         if (this.options.enableButton || this.options.adjustButton) {
             this._initializeButtonContainer();
@@ -285,6 +284,8 @@ L.LocationFilter = L.Class.extend({
             return;
         }
 
             return;
         }
 
+        this._layer = new L.LayerGroup();
+
         // Calculate filter bounds
         this._calculateBounds();
 
         // Calculate filter bounds
         this._calculateBounds();