Question

I want to develop my own maps app. I have been successful in getting a street address at the point of touch on my iPhone using CLGeocoder. Now my question is the following:

  1. I know that you can get information about a place by using a URL like https://maps.google.com/?q=37.324599,-122.031844
  2. If you click on the above URL, it will take you near a church in Cupertino. Now CLGeocoder will only give me its street address i.e. 10110 N De Anza Blvd Cupertino, CA 95014 (I get this). But how to get the actual name i.e. St Joseph of Cupertino Church and Parish?
  3. We can see it on Google Maps that means they must have it stored somewhere right?

Is there any way to access those place names (Not just by CLGeoCoder, any way is fine).

Was it helpful?

Solution

The GeoCoding API in general is for converting between street addresses and coordinates. If you want place names you can probably use the Places API.

(I know this is more of a comment than an answer, but I think I don't have enough reputation points to comment on questions yet)

OTHER TIPS

YOu need t odo like this way after getting lat long use this code by CLLocation manager class

{

CLGeocoder *reverseGeo = [[CLGeocoder alloc] init];

[reverseGeo reverseGeocodeLocation: loc completionHandler: 
 ^(NSArray *placemarks, NSError *error) {

     NSLog(@"%@",[placemarks objectAtIndex:0]);
     for (CLPlacemark *placemark in placemarks) {



         NSLog(@"~~~~~~~~%@",placemark.locality);

     }


 }];

}

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top