-
Notifications
You must be signed in to change notification settings - Fork 818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Map onDragStart/onDragEnd not firing #323
Comments
For anyone else who ends up here, I'm currently getting around this by setting up event listeners by hand inside my handleMapReady = (mapProps, map) => {
map.addListener('projection_changed', () => {
Map.instance = map;
this.setState({ projectionAvailable: true });
});
map.addListener('dragend', () => {
console.log({ lat: map.center.lat(), lng: map.center.lng() });
});
console.warn('Map is ready. Setting projection and map type.');
return map.setMapTypeId && map.setMapTypeId(this.props.type);
}; |
The event prop is called onDragend, not onDragEnd, isn't it? |
There is an error in the code. All events are camelized but only taking whitespaces in account. |
Please see my comment how to use it here #518 |
version: 9.4.5
Map
doesn't seem to supportonDragEnd
oronDragStart
-they aren't being called no matter what I try.onMapReady
andonClick
both seem to work.The text was updated successfully, but these errors were encountered: