I'd like to pass a property of an element of mine when clicked to the onClick function that I have setup. I don't know how to access the property of the element though. To be specific, I'd like to pass the position property of my Google Map Marker to my onClick function so that I could store the position of the marker that was clicked into an array.
My Marker code looks like this:
<Marker position={{lat:"some value", lng:"some value"}
onClick{()=>markerClick(what do I pass here?)} clickable={true}}
I'd like to pass either the position or, position's lat and lng property. If I try passing position,I get an error stating position not defined. Lat and lng just give me undefined values.
Note: position, clickable are native properties of the Marker element.