rai212
rai212

Reputation: 781

Getting coordinates based in direction in Google Maps/Apple Maps in Objective-C

Is it possible to get coordinates to be used in Google Maps/Apple Maps (depending on iOS versión) based on a given direction? I've got the directoon (street and number), the post code and the country (in my case, the country will always be Spain)

Thank you

Upvotes: 0

Views: 332

Answers (1)

Antonio MG
Antonio MG

Reputation: 20410

You need to use Geocoder for that, find a guide here:

Geocoding Location Data

You can find an example at the end of the document:

[geocoder geocodeAddressString:@"1 Infinite Loop"
     completionHandler:^(NSArray* placemarks, NSError* error){
         for (CLPlacemark* aPlacemark in placemarks)
         {
             // Process the placemark.
         }
}];

As they say, the more info you provide, the more accurate will be.

Upvotes: 1

Related Questions