@@ -112,6 +112,14 @@ export default abstract class<
112112 declare polylinesValue: Array < PolylineDefinition < PolylineOptions , InfoWindowOptions > > ;
113113 declare optionsValue: MapOptions ;
114114
115+ declare hasCenterValue: boolean ;
116+ declare hasZoomValue: boolean ;
117+ declare hasFitBoundsToMarkersValue: boolean ;
118+ declare hasMarkersValue: boolean ;
119+ declare hasPolygonsValue: boolean ;
120+ declare hasPolylinesValue: boolean ;
121+ declare hasOptionsValue: boolean ;
122+
115123 protected map : Map ;
116124 protected markers = new Map < Identifier , Marker > ( ) ;
117125 protected polygons = new Map < Identifier , Polygon > ( ) ;
@@ -140,7 +148,11 @@ export default abstract class<
140148 this . createPolygon = this . createDrawingFactory ( 'polygon' , this . polygons , this . doCreatePolygon . bind ( this ) ) ;
141149 this . createPolyline = this . createDrawingFactory ( 'polyline' , this . polylines , this . doCreatePolyline . bind ( this ) ) ;
142150
143- this . map = this . doCreateMap ( { center : this . centerValue , zoom : this . zoomValue , options } ) ;
151+ this . map = this . doCreateMap ( {
152+ center : this . hasCenterValue ? this . centerValue : null ,
153+ zoom : this . hasZoomValue ? this . zoomValue : null ,
154+ options,
155+ } ) ;
144156 this . markersValue . forEach ( ( definition ) => this . createMarker ( { definition } ) ) ;
145157 this . polygonsValue . forEach ( ( definition ) => this . createPolygon ( { definition } ) ) ;
146158 this . polylinesValue . forEach ( ( definition ) => this . createPolyline ( { definition } ) ) ;
0 commit comments