Latcie
Latcie

Reputation: 701

Google Places API get coordinates

I have a city place ID, but I need to get latitude and longitude from it.

My method was to let the user search for a place name, hit the API to get a list of suggestions, and when the user selects a single choice, hit the API again to get latitude and longitude.

I can get the place ID, but I can't find anywhere in the API to grab the longitude and latitude from it.

Developing for iOS, if that matters.

Upvotes: 0

Views: 952

Answers (1)

AndrewR
AndrewR

Reputation: 10889

You need to call the lookupPlaceId method of GMSPlacesClient. See Get Place By Id for more details.

Upvotes: 1

Related Questions