We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f0925b commit 3aaa9d1Copy full SHA for 3aaa9d1
src/mapml/layers/FeatureLayer.js
@@ -157,15 +157,10 @@ export var FeatureLayer = L.FeatureGroup.extend({
157
},
158
159
_handleZoomEnd: function (e) {
160
- let mapZoom = this._map.getZoom();
161
- if (
162
- this.zoomBounds &&
163
- (mapZoom > this.zoomBounds.maxZoom || mapZoom < this.zoomBounds.minZoom)
164
- ) {
165
- this.clearLayers();
166
- return;
+ // handle zoom end gets called twice for every zoom, this condition makes it go through once only.
+ if (this.zoomBounds) {
+ this._resetFeatures();
167
}
168
- this._resetFeatures();
169
170
171
// remove or add features based on the min max attribute of the features,
0 commit comments