We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d53250 commit 4d1b79dCopy full SHA for 4d1b79d
1 file changed
src/map-feature.js
@@ -229,10 +229,13 @@ export class MapFeature extends HTMLElement {
229
// todo: dynamically update layer bounds of vector layer
230
mapmlvectors.layerBounds = M.getBounds(this._layer._content);
231
// update map's zoom limit
232
- //this._map._addZoomLimit(mapmlvectors);
+ // the mapmlvectors.options should be updated with the new zoomBounds,
233
+ // to ensure the _addZoomLimit function call can read updated zoom info
234
+ // and update map zoom limit properly
235
+ L.extend(mapmlvectors.options, mapmlvectors.zoomBounds);
236
+ this._map._addZoomLimit(mapmlvectors);
237
// TODO: can be set as a handler of featureLayer
238
mapmlvectors._resetFeatures();
- L.extend(mapmlvectors.options, mapmlvectors.zoomBounds);
239
}
240
241
0 commit comments