MCPcopy Index your code
hub / github.com/google-map-react/google-map-react / constructor

Method constructor

src/google_map.js:176–258  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

174 static googleMapLoader = googleMapLoader; // eslint-disable-line
175
176 constructor(props) {
177 super(props);
178 this.mounted_ = false;
179 this.initialized_ = false;
180 this.googleApiLoadedCalled_ = false;
181
182 this.map_ = null;
183 this.maps_ = null;
184 this.prevBounds_ = null;
185 this.heatmap = null;
186
187 this.layers_ = {};
188
189 this.mouse_ = null;
190 this.mouseMoveTime_ = 0;
191 this.boundingRect_ = null;
192 this.mouseInMap_ = true;
193
194 this.dragTime_ = 0;
195 this.fireMouseEventOnIdle_ = false;
196 this.updateCounter_ = 0;
197
198 this.markersDispatcher_ = new MarkerDispatcher(this);
199 this.geoService_ = new Geo(K_GOOGLE_TILE_SIZE);
200 this.centerIsObject_ = isPlainObject(this.props.center);
201
202 this.minZoom_ = DEFAULT_MIN_ZOOM;
203 this.defaultDraggableOption_ = true;
204
205 this.zoomControlClickTime_ = 0;
206
207 this.childMouseDownArgs_ = null;
208 this.childMouseUpTime_ = 0;
209
210 this.googleMapDom_ = null;
211
212 if (process.env.NODE_ENV !== 'production') {
213 if (this.props.apiKey) {
214 console.warn(
215 'GoogleMap: ' + // eslint-disable-line no-console
216 'apiKey is deprecated, use ' +
217 'bootstrapURLKeys={{key: YOUR_API_KEY}} instead.'
218 );
219 }
220
221 if (this.props.onBoundsChange) {
222 console.warn(
223 'GoogleMap: ' + // eslint-disable-line no-console
224 'onBoundsChange is deprecated, use ' +
225 'onChange({center, zoom, bounds, ...other}) instead.'
226 );
227 }
228
229 if (isEmpty(this.props.center) && isEmpty(this.props.defaultCenter)) {
230 console.warn(
231 'GoogleMap: center or defaultCenter property must be defined' // eslint-disable-line no-console
232 );
233 }

Callers

nothing calls this directly

Calls 4

isPlainObjectFunction · 0.85
isEmptyFunction · 0.85
latLng2ObjFunction · 0.85
setViewMethod · 0.80

Tested by

no test coverage detected