UNPKG

54.8 kBMarkdownView Raw
1# Change Log
2
3All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
5<a name="8.0.0"></a>
6# [8.0.0](https://github.com/tomchentw/react-google-maps/compare/v7.3.0...v8.0.0) (2017-09-14)
7
8
9### Bug Fixes
10
11* **package.json:** relax peerDependencies ([#596](https://github.com/tomchentw/react-google-maps/issues/596)) ([6f1c88d](https://github.com/tomchentw/react-google-maps/commit/6f1c88d))
12
13
14### Features
15
16* **addons/InfoBox:** revamp to PureComponent ([95269d2](https://github.com/tomchentw/react-google-maps/commit/95269d2))
17* **addons/MarkerClusterer:** revamp to PureComponent ([13cbef2](https://github.com/tomchentw/react-google-maps/commit/13cbef2))
18* **Circle:** revamp with jscodeshift ([c2c98ab](https://github.com/tomchentw/react-google-maps/commit/c2c98ab))
19* **DirectionsRenderer:** revamp with jscodeshift ([7c5532a](https://github.com/tomchentw/react-google-maps/commit/7c5532a))
20* **drawing/DrawingManager:** revamp with jscodeshift ([01bfb80](https://github.com/tomchentw/react-google-maps/commit/01bfb80))
21* **FusionTablesLayer:** revamp with jscodeshift ([a5865a0](https://github.com/tomchentw/react-google-maps/commit/a5865a0))
22* **GoogleMap:** revamp with jscodeshift ([772f363](https://github.com/tomchentw/react-google-maps/commit/772f363))
23* **index.js:** export `withScriptjs` ([4a1c34e](https://github.com/tomchentw/react-google-maps/commit/4a1c34e))
24* **KmlLayer:** revamp with jscodeshift ([18b8a9f](https://github.com/tomchentw/react-google-maps/commit/18b8a9f))
25* **Marker:** revamp with jscodeshift ([08c5687](https://github.com/tomchentw/react-google-maps/commit/08c5687))
26* **OverlayView:** revamp with jscodeshift ([8c66c14](https://github.com/tomchentw/react-google-maps/commit/8c66c14))
27* **package.json:** add `recompose` to dependencies ([f433a50](https://github.com/tomchentw/react-google-maps/commit/f433a50))
28* **package.json:** remove `create-react-class` from dependencies ([ea41411](https://github.com/tomchentw/react-google-maps/commit/ea41411))
29* **places/SearchBox:** revamp with jscodeshift ([bc41752](https://github.com/tomchentw/react-google-maps/commit/bc41752))
30* **Polygon:** revamp with jscodeshift ([a015b95](https://github.com/tomchentw/react-google-maps/commit/a015b95))
31* **Polyline:** revamp with jscodeshift ([2ff6313](https://github.com/tomchentw/react-google-maps/commit/2ff6313))
32* **Rectangle:** revamp with jscodeshift ([5096882](https://github.com/tomchentw/react-google-maps/commit/5096882))
33* **StreetViewPanorama:** revamp with jscodeshift ([a0e6dd4](https://github.com/tomchentw/react-google-maps/commit/a0e6dd4))
34* **TrafficLayer:** revamp with jscodeshift ([92159bd](https://github.com/tomchentw/react-google-maps/commit/92159bd))
35* **tx:** add `MapChild` transform with `jscodeshift` ([b63d9ee](https://github.com/tomchentw/react-google-maps/commit/b63d9ee))
36* **visualization/HeatmapLayer:** revamp with jscodeshift ([b92a570](https://github.com/tomchentw/react-google-maps/commit/b92a570))
37* **withGoogleMap:** revamp with prettier ([c3de3b3](https://github.com/tomchentw/react-google-maps/commit/c3de3b3))
38* **withScriptjs:** revamp with prettier ([8f3b484](https://github.com/tomchentw/react-google-maps/commit/8f3b484))
39
40
41### BREAKING CHANGES
42
43* **places/SearchBox:** input element can now render directly as the only child
44
45Before:
46
47```js
48<SearchBox
49 inputPlaceholder="Customized your placeholder"
50 inputStyle={{ padding: `0 12px`, fontSize: `14px`, outline: `none` }}
51/>
52```
53
54After:
55
56```js
57<SearchBox>
58 <input
59 type="text"
60 placeholder="Customized your placeholder"
61 style={{
62 padding: `0 12px`,
63 fontSize: `14px`,
64 outline: `none`,
65 }}
66 />
67</SearchBox>
68```
69
70
71
72<a name="7.3.0"></a>
73# [7.3.0](https://github.com/tomchentw/react-google-maps/compare/v7.2.0...v7.3.0) (2017-09-06)
74
75
76### Bug Fixes
77
78* **enhanceElement:** handle undefined callbacks gracefully ([e463df3](https://github.com/tomchentw/react-google-maps/commit/e463df3))
79* **fusiontable:** add query param ([b0c637f](https://github.com/tomchentw/react-google-maps/commit/b0c637f))
80* **withScriptsJs:** Fix comment clarity ([74b0ba3](https://github.com/tomchentw/react-google-maps/commit/74b0ba3))
81
82
83### Features
84
85* **marker:** add custom label support ([8e06dd5](https://github.com/tomchentw/react-google-maps/commit/8e06dd5))
86
87
88
89<a name="7.2.0"></a>
90# [7.2.0](https://github.com/tomchentw/react-google-maps/compare/v7.1.0...v7.2.0) (2017-07-18)
91
92
93### Features
94
95* **MarkerClusterer:** add batchSize option ([#544](https://github.com/tomchentw/react-google-maps/issues/544)) ([ff6b14b](https://github.com/tomchentw/react-google-maps/commit/ff6b14b))
96
97
98
99<a name="7.1.0"></a>
100# [7.1.0](https://github.com/tomchentw/react-google-maps/compare/v7.0.0...v7.1.0) (2017-07-06)
101
102
103### Features
104
105* **StreetViewPanorama:** add OverlayView to example ([7bd8c76](https://github.com/tomchentw/react-google-maps/commit/7bd8c76))
106* **StreetViewPanorama:** add StreetViewPanorama component ([e75c936](https://github.com/tomchentw/react-google-maps/commit/e75c936))
107* **StreetViewPanorama:** fix deprecation warnings ([d80cfe5](https://github.com/tomchentw/react-google-maps/commit/d80cfe5))
108* **StreetViewPanorama:** fix OverlayViewHelper ([ab513a5](https://github.com/tomchentw/react-google-maps/commit/ab513a5))
109* **StreetViewPanorama:** Fix standalone rendering and rename prop ([39373d9](https://github.com/tomchentw/react-google-maps/commit/39373d9))
110* **StreetViewPanorama:** remove log, cosmetics ([4127f7e](https://github.com/tomchentw/react-google-maps/commit/4127f7e))
111* **StreetViewPanorama:** update context for children ([eb86d7e](https://github.com/tomchentw/react-google-maps/commit/eb86d7e))
112
113
114
115<a name="7.0.0"></a>
116# [7.0.0](https://github.com/tomchentw/react-google-maps/compare/v6.3.0...v7.0.0) (2017-04-21)
117
118
119### Code Refactoring
120
121* **index.js:** remove HeatmapLayer export ([a05e5cb](https://github.com/tomchentw/react-google-maps/commit/a05e5cb))
122
123
124### Features
125
126* **package.json:** add "create-react-class" and "prop-types" to dependencies ([cb2cbff](https://github.com/tomchentw/react-google-maps/commit/cb2cbff))
127* migrate to "create-react-class" package ([d54cc95](https://github.com/tomchentw/react-google-maps/commit/d54cc95)), closes [#463](https://github.com/tomchentw/react-google-maps/issues/463)
128* migrate to "prop-types" package ([129b6e2](https://github.com/tomchentw/react-google-maps/commit/129b6e2)), closes [#463](https://github.com/tomchentw/react-google-maps/issues/463)
129* migrate to implicit default import for React ([f094f1b](https://github.com/tomchentw/react-google-maps/commit/f094f1b))
130* **package.json:** upgrade to ^15.5.4 of react / react-dom in peerDependencies ([d62059e](https://github.com/tomchentw/react-google-maps/commit/d62059e))
131
132
133### BREAKING CHANGES
134
135* **index.js:** remove top-level HeatmapLayer export
136
137Before:
138
139```js
140import { HeatmapLayer } from "react-google-maps"
141```
142
143After:
144
145```js
146import HeatmapLayer from "react-google-maps/lib/visualization/HeatmapLayer"
147```
148* **package.json:** upgrade to ^15.5.4 of react / react-dom in peerDependencies
149
150For react < 15.5.0, use react-google-maps < 7.0.0 instead.
151
152
153
154<a name="6.3.0"></a>
155# [6.3.0](https://github.com/tomchentw/react-google-maps/compare/v6.2.0...v6.3.0) (2017-04-20)
156
157
158### Bug Fixes
159
160* **InfoWindow:** long content jank issue ([54ffccc](https://github.com/tomchentw/react-google-maps/commit/54ffccc)), closes [#449](https://github.com/tomchentw/react-google-maps/issues/449) [#444](https://github.com/tomchentw/react-google-maps/issues/444) [#408](https://github.com/tomchentw/react-google-maps/issues/408)
161
162
163### Features
164
165* **Marker:** prevent Marker from redrawing under clusters ([7849f28](https://github.com/tomchentw/react-google-maps/commit/7849f28)), closes [#397](https://github.com/tomchentw/react-google-maps/issues/397)
166
167
168
169<a name="6.2.0"></a>
170# [6.2.0](https://github.com/tomchentw/react-google-maps/compare/v6.1.0...v6.2.0) (2017-04-20)
171
172
173### Features
174
175* **FusionTablesLayer:** add component ([1d8e478](https://github.com/tomchentw/react-google-maps/commit/1d8e478)), closes [#370](https://github.com/tomchentw/react-google-maps/issues/370)
176* **KmlLayer:** add options to props ([2968efc](https://github.com/tomchentw/react-google-maps/commit/2968efc)), closes [#428](https://github.com/tomchentw/react-google-maps/issues/428) [#406](https://github.com/tomchentw/react-google-maps/issues/406)
177* **TrafficLayer:** add component ([d419fc9](https://github.com/tomchentw/react-google-maps/commit/d419fc9)), closes [#417](https://github.com/tomchentw/react-google-maps/issues/417)
178
179
180
181<a name="6.1.0"></a>
182# [6.1.0](https://github.com/tomchentw/react-google-maps/compare/v6.0.3...v6.1.0) (2017-04-20)
183
184
185### Features
186
187* **visualization/HeatmapLayer:** move to visualization namespace ([20ea7c3](https://github.com/tomchentw/react-google-maps/commit/20ea7c3))
188
189
190
191<a name="6.0.3"></a>
192## [6.0.3](https://github.com/tomchentw/react-google-maps/compare/v6.0.2...v6.0.3) (2017-04-20)
193
194
195### Bug Fixes
196
197* **HeatmapLayer:** HeatmapLayer constructor fix ([#376](https://github.com/tomchentw/react-google-maps/issues/376)) ([24b140d](https://github.com/tomchentw/react-google-maps/commit/24b140d))
198
199
200
201<a name="6.0.2"></a>
202## [6.0.2](https://github.com/tomchentw/react-google-maps/compare/v6.0.1...v6.0.2) (2017-04-20)
203
204
205### Bug Fixes
206
207* **addons/InfoBox:** Unmounting an InfoBox should remove all listeners. ([#412](https://github.com/tomchentw/react-google-maps/issues/412)) ([ad4f0ee](https://github.com/tomchentw/react-google-maps/commit/ad4f0ee))
208
209
210
211<a name="6.0.1"></a>
212## [6.0.1](https://github.com/tomchentw/react-google-maps/compare/v6.0.0...v6.0.1) (2016-10-14)
213
214
215### Bug Fixes
216
217* **addons/InfoBox:** allow children to receive React's context ([bed461c](https://github.com/tomchentw/react-google-maps/commit/bed461c)), closes [#258](https://github.com/tomchentw/react-google-maps/issues/258)
218* **addons/InfoBox:** allow children to receive React's context ([5748a96](https://github.com/tomchentw/react-google-maps/commit/5748a96))
219* **InfoWindow:** allow children to receive React's context ([ca73c85](https://github.com/tomchentw/react-google-maps/commit/ca73c85))
220* **package.json:** devDependencies of eslint-config-react-app ([e8e3eed](https://github.com/tomchentw/react-google-maps/commit/e8e3eed))
221
222
223
224<a name="6.0.0"></a>
225# [6.0.0](https://github.com/tomchentw/react-google-maps/compare/v5.1.1...v6.0.0) (2016-10-04)
226
227
228### Code Refactoring
229
230* **addons/InfoBox:** rewrite with enhanceElement and cleaner interfaces ([06f2e9b](https://github.com/tomchentw/react-google-maps/commit/06f2e9b))
231* **addons/MarkerClusterer:** rewrite with enhanceElement and cleaner interfaces ([f1032f4](https://github.com/tomchentw/react-google-maps/commit/f1032f4))
232* **Circle:** rewrite with enhanceElement and cleaner interfaces ([da0ebc2](https://github.com/tomchentw/react-google-maps/commit/da0ebc2))
233* **drawing/DrawingManager:** rewrite with enhanceElement and cleaner interfaces ([1b6a937](https://github.com/tomchentw/react-google-maps/commit/1b6a937))
234* **DrawingManager:** move to drawing/DrawingManager ([3226508](https://github.com/tomchentw/react-google-maps/commit/3226508))
235* **GoogleMap:** rewrite with enhanceElement and cleaner interfaces ([4b22e42](https://github.com/tomchentw/react-google-maps/commit/4b22e42))
236* **InfoWindow:** rewrite with enhanceElement and cleaner interfaces ([fc1c25c](https://github.com/tomchentw/react-google-maps/commit/fc1c25c))
237* **KmlLayer:** rewrite with enhanceElement and cleaner interfaces ([2479b88](https://github.com/tomchentw/react-google-maps/commit/2479b88))
238* **Marker:** rewrite with enhanceElement and cleaner interfaces ([c06aff2](https://github.com/tomchentw/react-google-maps/commit/c06aff2))
239* **OverlayView:** rewrite with enhanceElement and cleaner interfaces ([7d28f2f](https://github.com/tomchentw/react-google-maps/commit/7d28f2f))
240* **places/SearchBox:** rewrite with enhanceElement and cleaner interfaces ([bc97f61](https://github.com/tomchentw/react-google-maps/commit/bc97f61))
241* **Polygon:** rewrite with enhanceElement and cleaner interfaces ([1e20d70](https://github.com/tomchentw/react-google-maps/commit/1e20d70))
242* **Polyline:** rewrite with enhanceElement and cleaner interfaces ([5603319](https://github.com/tomchentw/react-google-maps/commit/5603319))
243* **Rectangle:** rewrite with enhanceElement and cleaner interfaces ([ea39062](https://github.com/tomchentw/react-google-maps/commit/ea39062))
244* **SearchBox:** move to places/SearchBox ([cf5a1cb](https://github.com/tomchentw/react-google-maps/commit/cf5a1cb))
245
246
247### Features
248
249* **async/withScriptjs:** provide HOC for loading `googleMapURL` with `scriptjs` ([14d9273](https://github.com/tomchentw/react-google-maps/commit/14d9273))
250* **enhanceElement:** utility for generating Google Maps Components ([2656569](https://github.com/tomchentw/react-google-maps/commit/2656569))
251* **package.json:** add "react-display-name" to dependencies ([2df62c7](https://github.com/tomchentw/react-google-maps/commit/2df62c7))
252* **withGoogleMap:** provide HOC for initialize `google.maps.Map` instance ([f61724c](https://github.com/tomchentw/react-google-maps/commit/f61724c))
253
254
255### BREAKING CHANGES
256
257* addons/InfoBox: Naming convention for event handlers has tweaked to follow React's convention.
258
259Before:
260
261```js
262<InfoBox
263 onCloseclick={_.noop}
264 onDomready={_.noop}
265 onZindexChanged={_.noop}
266/>
267```
268
269After:
270
271```js
272<InfoBox
273 onCloseClick={_.noop}
274 onDomReady={_.noop}
275 onZIndexChanged={_.noop}
276/>
277```
278* withGoogleMap: Wrap all `react-google-maps` components inside `withGoogleMap` HOC.
279
280Before:
281
282```js
283// v5.0.0
284<GoogleMapLoader
285 containerElement={
286 <div
287 {...this.props}
288 style={{
289 height: "100%",
290 }}
291 />
292 }
293 googleMapElement={
294 <GoogleMap
295 ref={(map) => console.log(map)}
296 defaultZoom={3}
297 defaultCenter={{lat: -25.363882, lng: 131.044922}}
298 onClick={::this.handleMapClick}>
299 {this.state.markers.map((marker, index) => {
300 return (
301 <Marker
302 {...marker}
303 onRightclick={this.handleMarkerRightclick.bind(this, index)} />
304 );
305 })}
306 </GoogleMap>
307 }
308/>
309// or v4.0.0
310<GoogleMap containerProps={{
311 ...this.props,
312 style: {
313 height: "100%",
314 },
315 }}
316 ref="map"
317 defaultZoom={3}
318 defaultCenter={{lat: -25.363882, lng: 131.044922}}
319 onClick={::this.handleMapClick}>
320 {this.state.markers.map((marker, index) => {
321 return (
322 <Marker
323 {...marker}
324 onRightclick={this.handleMarkerRightclick.bind(this, index)} />
325 );
326 })}
327</GoogleMap>
328```
329
330After:
331
332```js
333// Wrap all `react-google-maps` components with `withGoogleMap` HOC
334// and name it GettingStartedGoogleMap
335const GettingStartedGoogleMap = withGoogleMap(props => (
336 <GoogleMap
337 ref={props.onMapLoad}
338 defaultZoom={3}
339 defaultCenter={{ lat: -25.363882, lng: 131.044922 }}
340 onClick={props.onMapClick}
341 >
342 {props.markers.map((marker, index) => (
343 <Marker
344 {...marker}
345 onRightClick={() => props.onMarkerRightClick(index)}
346 />
347 ))}
348 </GoogleMap>
349));
350// Then, render it:
351render(
352 <GettingStartedGoogleMap
353 containerElement={
354 <div style={{ height: `100%` }} />
355 }
356 mapElement={
357 <div style={{ height: `100%` }} />
358 }
359 onMapLoad={_.noop}
360 onMapClick={_.noop}
361 markers={markers}
362 onMarkerRightClick={_.noop}
363 />,
364 document.getElementById('root')
365);
366```
367* places/SearchBox: Input props are now under `inputProps`.
368
369This will get passed in directly into the underlying `<input>` component. You can also override it with `inputStyle`, `inputClassName` and `inputPlaceholder`.
370
371Before:
372
373```js
374<SearchBox
375 placeholder="Customized your placeholder"
376 style={INPUT_STYLE}
377/>
378```
379
380After:
381
382```js
383<SearchBox
384 inputPlaceholder="Customized your placeholder"
385 inputStyle={INPUT_STYLE}
386/>
387```
388* SearchBox: move SearchBox to places/SearchBox
389* drawing/DrawingManager: Naming convention for event handlers has tweaked to follow React's convention.
390
391Before:
392
393```js
394<DrawingManager
395 onCirclecomplete={_.noop}
396 onOverlaycomplete={_.noop}
397/>
398```
399
400After:
401
402```js
403<DrawingManager
404 onCircleComplete={_.noop}
405 onOverlayComplete={_.noop}
406/>
407```
408* DrawingManager: move DrawingManager to drawing/DrawingManager
409* OverlayView: `OverlayView` can no longer be rendered under `MarkerClusterer`
410* InfoWindow: Naming convention for event handlers has tweaked to follow React's convention.
411
412Before:
413
414```js
415<InfoWindow
416 onCloseclick={_.noop}
417 onDomready={_.noop}
418 onZindexChanged={_.noop}
419/>
420```
421
422After:
423
424```js
425<InfoWindow
426 onCloseClick={_.noop}
427 onDomReady={_.noop}
428 onZIndexChanged={_.noop}
429/>
430```
431* addons/MarkerClusterer: Naming convention for event handlers has tweaked to follow React's convention.
432
433Before:
434
435```js
436<MarkerClusterer
437 onClusteringbegin={_.noop}
438 onMouseout={_.noop}
439/>
440```
441
442After:
443
444```js
445<MarkerClusterer
446 onClusteringBegin={_.noop}
447 onMouseOut={_.noop}
448/>
449```
450* Circle: Naming convention for event handlers has tweaked to follow React's convention.
451
452Before:
453
454```js
455<Circle
456 onClick={_.noop}
457 onRightclick={_.noop}
458 onDragstart={_.noop}
459/>
460```
461
462After:
463
464```js
465<Circle
466 onClick={_.noop}
467 onRightClick={_.noop}
468 onDragStart={_.noop}
469/>
470```
471* Polygon: Naming convention for event handlers has tweaked to follow React's convention.
472
473Before:
474
475```js
476<Polygon
477 onClick={_.noop}
478 onRightclick={_.noop}
479 onDragstart={_.noop}
480/>
481```
482
483After:
484
485```js
486<Polygon
487 onClick={_.noop}
488 onRightClick={_.noop}
489 onDragStart={_.noop}
490/>
491```
492* Polyline: Naming convention for event handlers has tweaked to follow React's convention.
493
494Before:
495
496```js
497<Polyline
498 onClick={_.noop}
499 onRightclick={_.noop}
500 onDragstart={_.noop}
501/>
502```
503
504After:
505
506```js
507<Polyline
508 onClick={_.noop}
509 onRightClick={_.noop}
510 onDragStart={_.noop}
511/>
512```
513* Rectangle: Naming convention for event handlers has tweaked to follow React's convention.
514
515Before:
516
517```js
518<Rectangle
519 onClick={_.noop}
520 onRightclick={_.noop}
521 onDragstart={_.noop}
522/>
523```
524
525After:
526
527```js
528<Rectangle
529 onClick={_.noop}
530 onRightClick={_.noop}
531 onDragStart={_.noop}
532/>
533```
534* Marker: Naming convention for event handlers has tweaked to follow React's convention.
535
536Before:
537
538```js
539<Marker
540 onClick={_.noop}
541 onRightclick={_.noop}
542 onDragstart={_.noop}
543/>
544```
545
546After:
547
548```js
549<Marker
550 onClick={_.noop}
551 onRightClick={_.noop}
552 onDragStart={_.noop}
553/>
554```
555* GoogleMap: Naming convention for event handlers has tweaked to follow React's convention.
556
557Before:
558
559```js
560<GoogleMap
561 onClick={_.noop}
562 onRightclick={_.noop}
563 onDragstart={_.noop}
564/>
565```
566
567After:
568
569```js
570<GoogleMap
571 onClick={_.noop}
572 onRightClick={_.noop}
573 onDragStart={_.noop}
574/>
575```
576* async/withScriptjs: Apply `withScriptjs` HOC before `withGoogleMaps` HOC.
577
578Before:
579
580```js
581<ScriptjsLoader
582 hostname={"maps.googleapis.com"}
583 pathname={"/maps/api/js"}
584 query={{v: `3.${ AsyncGettingStarted.version }`, libraries: "geometry,drawing,places"}}
585 loadingElement={
586 <div {...this.props} style={{ height: "100%" }}>
587 <FaSpinner />
588 </div>
589 }
590 containerElement={
591 <div {...this.props} style={{ height: "100%" }} />
592 }
593 googleMapElement={
594 <GoogleMap
595 ref={googleMap => {
596 googleMap && console.log(`Zoom: ${ googleMap.getZoom() }`);
597 }}
598 defaultZoom={3}
599 defaultCenter={{lat: -25.363882, lng: 131.044922}}
600 onClick={::this.handleMapClick}
601 >
602 <Marker
603 {...this.state.marker}
604 onRightclick={this.handleMarkerRightclick}
605 />
606 </GoogleMap>
607 }
608/>
609```
610
611After:
612
613```js
614// Wrap all `react-google-maps` components with `withGoogleMap` HOC
615// then wraps it into `withScriptjs` HOC
616// It loads Google Maps JavaScript API v3 for you asynchronously.
617// Name the component AsyncGettingStartedExampleGoogleMap
618const AsyncGettingStartedExampleGoogleMap = withScriptjs(
619 withGoogleMap(
620 props => (
621 <GoogleMap
622 ref={props.onMapLoad}
623 defaultZoom={3}
624 defaultCenter={{ lat: -25.363882, lng: 131.044922 }}
625 onClick={props.onMapClick}
626 >
627 {props.markers.map(marker => (
628 <Marker
629 {...marker}
630 onRightClick={() => props.onMarkerRightClick(marker)}
631 />
632 ))}
633 </GoogleMap>
634 )
635);
636// Then, render it:
637render(
638 <GettingStartedGoogleMap
639 googleMapURL="https://maps.googleapis.com/maps/api/js?v=3.exp"
640 loadingElement={
641 <div style={{ height: `100%` }}>
642 <FaSpinner
643 style={{
644 display: `block`,
645 width: `80px`,
646 height: `80px`,
647 margin: `150px auto`,
648 animation: `fa-spin 2s infinite linear`,
649 }}
650 />
651 </div>
652 }
653 containerElement={
654 <div style={{ height: `100%` }} />
655 }
656 mapElement={
657 <div style={{ height: `100%` }} />
658 }
659 onMapLoad={_.noop}
660 onMapClick={_.noop}
661 markers={markers}
662 onMarkerRightClick={_.noop}
663 />,
664 document.getElementById('root')
665);
666```
667* KmlLayer: Naming convention for event handlers has tweaked to follow React's convention.
668
669Before:
670
671```js
672<KmlLayer
673 onClick={_.noop}
674 onDefaultviewportChanged={_.noop}
675 onStatusChanged={_.noop}
676/>
677```
678
679After:
680
681```js
682<KmlLayer
683 onClick={_.noop}
684 onDefaultViewportChanged={_.noop}
685 onStatusChanged={_.noop}
686/>
687```
688
689
690
691<a name="5.1.1"></a>
692## [5.1.1](https://github.com/tomchentw/react-google-maps/compare/v5.1.0...v5.1.1) (2016-10-04)
693
694
695### Bug Fixes
696
697* **OverlayView:** fixed bug in OverlayView when nested in MarkerClusterer ([#302](https://github.com/tomchentw/react-google-maps/issues/302)) ([1c5e933](https://github.com/tomchentw/react-google-maps/commit/1c5e933)), closes [#301](https://github.com/tomchentw/react-google-maps/issues/301)
698* **ScriptjsLoader:** Fix setState warning ([#307](https://github.com/tomchentw/react-google-maps/issues/307)) ([999fd89](https://github.com/tomchentw/react-google-maps/commit/999fd89))
699
700
701
702<a name="5.1.0"></a>
703# [5.1.0](https://github.com/tomchentw/react-google-maps/compare/v5.0.0...v5.1.0) (2016-09-30)
704
705
706### Features
707
708* **HeatmapLayer:** add HeatmapLayer component ([#248](https://github.com/tomchentw/react-google-maps/issues/248)) ([2863cdd](https://github.com/tomchentw/react-google-maps/commit/2863cdd))
709
710
711
712<a name="5.0.0"></a>
713# [5.0.0](https://github.com/tomchentw/react-google-maps/compare/v4.11.0...v5.0.0) (2016-08-04)
714
715
716### Bug Fixes
717
718* **src:** eslint errors ([f2b242a](https://github.com/tomchentw/react-google-maps/commit/f2b242a))
719
720
721### Features
722
723* **.babelrc:** add transform-runtime and lodash to plugins ([5db33f9](https://github.com/tomchentw/react-google-maps/commit/5db33f9))
724* **GoogleMap:** remove deprecated props and behaviour ([cf5b8f1](https://github.com/tomchentw/react-google-maps/commit/cf5b8f1))
725* **GoogleMapLoader:** switch to new behaviour ([7e40269](https://github.com/tomchentw/react-google-maps/commit/7e40269))
726* **package.json:** add babel-runtime and lodash to dependencies ([5e37d3c](https://github.com/tomchentw/react-google-maps/commit/5e37d3c))
727* **package.json:** upgrade devDependencies ([47a400c](https://github.com/tomchentw/react-google-maps/commit/47a400c))
728* **src:** switch to use lodash directly ([304f465](https://github.com/tomchentw/react-google-maps/commit/304f465))
729
730
731### Performance Improvements
732
733* **src:** switch mapHolderRef from props to context ([c2d265c](https://github.com/tomchentw/react-google-maps/commit/c2d265c)), closes [#135](https://github.com/tomchentw/react-google-maps/issues/135) [#210](https://github.com/tomchentw/react-google-maps/issues/210) [#216](https://github.com/tomchentw/react-google-maps/issues/216)
734
735
736### BREAKING CHANGES
737
738* GoogleMap: You need to use GoogleMapLoader with props.googleMapElement={<GoogleMap />} now.
739
740Before:
741
742```js
743<GoogleMap containerProps={{
744 ...this.props,
745 style: {
746 height: "100%",
747 },
748 }}
749 ref="map"
750 defaultZoom={3}
751 defaultCenter={{lat: -25.363882, lng: 131.044922}}
752 onClick={::this.handleMapClick}>
753 {this.state.markers.map((marker, index) => {
754 return (
755 <Marker
756 {...marker}
757 onRightclick={this.handleMarkerRightclick.bind(this, index)} />
758 );
759 })}
760</GoogleMap>
761```
762
763After:
764
765```js
766<GoogleMapLoader
767 containerElement={
768 <div
769 {...this.props}
770 style={{
771 height: "100%",
772 }}
773 />
774 }
775 googleMapElement={
776 <GoogleMap
777 ref={(map) => console.log(map)}
778 defaultZoom={3}
779 defaultCenter={{lat: -25.363882, lng: 131.044922}}
780 onClick={::this.handleMapClick}>
781 {this.state.markers.map((marker, index) => {
782 return (
783 <Marker
784 {...marker}
785 onRightclick={this.handleMarkerRightclick.bind(this, index)} />
786 );
787 })}
788 </GoogleMap>
789 }
790/>
791```
792* src: If you're just using the library and didn't make custom components before, feel free to ignore this implementation changes.
793
794Now, mapHolderRef for each component are now passed in via context. This doesn't affect all components interface in general. But if you do custom components before and relies on the implementation of react-google-maps, you should be aware of this and make some changes.
795
796
797
798<a name="4.11.0"></a>
799# [4.11.0](https://github.com/tomchentw/react-google-maps/compare/v4.10.3...v4.11.0) (2016-05-29)
800
801
802### Features
803
804* **OverlayView:** allow rendered as children of MarkerCluster ([435961a](https://github.com/tomchentw/react-google-maps/commit/435961a)), closes [#187](https://github.com/tomchentw/react-google-maps/issues/187)
805
806
807
808<a name="4.10.3"></a>
809## [4.10.3](https://github.com/tomchentw/react-google-maps/compare/v4.10.2...v4.10.3) (2016-05-29)
810
811
812### Bug Fixes
813
814* **GoogleMapLoader:** handle unmount ref case ([334c5c9](https://github.com/tomchentw/react-google-maps/commit/334c5c9))
815
816
817
818<a name="4.10.2"></a>
819## [4.10.2](https://github.com/tomchentw/react-google-maps/compare/v4.10.1...v4.10.2) (2016-05-29)
820
821
822### Features
823
824* **package.json:** upgrade to "marker-clusterer-plus@^2.1.4" ([c1d322a](https://github.com/tomchentw/react-google-maps/commit/c1d322a))
825
826
827
828<a name="4.10.1"></a>
829## [4.10.1](https://github.com/tomchentw/react-google-maps/compare/v4.10.0...v4.10.1) (2016-04-27)
830
831
832### Bug Fixes
833
834* **package.json:** update to "react-prop-types-element-of-type@^2.1.0" ([0f27ed3](https://github.com/tomchentw/react-google-maps/commit/0f27ed3))
835
836
837
838<a name="4.10.0"></a>
839# [4.10.0](https://github.com/tomchentw/react-google-maps/compare/v4.9.1...v4.10.0) (2016-04-26)
840
841
842### Features
843
844* **package.json:** update to react@^15.0.0 ([4a85cf6](https://github.com/tomchentw/react-google-maps/commit/4a85cf6)), closes [#243](https://github.com/tomchentw/react-google-maps/issues/243)
845
846
847
848<a name="4.9.1"></a>
849## [4.9.1](https://github.com/tomchentw/react-google-maps/compare/v4.9.0...v4.9.1) (2016-02-21)
850
851
852### Bug Fixes
853
854* **componentLifecycleDecorator:** revert to componentWillReceiveProps ([105dc6b](https://github.com/tomchentw/react-google-maps/commit/105dc6b))
855
856
857
858<a name="4.9.0"></a>
859# [4.9.0](https://github.com/tomchentw/react-google-maps/compare/v4.8.2...v4.9.0) (2016-02-21)
860
861
862### Bug Fixes
863
864* **componentLifecycleDecorator:** change componentDidUpdate to componentWillReceiveProps ([b42b58e](https://github.com/tomchentw/react-google-maps/commit/b42b58e))
865
866### Features
867
868* **OverlayView:** add props.bounds support ([dcdfefa](https://github.com/tomchentw/react-google-maps/commit/dcdfefa)), closes [#205](https://github.com/tomchentw/react-google-maps/issues/205) [#206](https://github.com/tomchentw/react-google-maps/issues/206)
869
870
871
872<a name="4.8.2"></a>
873## [4.8.2](https://github.com/tomchentw/react-google-maps/compare/v4.8.1...v4.8.2) (2016-02-21)
874
875
876### Bug Fixes
877
878* **componentLifecycleDecorator:** check _unregisterEvents before calling ([cd2667c](https://github.com/tomchentw/react-google-maps/commit/cd2667c)), closes [#117](https://github.com/tomchentw/react-google-maps/issues/117)
879
880
881
882<a name="4.8.1"></a>
883## [4.8.1](https://github.com/tomchentw/react-google-maps/compare/v4.8.0...v4.8.1) (2016-02-20)
884
885
886### Bug Fixes
887
888* **MarkerClusterer:** typo method name of getAverageCenter ([4f2ad76](https://github.com/tomchentw/react-google-maps/commit/4f2ad76)), closes [#203](https://github.com/tomchentw/react-google-maps/issues/203) [#204](https://github.com/tomchentw/react-google-maps/issues/204)
889
890
891
892<a name="4.8.0"></a>
893# [4.8.0](https://github.com/tomchentw/react-google-maps/compare/v4.7.2...v4.8.0) (2016-02-20)
894
895
896### Features
897
898* **KmlLayer:** add new KmlLayer component ([746af8d](https://github.com/tomchentw/react-google-maps/commit/746af8d))
899
900
901
902<a name="4.7.2"></a>
903## [4.7.2](https://github.com/tomchentw/react-google-maps/compare/v4.7.1...v4.7.2) (2016-01-07)
904
905
906### Bug Fixes
907
908* **OverlayViewCreator:** position container after render ([f5b0a4c](https://github.com/tomchentw/react-google-maps/commit/f5b0a4c)), closes [#167](https://github.com/tomchentw/react-google-maps/issues/167)
909
910
911
912<a name="4.7.1"></a>
913## [4.7.1](https://github.com/tomchentw/react-google-maps/compare/v4.7.0...v4.7.1) (2015-12-30)
914
915
916### Bug Fixes
917
918* **utils:** should use contentElement ([76abbfc](https://github.com/tomchentw/react-google-maps/commit/76abbfc))
919
920
921
922<a name="4.7.0"></a>
923# [4.7.0](https://github.com/tomchentw/react-google-maps/compare/v4.6.2...v4.7.0) (2015-12-07)
924
925
926### Features
927
928* **utils:** add triggerEvent api ([112a1e6](https://github.com/tomchentw/react-google-maps/commit/112a1e6)), closes [#161](https://github.com/tomchentw/react-google-maps/issues/161)
929
930
931
932<a name="4.6.2"></a>
933## [4.6.2](https://github.com/tomchentw/react-google-maps/compare/v4.6.1...v4.6.2) (2015-12-07)
934
935
936### Features
937
938* **SearchBox:** add placeholder props to the underlying input element ([e6a6a02](https://github.com/tomchentw/react-google-maps/commit/e6a6a02)), closes [#115](https://github.com/tomchentw/react-google-maps/issues/115) [#136](https://github.com/tomchentw/react-google-maps/issues/136)
939
940
941
942<a name="4.6.1"></a>
943## [4.6.1](https://github.com/tomchentw/react-google-maps/compare/v4.6.0...v4.6.1) (2015-12-03)
944
945
946### Features
947
948* **GoogleMap:** add warning for undefined google object ([2e0c60b](https://github.com/tomchentw/react-google-maps/commit/2e0c60b)), closes [#142](https://github.com/tomchentw/react-google-maps/issues/142)
949
950
951
952<a name="4.6.0"></a>
953# [4.6.0](https://github.com/tomchentw/react-google-maps/compare/v4.5.1...v4.6.0) (2015-11-22)
954
955
956### Features
957
958* **GoogleMapLoader:** introduce loader to manage React elements ([532816a](https://github.com/tomchentw/react-google-maps/commit/532816a)), closes [#141](https://github.com/tomchentw/react-google-maps/issues/141) [#133](https://github.com/tomchentw/react-google-maps/issues/133)
959* **ScriptjsLoader:** new behavior will render GoogleMapLoader instead ([0f100d8](https://github.com/tomchentw/react-google-maps/commit/0f100d8))
960
961
962### BREAKING CHANGES
963
964* ScriptjsLoader: ScriptjsLoader will delegate to GoogleMapLoader when the script is loaded
965
966Before:
967
968```js
969<ScriptjsLoader
970 hostname={"maps.googleapis.com"}
971 pathname={"/maps/api/js"}
972 query={{v: `3.${ AsyncGettingStarted.version }`, libraries: "geometry,drawing,places"}}
973 loadingElement={
974 <div {...this.props} style={{ height: "100%" }}>
975 <FaSpinner />
976 </div>
977 }
978 googleMapElement={
979 <GoogleMap
980 containerProps={{
981 ...this.props,
982 style: {
983 height: "100%",
984 },
985 }}
986 ref={googleMap => {
987 // Wait until GoogleMap is fully loaded. Related to #133
988 setTimeout(() => {
989 googleMap && console.log(`Zoom: ${ googleMap.getZoom() }`);
990 }, 50);
991 }}
992 defaultZoom={3}
993 defaultCenter={{lat: -25.363882, lng: 131.044922}}
994 onClick={::this.handleMapClick}
995 >
996 <Marker
997 {...this.state.marker}
998 onRightclick={this.handleMarkerRightclick}
999 />
1000 </GoogleMap>
1001 }
1002/>
1003```
1004
1005After:
1006
1007```js
1008<ScriptjsLoader
1009 hostname={"maps.googleapis.com"}
1010 pathname={"/maps/api/js"}
1011 query={{v: `3.${ AsyncGettingStarted.version }`, libraries: "geometry,drawing,places"}}
1012 loadingElement={
1013 <div {...this.props} style={{ height: "100%" }}>
1014 <FaSpinner />
1015 </div>
1016 }
1017 containerElement={
1018 <div {...this.props} style={{ height: "100%" }} />
1019 }
1020 googleMapElement={
1021 <GoogleMap
1022 ref={googleMap => {
1023 googleMap && console.log(`Zoom: ${ googleMap.getZoom() }`);
1024 }}
1025 defaultZoom={3}
1026 defaultCenter={{lat: -25.363882, lng: 131.044922}}
1027 onClick={::this.handleMapClick}
1028 >
1029 <Marker
1030 {...this.state.marker}
1031 onRightclick={this.handleMarkerRightclick}
1032 />
1033 </GoogleMap>
1034 }
1035/>
1036```
1037* GoogleMapLoader: GoogleMap with props.containerProps is now deprecated. Use GoogleMapLoader with props.googleMapElement instead
1038
1039We also suggest switching to callback based ref so that you'll get the component instance when it is mounted.
1040
1041Before:
1042
1043```js
1044<GoogleMap containerProps={{
1045 ...this.props,
1046 style: {
1047 height: "100%",
1048 },
1049 }}
1050 ref="map"
1051 defaultZoom={3}
1052 defaultCenter={{lat: -25.363882, lng: 131.044922}}
1053 onClick={::this.handleMapClick}>
1054 {this.state.markers.map((marker, index) => {
1055 return (
1056 <Marker
1057 {...marker}
1058 onRightclick={this.handleMarkerRightclick.bind(this, index)} />
1059 );
1060 })}
1061</GoogleMap>
1062```
1063
1064After:
1065
1066```js
1067<GoogleMapLoader
1068 containerElement={
1069 <div
1070 {...this.props}
1071 style={{
1072 height: "100%",
1073 }}
1074 />
1075 }
1076 googleMapElement={
1077 <GoogleMap
1078 ref={(map) => console.log(map)}
1079 defaultZoom={3}
1080 defaultCenter={{lat: -25.363882, lng: 131.044922}}
1081 onClick={::this.handleMapClick}>
1082 {this.state.markers.map((marker, index) => {
1083 return (
1084 <Marker
1085 {...marker}
1086 onRightclick={this.handleMarkerRightclick.bind(this, index)} />
1087 );
1088 })}
1089 </GoogleMap>
1090 }
1091/>
1092```
1093
1094
1095
1096<a name="4.5.1"></a>
1097## [4.5.1](https://github.com/tomchentw/react-google-maps/compare/v4.5.0...v4.5.1) (2015-11-21)
1098
1099
1100### Features
1101
1102* **ScriptjsLoader:** check with propTypesElementOfType(GoogleMap) ([e8bb97b](https://github.com/tomchentw/react-google-maps/commit/e8bb97b))
1103
1104
1105
1106<a name="4.5.0"></a>
1107# [4.5.0](https://github.com/tomchentw/react-google-maps/compare/v4.4.1...v4.5.0) (2015-11-21)
1108
1109
1110### Features
1111
1112* **async/ScriptjsLoader:** replacement of async/ScriptjsGoogleMap ([ccfadd4](https://github.com/tomchentw/react-google-maps/commit/ccfadd4)), closes [#145](https://github.com/tomchentw/react-google-maps/issues/145)
1113
1114
1115### BREAKING CHANGES
1116
1117* async/ScriptjsLoader: migrate from async/ScriptjsGoogleMap to async/ScriptjsLoader and changed its behavior from implicit inheritance to simple delegation
1118
1119To migrate the code follow the example below (extracted from examples/gh-pages migration):
1120
1121Before:
1122
1123```js
1124<ScriptjsLoader
1125 hostname={"maps.googleapis.com"}
1126 pathname={"/maps/api/js"}
1127 query={{v: `3.exp`, libraries: "geometry,drawing,places"}}
1128 //
1129 // <GoogleMap> props
1130 defaultZoom={3}
1131 defaultCenter={{lat: -25.363882, lng: 131.044922}}
1132 onClick={::this._handle_map_click}
1133/>
1134```
1135
1136After:
1137
1138```js
1139<ScriptjsLoader
1140 hostname={"maps.googleapis.com"}
1141 pathname={"/maps/api/js"}
1142 query={{v: `3.exp`, libraries: "geometry,drawing,places"}}
1143 //
1144 googleMapElement={
1145 <GoogleMap
1146 defaultZoom={3}
1147 defaultCenter={{lat: -25.363882, lng: 131.044922}}
1148 onClick={::this._handle_map_click}
1149 />
1150 }
1151/>
1152```
1153
1154
1155
1156<a name="4.4.1"></a>
1157## [4.4.1](https://github.com/tomchentw/react-google-maps/compare/v4.4.0...v4.4.1) (2015-11-19)
1158
1159
1160### Bug Fixes
1161
1162* **Marker:** remove from MarkerClusterer ([f4e0696](https://github.com/tomchentw/react-google-maps/commit/f4e0696)), closes [#154](https://github.com/tomchentw/react-google-maps/issues/154) [#153](https://github.com/tomchentw/react-google-maps/issues/153)
1163
1164
1165
1166<a name="4.4.0"></a>
1167# [4.4.0](https://github.com/tomchentw/react-google-maps/compare/v4.3.3...v4.4.0) (2015-11-19)
1168
1169
1170### Features
1171
1172* **MarkerClusterer:** Support for MarkerClusterPlus API ([d56551c](https://github.com/tomchentw/react-google-maps/commit/d56551c)), closes [#146](https://github.com/tomchentw/react-google-maps/issues/146)
1173
1174
1175
1176<a name="4.3.3"></a>
1177## [4.3.3](https://github.com/tomchentw/react-google-maps/compare/v4.3.2...v4.3.3) (2015-11-18)
1178
1179
1180### Bug Fixes
1181
1182* **OverlayView:** redraw only when props.mapPaneName changes ([ff4473d](https://github.com/tomchentw/react-google-maps/commit/ff4473d)), closes [#147](https://github.com/tomchentw/react-google-maps/issues/147) [#148](https://github.com/tomchentw/react-google-maps/issues/148)
1183
1184
1185
1186<a name="4.3.2"></a>
1187## [4.3.2](https://github.com/tomchentw/react-google-maps/compare/v4.3.1...v4.3.2) (2015-11-17)
1188
1189
1190### Bug Fixes
1191
1192* **async/ScriptjsGoogleMap:** switch to _.isEqual for key comparasion ([0a1df35](https://github.com/tomchentw/react-google-maps/commit/0a1df35)), closes [#143](https://github.com/tomchentw/react-google-maps/issues/143)
1193
1194
1195
1196<a name="4.3.1"></a>
1197## [4.3.1](https://github.com/tomchentw/react-google-maps/compare/v4.3.0...v4.3.1) (2015-11-16)
1198
1199
1200### Bug Fixes
1201
1202* **package.json:** scriptjs should exist in dependencies ([4f3304c](https://github.com/tomchentw/react-google-maps/commit/4f3304c))
1203
1204
1205
1206<a name="4.3.0"></a>
1207# [4.3.0](https://github.com/tomchentw/react-google-maps/compare/v4.2.1...v4.3.0) (2015-11-16)
1208
1209
1210### Features
1211
1212* **ScriptjsGoogleMap:** add "scriptjs" support ([b80b731](https://github.com/tomchentw/react-google-maps/commit/b80b731))
1213
1214
1215
1216<a name="4.2.1"></a>
1217## [4.2.1](https://github.com/tomchentw/react-google-maps/compare/v4.2.0...v4.2.1) (2015-11-16)
1218
1219
1220### Bug Fixes
1221
1222* **OverlayView:** switch to ReactDOM ([51fe680](https://github.com/tomchentw/react-google-maps/commit/51fe680)), closes [#140](https://github.com/tomchentw/react-google-maps/issues/140)
1223* **OverlayView:** use ReactDOM for unmountComponentAtNode ([735eba0](https://github.com/tomchentw/react-google-maps/commit/735eba0)), closes [#137](https://github.com/tomchentw/react-google-maps/issues/137)
1224
1225
1226
1227<a name="4.2.0"></a>
1228# [4.2.0](https://github.com/tomchentw/react-google-maps/compare/v4.1.1...v4.2.0) (2015-10-15)
1229
1230
1231### Bug Fixes
1232
1233* **src:** replace fbjs dependencies with can-use-dom ([43250b3](https://github.com/tomchentw/react-google-maps/commit/43250b3)), closes [#134](https://github.com/tomchentw/react-google-maps/issues/134)
1234
1235
1236
1237<a name="4.1.1"></a>
1238## [4.1.1](https://github.com/tomchentw/react-google-maps/compare/v4.1.0...v4.1.1) (2015-10-14)
1239
1240
1241### Bug Fixes
1242
1243* **src:** switch to findDOMNode from "react-dom" ([593b1c8](https://github.com/tomchentw/react-google-maps/commit/593b1c8)), closes [#132](https://github.com/tomchentw/react-google-maps/issues/132)
1244
1245
1246
1247<a name="4.1.0"></a>
1248# [4.1.0](https://github.com/tomchentw/react-google-maps/compare/v4.0.0...v4.1.0) (2015-10-13)
1249
1250
1251### Features
1252
1253* **src:** move instance creation in componentWillMount ([91d5790](https://github.com/tomchentw/react-google-maps/commit/91d5790))
1254* **src:** update composeOptions to accept controlledPropTypes for _2 ([03aee4d](https://github.com/tomchentw/react-google-maps/commit/03aee4d))
1255
1256
1257
1258<a name="4.0.0"></a>
1259# [4.0.0](https://github.com/tomchentw/react-google-maps/compare/v3.0.0...v4.0.0) (2015-10-08)
1260
1261
1262### Features
1263
1264* **package.json:** upgrade to React@^0.14 ([443a5fd](https://github.com/tomchentw/react-google-maps/commit/443a5fd)), closes [#127](https://github.com/tomchentw/react-google-maps/issues/127) [#102](https://github.com/tomchentw/react-google-maps/issues/102)
1265
1266
1267### BREAKING CHANGES
1268
1269* * __React@^0.14__: upgrade React in peerDependencies
1270 * add __react-dom@^0.14__ to peerDependencies
1271
1272
1273
1274<a name"3.0.0"></a>
1275## 3.0.0 (2015-09-30)
1276
1277
1278#### Bug Fixes
1279
1280* **package.json:** remove react from dependencies ([bfd37877](https://github.com/tomchentw/react-google-maps/commit/bfd37877), closes [#109](https://github.com/tomchentw/react-google-maps/issues/109))
1281
1282
1283<a name"2.2.0"></a>
1284## 2.2.0 (2015-09-30)
1285
1286
1287#### Bug Fixes
1288
1289* **Marker:** allow null and undefined as children ([17daa0a2](https://github.com/tomchentw/react-google-maps/commit/17daa0a2), closes [#119](https://github.com/tomchentw/react-google-maps/issues/119))
1290
1291
1292<a name"2.1.1"></a>
1293### 2.1.1 (2015-09-30)
1294
1295
1296#### Bug Fixes
1297
1298* **InfoBox:** typo when update InfoBox children ([a66852c4](https://github.com/tomchentw/react-google-maps/commit/a66852c4), closes [#120](https://github.com/tomchentw/react-google-maps/issues/120))
1299
1300
1301<a name"2.1.0"></a>
1302## 2.1.0 (2015-09-08)
1303
1304
1305#### Features
1306
1307* **SearchBox:** Support for Google Places API search box ([b06f5d6c](https://github.com/tomchentw/react-google-maps/commit/b06f5d6c), closes [#110](https://github.com/tomchentw/react-google-maps/issues/110))
1308
1309
1310<a name"2.0.3"></a>
1311### 2.0.3 (2015-08-18)
1312
1313
1314#### Bug Fixes
1315
1316* **OverlayView:**
1317 * add invariant for mapPaneName ([f102577c](https://github.com/tomchentw/react-google-maps/commit/f102577c))
1318 * add invariant checking for position props ([757bda08](https://github.com/tomchentw/react-google-maps/commit/757bda08))
1319 * add position to propTypes ([1fc968ad](https://github.com/tomchentw/react-google-maps/commit/1fc968ad), closes [#99](https://github.com/tomchentw/react-google-maps/issues/99))
1320* **package.json:** remove object-path ([ee55b7a5](https://github.com/tomchentw/react-google-maps/commit/ee55b7a5))
1321
1322
1323<a name"2.0.2"></a>
1324### 2.0.2 (2015-08-08)
1325
1326
1327#### Bug Fixes
1328
1329* **GoogleMap:** remove propTypes validation on children ([0e417015](https://github.com/tomchentw/react-google-maps/commit/0e417015))
1330* **OverlayView:** props.{default}mapPaneName should not be required ([702a5710](https://github.com/tomchentw/react-google-maps/commit/702a5710))
1331
1332
1333<a name"2.0.1"></a>
1334### 2.0.1 (2015-08-08)
1335
1336
1337#### Bug Fixes
1338
1339* **Rectangle:** remove unnecessary underscore ([13312273](https://github.com/tomchentw/react-google-maps/commit/13312273), closes [#90](https://github.com/tomchentw/react-google-maps/issues/90))
1340
1341
1342<a name"2.0.0"></a>
1343## 2.0.0 (2015-08-07)
1344
1345
1346#### Features
1347
1348* **InfoWindow:** add ReactElement child as content support ([2c0dc026](https://github.com/tomchentw/react-google-maps/commit/2c0dc026), closes [#69](https://github.com/tomchentw/react-google-maps/issues/69))
1349* **Rectangle:** add new componet ([4511d87d](https://github.com/tomchentw/react-google-maps/commit/4511d87d), closes [#80](https://github.com/tomchentw/react-google-maps/issues/80))
1350
1351
1352#### Breaking Changes
1353
1354* This commit rewrite this module from scratch.
1355
1356* GoogleMaps -> GoogleMap
1357 - (Others Component names are the same)
1358* OverlayView
1359 - Now only accepts single child
1360* Remove asynchronous loading support
1361* The props are not directly served as options for all google.maps instance.
1362 - Instead, we convert setters to props and also expose getters on component instance.
1363* To set an option directly, you can now pass options object
1364 just the same way as using Google Maps JavaScript APIs.
1365* Expose props have two representation: controlled & uncontrolled
1366 - uncontrolled props will have a `default${ PropName }` name
1367 - controlled props will be `${ propName }` as you expected
1368* Uncontrolled props will be used only when the instance first mounted
1369* Controlled props will call its corresponding setters **every** time rendered
1370
1371MIGRATION GUIDE:
1372
1373It introduces **controlled property** concept into the module. Most of the case, your application would like to have **uncontrolled** property. So change your component like this:
1374
1375Before (v1.x.x):
1376
1377```js
1378<Marker
1379 key={this.props.key}
1380 position={this.props.position}
1381 animation={this.props.animation}
1382 onRightclick={this.handleMarkerRightclick} />
1383```
1384
1385After (v2.x.x):
1386
1387```js
1388<Marker
1389 key={this.props.key}
1390 defaultPosition={this.props.position}
1391 defaultAnimation={this.props.animation}
1392 onRightclick={this.handleMarkerRightclick} />
1393```
1394
1395The properties with *default-* prefix is **uncontrolled** property. It will only be set **ONCE** when the component is first-time mounted. Any further changes to your React props/state will **NOT** affect this marker (So it's **uncontrolled** from the view of React). Who can change the marker, you may ask. The answer is, only the component from google.maps.
1396
1397But sometimes, we may want the marker's position changed according to current state. In that case, you have to provide **controlled** property to the `<Marker [position={this.state.position}>`. By doing so, the marker's position will change *every* time the React props/state changes. However, it will not intercept the changes made by the component from google.maps. This is because for the `<Marker>` itself, it doesn't know what events from google.maps will change its component. So the consumer who uses "react-google-maps" will have to manually handle this in their codebase.
1398
1399 ([081d03f1](https://github.com/tomchentw/react-google-maps/commit/081d03f1))
1400
1401
1402<a name"1.7.1"></a>
1403### 1.7.1 (2015-07-01)
1404
1405
1406#### Bug Fixes
1407
1408* **src:** eslint rules ([012faada](https://github.com/tomchentw/react-google-maps/commit/012faada))
1409
1410
1411## 1.7.0 (2015-06-19)
1412
1413
1414#### Features
1415
1416* **GoogleMaps:** specify map bounds via declarative props.bounds ([b1333c52](https://github.com/tomchentw/react-google-maps/commit/b1333c529fc4b338cef425dba9b4ba7d33937d29), closes [#64](https://github.com/tomchentw/react-google-maps/issues/64))
1417
1418
1419## 1.6.0 (2015-06-19)
1420
1421
1422#### Features
1423
1424* **OverlayView:** add OverlayView component by @petebrowne ([f0c56ecb](https://github.com/tomchentw/react-google-maps/commit/f0c56ecb06a452c3f942f4c1596e9bf6d76f70aa), closes [#63](https://github.com/tomchentw/react-google-maps/issues/63))
1425
1426
1427### 1.5.1 (2015-06-17)
1428
1429
1430## 1.5.0 (2015-06-17)
1431
1432
1433#### Bug Fixes
1434
1435* **VirtualContainer:** propTypes.children should be renderable ([a3d73af4](https://github.com/tomchentw/react-google-maps/commit/a3d73af4c209765eb7ae0ead70e9d3be8afd2ffa))
1436
1437
1438#### Features
1439
1440* **GoogleMaps:** render VirtualContainer as children ([c9e19828](https://github.com/tomchentw/react-google-maps/commit/c9e19828ecf4f35d78f1a0b34bfc6cbe7b1b1780), closes [#61](https://github.com/tomchentw/react-google-maps/issues/61))
1441
1442
1443## 1.4.0 (2015-06-17)
1444
1445
1446#### Bug Fixes
1447
1448* **SimpleChildComponent:** Make sure to only animate markers on the first run. ([65aec078](https://github.com/tomchentw/react-google-maps/commit/65aec0784f833061eeaad7be00d979a0a417330e))
1449* **src:** eslint issues ([adf3764b](https://github.com/tomchentw/react-google-maps/commit/adf3764b6264e2740c5e3e6e8caf56b3c6732300))
1450
1451
1452### 1.3.1 (2015-05-21)
1453
1454
1455## 1.3.0 (2015-05-21)
1456
1457
1458#### Features
1459
1460* **InfoBox:** Support for InfoBox ([613e5ef5](https://github.com/tomchentw/react-google-maps/commit/613e5ef5c517f4db601e13524586a5195b9f967b))
1461
1462
1463## 1.2.0 (2015-05-15)
1464
1465
1466#### Features
1467
1468* **DrawingManager:** Support for Drawing API ([9b3cbeba](https://github.com/tomchentw/react-google-maps/commit/9b3cbeba5ac4d1ebb83c4ed61dadd49ca8ef7c33))
1469* **SimpleChildComponent:**
1470 * use warning from react/lib/warning ([680c194d](https://github.com/tomchentw/react-google-maps/commit/680c194d70485e49f5498d8777a73e80f3f4f73b))
1471 * Add warning text ([9652e0c7](https://github.com/tomchentw/react-google-maps/commit/9652e0c7b231f0569c522add87034dad214a9235))
1472
1473
1474### 1.1.2 (2015-05-06)
1475
1476
1477#### Bug Fixes
1478
1479* **GoogleMaps:** constructor should use spread operator ([d8e30af6](https://github.com/tomchentw/react-google-maps/commit/d8e30af69dc411cc5a2d5f8cb0239a4669b1c693))
1480* **SimpleChildComponent:** prevent removal of child during update ([834d399b](https://github.com/tomchentw/react-google-maps/commit/834d399b3c39045d8406b5db50edf4618aa2b67a))
1481
1482
1483### 1.1.1 (2015-05-01)
1484
1485
1486#### Bug Fixes
1487
1488* **VirtualContainer:** preserve ref for React.cloneElement ([3d3be964](https://github.com/tomchentw/react-google-maps/commit/3d3be964111b969bad9a1f5052f4aae8e3cc3637))
1489
1490
1491## 1.1.0 (2015-04-30)
1492
1493
1494#### Features
1495
1496* **GoogleMaps:**
1497 * get rid of mapProps ([7e338c2a](https://github.com/tomchentw/react-google-maps/commit/7e338c2add01fdb63441e023e5da25db905b9c4c))
1498 * render child components inside VirtualContainer ([f07eb4b4](https://github.com/tomchentw/react-google-maps/commit/f07eb4b47605a4bc2752f60306ae4e5f8395bc64))
1499
1500
1501#### Breaking Changes
1502
1503* mapProps is no longer needed
1504
1505 since map children components are now rendered inside a virtual
1506 container, we don't need funky wrapper div anymore.
1507
1508 Before:
1509
1510 <div {...props.containerProps} ref="googleMaps" />
1511 <div {...props.mapProps} ref="googleMaps" />
1512 </div>
1513
1514 After:
1515
1516 <div {...props.containerProps} ref="googleMaps" />
1517
1518 ([7e338c2a](https://github.com/tomchentw/react-google-maps/commit/7e338c2add01fdb63441e023e5da25db905b9c4c))
1519
1520
1521### 1.0.1 (2015-04-30)
1522
1523
1524#### Bug Fixes
1525
1526* **Marker:** dont wrap children inside noscript tag ([5d9bbf0a](https://github.com/tomchentw/react-google-maps/commit/5d9bbf0a805d726711d1a97b034bbf813b54ee4c))
1527* **package.json:** test ([7b54b54e](https://github.com/tomchentw/react-google-maps/commit/7b54b54e0cd432fb6683d1c7558f62104e8c07e2))
1528
1529
1530## 1.0.0 (2015-04-28)
1531
1532
1533#### Bug Fixes
1534
1535* **package.json:** add peerDependencies ([15166996](https://github.com/tomchentw/react-google-maps/commit/1516699617da603dd9dc7e51528a3dd827470617))
1536
1537
1538#### Features
1539
1540* **src:** rewrite with new API ([a525d5f2](https://github.com/tomchentw/react-google-maps/commit/a525d5f2a074506ad0a9a50fd58d77ecfc4318f9))
1541
1542
1543### 0.2.5 (2015-03-11)
1544
1545
1546#### Features
1547
1548* **Map:**
1549 * add support for DirectionsRenderer ([0102184a](https://github.com/tomchentw/react-google-maps/commit/0102184a5dfa58392f70686b810734953e4d008c))
1550 * add Circle support ([8a8d4d50](https://github.com/tomchentw/react-google-maps/commit/8a8d4d50563b83d98929aacff72a1dcf8708a7e7))
1551
1552
1553### 0.2.4 (2014-12-16)
1554
1555
1556#### Features
1557
1558* **Map:** expose fitBounds as public API ([c64da722](https://github.com/tomchentw/react-google-maps/commit/c64da7225c0ed88a03104d34a7cbd2bdbe46b22a))
1559
1560
1561### 0.2.3 (2014-11-27)
1562
1563
1564### 0.2.2 (2014-11-20)
1565
1566
1567#### Bug Fixes
1568
1569* **Map:** only pass id, className and style from props ([284ab299](https://github.com/tomchentw/react-google-maps/commit/284ab2991a7be95afa2b612ef7c8ca0b5faa8861))
1570
1571
1572### 0.2.1 (2014-11-20)
1573
1574
1575## 0.2.0 (2014-11-20)
1576
1577
1578#### Bug Fixes
1579
1580* **ChildMixin:** remove invalid_context and duplicated contextTypes ([80110a23](https://github.com/tomchentw/react-google-maps/commit/80110a23d3fb7e2fd8d4dd0258207a6312912c9c))
1581* **EventBindingMixin:** pass instance when binding/unbinding ([bb922794](https://github.com/tomchentw/react-google-maps/commit/bb9227940a7b6b6e4394878fe48e49f623f88759))
1582* **GoogleMapsMixin:** respond to update of googleMapsApi ([3b0a0e07](https://github.com/tomchentw/react-google-maps/commit/3b0a0e07bda3263343d41ed90514e25511940309))
1583* **InfoWindow:**
1584 * event names ([abb9ad3f](https://github.com/tomchentw/react-google-maps/commit/abb9ad3f1dc0a367145d0c9397f1ec635badb2fe))
1585 * check owner props before getting ref ([9022d48f](https://github.com/tomchentw/react-google-maps/commit/9022d48fb45679a19145c85ac601b41fdc5dca4d))
1586* **Map:**
1587 * bind event once to component instance ([fe2665ae](https://github.com/tomchentw/react-google-maps/commit/fe2665aebd10d908b6a49b1dacbce3b7650ae804))
1588 * add api loaded state to _initialized ([0e0192ba](https://github.com/tomchentw/react-google-maps/commit/0e0192ba47cc84f3174435538e7ac4fa7c126ec4))
1589* **Marker:** event listeners ([f878c002](https://github.com/tomchentw/react-google-maps/commit/f878c0023daeb076e3becc618cdef464997de257))
1590* **Polygon:** event listeners ([5f98d0e1](https://github.com/tomchentw/react-google-maps/commit/5f98d0e1905d5d5b72c538bef70843519e982541))
1591* **create_child_component:** event binding for child components ([f4b1b022](https://github.com/tomchentw/react-google-maps/commit/f4b1b022eec885fe7ca9c17cebe24fa33c5b7a8d))
1592* **expose_getters_from:** should iterate all keys in prototype chain ([5a89ed1c](https://github.com/tomchentw/react-google-maps/commit/5a89ed1c78c7e20dbe6bceb7dcc7a6f2e9118f71))
1593
1594
1595#### Features
1596
1597* **ChildMixin:**
1598 * expose instance getters from prototype ([bad5456f](https://github.com/tomchentw/react-google-maps/commit/bad5456f3139933a7c51eb11b4abcc147489abd0))
1599 * add invalid_context to check before operations ([5d33c309](https://github.com/tomchentw/react-google-maps/commit/5d33c3093f5040ee9502c85743c3c6457d8ca242))
1600 * make Map and Marker use context apis ([9514b484](https://github.com/tomchentw/react-google-maps/commit/9514b4843453f00795e4bb685a4c8f341b77d98b))
1601* **EventBindingMixin:**
1602 * move event names definition to caller ([4c5ca5d1](https://github.com/tomchentw/react-google-maps/commit/4c5ca5d11f7ce0fea3fce2ff0d286719931520c7))
1603 * hook to correct lifecycle events ([4ef9fdea](https://github.com/tomchentw/react-google-maps/commit/4ef9fdead0b0dd430e4ae2cd4abb0e9b49927b44))
1604 * extract event binding part out ([c12ddd4a](https://github.com/tomchentw/react-google-maps/commit/c12ddd4a7420e48004baafc6bb2fbbf38632a9a5))
1605* **GoogleMap:**
1606 * hookup event listeners to map instance ([ff1a7a8a](https://github.com/tomchentw/react-google-maps/commit/ff1a7a8acf7534e61036ec6cf2c75b5a79918143))
1607 * initialize google map component ([80e7fd84](https://github.com/tomchentw/react-google-maps/commit/80e7fd841988c1fc61a0ecf8bc0f46ffd70fcc21))
1608* **GoogleMapsMixin:**
1609 * move into mixins subfolder ([0f10be83](https://github.com/tomchentw/react-google-maps/commit/0f10be83d7805f69f1bc5c16c89b49de3ef56c0d))
1610 * create mixin for context usage ([526ca9d8](https://github.com/tomchentw/react-google-maps/commit/526ca9d8c8cc561f9d9a84a2b4ef10a43d84e862))
1611* **InfoWindow:** component with example ([e227edf8](https://github.com/tomchentw/react-google-maps/commit/e227edf8af2e440e498544469d306ff1eecbc38b))
1612* **Map:**
1613 * expose panBy, panTo and panToBounds as public interfaces ([6ccd1284](https://github.com/tomchentw/react-google-maps/commit/6ccd12849ec89f0ed0c1a6211c21c47ca89107c1))
1614 * stateless map component ([3d3aa153](https://github.com/tomchentw/react-google-maps/commit/3d3aa1538131b35e0ae5aa702b521899a27ed919))
1615 * configureable id, className and style ([420e83bb](https://github.com/tomchentw/react-google-maps/commit/420e83bbb19a5f5c951a6f2f73da564ddfc04c6f))
1616 * setOptions when componentDidUpdate ([8d07bd34](https://github.com/tomchentw/react-google-maps/commit/8d07bd3410da97ec330db9d4a188e7d108218813))
1617 * extract out Map component ([8c5429c7](https://github.com/tomchentw/react-google-maps/commit/8c5429c7ef913a812929eaa72a74062805895c56))
1618* **Marker:** update options when componentDidUpdate ([0a7e490f](https://github.com/tomchentw/react-google-maps/commit/0a7e490f13af7c22e0a5b54dd5251527a7987964))
1619* **Polygon:** add component and client example ([556b9be9](https://github.com/tomchentw/react-google-maps/commit/556b9be93542a796b5ca447b90d717a193f8d618))
1620* **Polyline:** component with example ([d0b802bb](https://github.com/tomchentw/react-google-maps/commit/d0b802bbf108a73554be67b3f81f1cb0f149f557))
1621* **index:** create common child components by factory ([43b791d2](https://github.com/tomchentw/react-google-maps/commit/43b791d2610fa86083832b8579f25703a01f0ad7))