File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -229,10 +229,13 @@ export class MapFeature extends HTMLElement {
229
229
// todo: dynamically update layer bounds of vector layer
230
230
mapmlvectors . layerBounds = M . getBounds ( this . _layer . _content ) ;
231
231
// update map's zoom limit
232
- //this._map._addZoomLimit(mapmlvectors);
232
+ // 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 ) ;
233
237
// TODO: can be set as a handler of featureLayer
234
238
mapmlvectors . _resetFeatures ( ) ;
235
- L . extend ( mapmlvectors . options , mapmlvectors . zoomBounds ) ;
236
239
}
237
240
}
238
241
You can’t perform that action at this time.
0 commit comments