4

I have coordinates from a user tapping the map on the screen. Can I get the GMSPlace from the Google API by using the coordinates. Couldn't find anything in the documents or online that helped.

Thanks

PruitIgoe
  • 6,166
  • 16
  • 70
  • 137
  • Did you ever figure this out? – John Farkerson Jul 14 '16 at 18:40
  • No, never found anything on that. I'm thinking it would be really difficult, the sdk would have to know what map tile you were clicking on, at what resolution on what device, etc. etc. Too many variables probably to be accurate. – PruitIgoe Jul 14 '16 at 18:56

1 Answers1

0

If you tap on a place, you can also get the place id, then use the place id to create a GMSPlace instance like this:

GMSPlacesClient *placeClient = [GMSPlacesClient sharedClient];
[placeClient lookUpPlaceID:placeID callback:^(GMSPlace * _Nullable result, NSError * _Nullable error) {
    if(!error) {
        [self updatePlace:result];
    }else {
        NSLog(@"Error : %@",error.localizedDescription);
    }
}];
Mihai Chelaru
  • 7,614
  • 14
  • 45
  • 51