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 {
229229 // todo: dynamically update layer bounds of vector layer
230230 mapmlvectors . layerBounds = M . getBounds ( this . _layer . _content ) ;
231231 // 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 ) ;
233237 // TODO: can be set as a handler of featureLayer
234238 mapmlvectors . _resetFeatures ( ) ;
235- L . extend ( mapmlvectors . options , mapmlvectors . zoomBounds ) ;
236239 }
237240 }
238241
You can’t perform that action at this time.
0 commit comments