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 {
214
214
this . leafletInstance . on ( "click" , ( evt : L . LeafletMouseEvent ) =>
215
215
this . handleMapClick ( evt )
216
216
) ;
217
+ this . on ( 'rendered' , ( ) => {
218
+ if ( this . options . zoomMarkers ) {
219
+ this . log ( `Zooming to markers.` ) ;
220
+ this . zoomAllMarkers ( ) ;
221
+ }
222
+ } )
217
223
218
224
this . on ( "first-layer-ready" , ( ) => {
219
225
this . addFeatures ( ) ;
@@ -250,12 +256,6 @@ export abstract class BaseMap extends Events implements BaseMapDefinition {
250
256
this . featureLayer . addTo ( this . currentGroup . group ) ;
251
257
this . currentGroup . group . addTo ( this . leafletInstance ) ;
252
258
this . tileOverlayLayer . addTo ( this . leafletInstance ) ;
253
-
254
- if ( this . options . zoomMarkers ) {
255
- this . log ( `Zooming to markers.` ) ;
256
-
257
- this . zoomAllMarkers ( ) ;
258
- }
259
259
} ) ;
260
260
261
261
this . leafletInstance . on (
You can’t perform that action at this time.
0 commit comments