File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,12 @@ export abstract class BaseMap extends Events implements BaseMapDefinition {
214214 this . leafletInstance . on ( "click" , ( evt : L . LeafletMouseEvent ) =>
215215 this . handleMapClick ( evt )
216216 ) ;
217+ this . on ( 'rendered' , ( ) => {
218+ if ( this . options . zoomMarkers ) {
219+ this . log ( `Zooming to markers.` ) ;
220+ this . zoomAllMarkers ( ) ;
221+ }
222+ } )
217223
218224 this . on ( "first-layer-ready" , ( ) => {
219225 this . addFeatures ( ) ;
@@ -250,12 +256,6 @@ export abstract class BaseMap extends Events implements BaseMapDefinition {
250256 this . featureLayer . addTo ( this . currentGroup . group ) ;
251257 this . currentGroup . group . addTo ( this . leafletInstance ) ;
252258 this . tileOverlayLayer . addTo ( this . leafletInstance ) ;
253-
254- if ( this . options . zoomMarkers ) {
255- this . log ( `Zooming to markers.` ) ;
256-
257- this . zoomAllMarkers ( ) ;
258- }
259259 } ) ;
260260
261261 this . leafletInstance . on (
You can’t perform that action at this time.
0 commit comments