react-google-maps
Advanced tools
Changelog
5.0.0 (2016-08-04)
Before:
<GoogleMap containerProps={{
...this.props,
style: {
height: "100%",
},
}}
ref="map"
defaultZoom={3}
defaultCenter={{lat: -25.363882, lng: 131.044922}}
onClick={::this.handleMapClick}>
{this.state.markers.map((marker, index) => {
return (
<Marker
{...marker}
onRightclick={this.handleMarkerRightclick.bind(this, index)} />
);
})}
</GoogleMap>
After:
<GoogleMapLoader
containerElement={
<div
{...this.props}
style={{
height: "100%",
}}
/>
}
googleMapElement={
<GoogleMap
ref={(map) => console.log(map)}
defaultZoom={3}
defaultCenter={{lat: -25.363882, lng: 131.044922}}
onClick={::this.handleMapClick}>
{this.state.markers.map((marker, index) => {
return (
<Marker
{...marker}
onRightclick={this.handleMarkerRightclick.bind(this, index)} />
);
})}
</GoogleMap>
}
/>
Now, 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.
<a name="4.11.0"></a>