updating center from parent does not reposition map
sorry, I've searched and can't seem to find the answer.
I'm updating center of map from parent component but the map is not repositioning. What am I missing here?
Cheers
export class GMapReact extends Component {
render() {
console.log("center:", this.props.center);
return (
<GoogleMap
bootstrapURLKeys={{ key: [GOOGLE_API_KEY] }}
center={this.props.center}
zoom={this.props.zoom}
>
{this.props.markers.map((marker, i) => {
return (
<MarkerComponent
key={i}
lat={marker.latitude}
lng={marker.longitude}
text={marker.name}
/>
)
})}
</GoogleMap>
);
}
}