Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8486377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:55:49+00:00 2026-06-10T20:55:49+00:00

I am trying to Reverse geocode location from Lat/Long value that I get earlier

  • 0

I am trying to Reverse geocode location from Lat/Long value that I get earlier in the App and I would like from this coordinate to find the city name, country name and ISO.

I am currently using CLLocationManager to get actual location information with the folowing code:

//Auto geolocation and find city/country
locationManager.delegate=self;

//Get user location
[locationManager startUpdatingLocation];
[self.geoCoder reverseGeocodeLocation: locationManager.location completionHandler: 
 ^(NSArray *placemarks, NSError *error) {

     //Get nearby address
     CLPlacemark *placemark = [placemarks objectAtIndex:0];

     //String to hold address
     locatedAtcountry = placemark.country;
     locatedAtcity = placemark.locality;
     locatedAtisocountry = placemark.ISOcountryCode;

     //Print the location to console
     NSLog(@"Estas en %@",locatedAtcountry);
     NSLog(@"Estas en %@",locatedAtcity);
     NSLog(@"Estas en %@",locatedAtisocountry);

     [cityLabel setText:[NSString stringWithFormat:@"%@,",locatedAtcity]];
     [locationLabel setText:[NSString stringWithFormat:@"%@",locatedAtcountry]];

     //Set the label text to current location
     //[locationLabel setText:locatedAt];

 }];

It is working perfectly but, It is possible to do the same from Long/Lat value that I had already saved in the device and not with the current location like on the actual code ?

Update and solution:

Thanks Mark for the answer, I finally use the following code to get info from saved coordinate:

 CLLocation *location = [[CLLocation alloc] initWithLatitude:37.78583400 longitude:-122.40641700];

[self.geoCoder reverseGeocodeLocation: location completionHandler: 
 ^(NSArray *placemarks, NSError *error) {

     //Get nearby address
     CLPlacemark *placemark = [placemarks objectAtIndex:0];

     //String to hold address
     locatedAtcountry = placemark.country;
     locatedAtcity = placemark.locality;
     locatedAtisocountry = placemark.ISOcountryCode;

     //Print the location to console
     NSLog(@"Estas en %@",locatedAtcountry);
     NSLog(@"Estas en %@",locatedAtcity);
     NSLog(@"Estas en %@",locatedAtisocountry);

     [cityLabel setText:[NSString stringWithFormat:@"%@",locatedAtcity]];
     [locationLabel setText:[NSString stringWithFormat:@"%@",locatedAtcountry]];

     //Set the label text to current location
     //[locationLabel setText:locatedAt];

 }];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:55:51+00:00Added an answer on June 10, 2026 at 8:55 pm

    Yes. Create a CLLocation object using the initWithLatitude:longitude: method using your saved lat/lon values, and pass that to reverseGeocodeLocation:.

    I am surprised that you say this is working (although, if you’re on the simulator, location services are simulated anyway, which might be the reason) because when you call startUpdatingLocation, your implementation of CLLocationManagerDelegate methods like locationManager:didUpdateToLocation:fromLocation: get called. (You’ve implemented these right?) It is only when this (and other) delegate method is called that you can be certain that you have successfully determined the user’s location.

    You may want to read up on the CLLocationManagerDelegate protocol and on Location Services best practices as documented by Apple.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently trying to reverse geocode a series of lat/long co-ordinates using the Virtual
I'm trying to basically reverse this algorithm so that I get the time for
I am trying to Reverse GeoCode current Lat/Long data to just Admin Area and
My URLconf contains this pattern: url(r'^accounts/logout/$','django.contrib.auth.views.logout', name=logout), And I've trying to reverse that in
I am trying to reverse geocode my location using google maps to retrieve my
I'm trying serverside reverse geocoding that can get me a json response and now
I am trying ReverseGeCoding its working but i cant get return value function reverseGeoCode(lat,lng)
I'm trying to reverse engineer how facebook handles their notifications, where when you get
I am trying to get the name of the city of user's current location
I'm trying to reverse engineer (OllyDbg) an application (game) that disables (captures/intercepts/blocks) all global

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.