fysoul17 / google_maps_place_picker

Place picker on Google Maps for Flutter
MIT License
222 stars 357 forks source link

How to get latitude and longitude of selected place or draw a pointer on map using lat lng #65

Open Umar431497 opened 3 years ago

Umar431497 commented 3 years ago

I want to get latitude and longitude of selected place and draw of custom pointer on a desired latitude and longitude

fysoul17 commented 3 years ago

@Umar431497

With the PickResult, you can reference geometry.location for lat and lng.

You may also want to use [selectedPlaceWidgetBuilder] to draw your own selected place indicator. The builder also provides the PickResult, and thus you can grab latitude and longitude.

bshbsh404 commented 3 years ago

using PickResult selectedPlace; you can get the latitude and longitude like this: selectedPlace.geometry.location.lat selectedPlace.geometry.location.lon