ErrorPro / react-google-autocomplete

React components for google places API.
MIT License
473 stars 114 forks source link

Longitude and Latitude #171

Closed Veri5ied closed 2 years ago

Veri5ied commented 2 years ago

The location of longitude and latitude are not accessible. Make it accessible because we need to use it on some components. Now we need extra packages to convert the locations for us

eliaharris commented 2 years ago

You can. It's under geometry.location on the selected place.

 onPlaceSelected={places => {
                            console.log(places.geometry.location.lat())
                            console.log(places.geometry.location.lng())
                        }}
Veri5ied commented 2 years ago

You can. It's under geometry.location on the selected place.

 onPlaceSelected={places => {
                            console.log(places.geometry.location.lat())
                            console.log(places.geometry.location.lng())
                        }}

Yeah I noticed it’s a function. Thank you

Veri5ied commented 2 years ago

Solved