]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/assets/leaflet/leaflet.locationfilter.js
Use jQuery Simulate to simulate click events
[rails.git] / vendor / assets / leaflet / leaflet.locationfilter.js
index 8e5121f62d9f799bc4ec35280bfc5e346b8350ec..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();
 
@@ -294,7 +295,7 @@ L.LocationFilter = L.Class.extend({
         this._eastRect = this._drawRectangle(this._eastBounds);
         this._southRect = this._drawRectangle(this._southBounds);
         this._innerRect = this._drawRectangle(this.getBounds(), {
-            fillColor: "transparent",
+            fillOpacity: 0,
             stroke: true,
             color: "white",
             weight: 1,