Is it possible to get the place id when tapping on a POI (iOS google maps SDK).
For example clicking on a restaurant I would like to bring up some of the information such as reviews and opening times.
Looking at the docs I can see the delegate method mapView(mapView: GMSMapView!, didTapAtCoordinate coordinate: CLLocationCoordinate2D)
but nothing that provides the place id. Im not sure how accurate it would be to try and find the exact place id using just the coordinates.
You can do a Google Places API request to the place ID. You can do the API request by using a coordinate.
Sample API request URL:
In iOS, you can do an API request by
NSURLSession
:You can get a place ID from the JSON response.