When creating multiple Circles &/or Markers, we can pass events like this:
for (var i = 0; i < data.length; i++) {
dataArr.push(<Circle
key={'data_' + i}
lat={data[i].latitude}
lng={data[i].longitude}
onMouseOver={(ev) => this.onMouseOver(ev)}
...
onClick={this.onClick}>
</Circle>);
using onMouseOver(ev), we can pass event data but there is no useful data being passed at all.
How can I retrieve something like the ID of this circle/marker?
I've tried passing 'this' in as an argument but doing so only returns
Hello @benji011, this library is a React wrapper around the Google Maps API so that all the functionality match 1:1. The onMouseOver event, receives LatLng as described in the official documentation.
When creating multiple Circles &/or Markers, we can pass events like this:
using onMouseOver(ev), we can pass event data but there is no useful data being passed at all. How can I retrieve something like the ID of this circle/marker?
I've tried passing 'this' in as an argument but doing so only returns
refs is empty, and props has nothing to do with the circle being hovered over. How can we retrieve of this specific marker?
EDIT:
Even if its a single marker/circle, data cannot be retrieved. How can we work around this?