I have a basic map example with a button that on click will change map zoom and center. The button works as intended on load.
However, once you pan the map or use the built-in zoom controls the map stops listening to the state events. When you try the button event after zooming in with controls, the map fails to respond and update.
Anyone else experience this? Some sample code to reproduce is below...
handleClick() {
this.setState(update(this.state, {
zoom: 12,
center: {lat: 44, lng: 13}
}));
},
render() {
<div onClick={this.handleClick}>re-zoom</div>
<GoogleMap
center={this.state.center}
zoom={this.state.zoom}>
</GoogleMap>
}
I have a basic map example with a button that on click will change map zoom and center. The button works as intended on load.
However, once you pan the map or use the built-in zoom controls the map stops listening to the state events. When you try the button event after zooming in with controls, the map fails to respond and update.
Anyone else experience this? Some sample code to reproduce is below...