@@ -112,6 +112,14 @@ export default abstract class<
112
112
declare polylinesValue: Array < PolylineDefinition < PolylineOptions , InfoWindowOptions > > ;
113
113
declare optionsValue: MapOptions ;
114
114
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
+
115
123
protected map : Map ;
116
124
protected markers = new Map < Identifier , Marker > ( ) ;
117
125
protected polygons = new Map < Identifier , Polygon > ( ) ;
@@ -140,7 +148,11 @@ export default abstract class<
140
148
this . createPolygon = this . createDrawingFactory ( 'polygon' , this . polygons , this . doCreatePolygon . bind ( this ) ) ;
141
149
this . createPolyline = this . createDrawingFactory ( 'polyline' , this . polylines , this . doCreatePolyline . bind ( this ) ) ;
142
150
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
+ } ) ;
144
156
this . markersValue . forEach ( ( definition ) => this . createMarker ( { definition } ) ) ;
145
157
this . polygonsValue . forEach ( ( definition ) => this . createPolygon ( { definition } ) ) ;
146
158
this . polylinesValue . forEach ( ( definition ) => this . createPolyline ( { definition } ) ) ;
0 commit comments