-
Notifications
You must be signed in to change notification settings - Fork 813
Description
I'm filtering some data based the visibility of markets in the view area (using getBounds
on the markers lat/longs). I can easily do this for dragging using mapDragEnd
, but is there an action related to the bounds_changed
event? Or some other way to listen to viewport changes/zoom level changes?
I see actions being dynamically defined here
https://github.com/fullstackreact/google-maps-react/blob/master/src/index.js#L174
but onBoundsChanged
does not work.
EDIT:
Hmm, actually, I see my codebase differs from 1.0.18. My package.json says I'm on 1.0.19, and, in this version, all these events do not exist.
I added bounds_changed
here:
# index.js
var evtNames = ['ready', 'click', 'dragend', 'recenter', 'bounds_changed'];
evtNames.forEach(function (e) {
return Map.propTypes[(0, _String.camelize)(e)] = _react.PropTypes.func;
});
and, though the prop is called onBounds_changed
, it's working for me now. Not sure what's up with the version numbers, but I'll try... downgrading(?) to the latest?