i set center map lat =0, long =0. then i set center map with my location but map can't update center position.
oh, solved. i take props onReady={(mapProps, map)=>this.fetchPlaces(mapProps, map)} on map. then i create function :
fetchPlaces(mapProps, map) {
var center = new google.maps.LatLng(this.props.lat, this.props.lon);
map.panTo(center);
}
I add this.state.map.setCenter(marker.getPosition()); to marker click event marker.addListener('click', () => {}
Most helpful comment
oh, solved. i take props onReady={(mapProps, map)=>this.fetchPlaces(mapProps, map)} on map. then i create function :
fetchPlaces(mapProps, map) {
var center = new google.maps.LatLng(this.props.lat, this.props.lon);
map.panTo(center);
}