I started to use great package react-google-maps. Could you help me how can I get the values of latitude and longitude from inserted (clicked) marker?
If I log returned object I get scope which consist of latitude and longitude.. but I can not access to scopes..
I use something like this example https://tomchentw.github.io/react-google-maps/ with some changes. I want to store in states latitude and longitude from clicked marker.
Thank you.
I assume that you want to get the list of longitude/latitude from the list of
Marker
withinstate
. Assumingarr
is an array ofMarker
from google map:arr.map(x => x.position.lat())
will give you the latitude.arr.map(x => x.position.long())
will give you the longitude