I tried:
<GoogleMap
defaultZoom={14}
center={{lat: props.mapCenter.lat, lng: props.mapCenter.lng}}
onCenterChanged={getCenter()}
/>
Update: I am using a Stateless Functional Component
:
const MarkerClustererExampleGoogleMap = withGoogleMap(props => (
<GoogleMap
defaultZoom={14}
center={{lat: props.mapCenter.lat, lng: props.mapCenter.lng}}
onCenterChanged={getCenter()}
>
)
But I get the error:
getCenter is undefined.
How to resolve this problem, Thanks.