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 7947763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:31:34+00:00 2026-06-04T01:31:34+00:00

I am trying to use reverse geocode but the function is not executing and

  • 0

I am trying to use reverse geocode but the function is not executing and not really sure why..

Here I attached my code. Thank you for your help

//-- reverse geocode, converting from point to address 
- (BNRMapPoint *)geocodeLocation:(CLLocation *)location title:(NSString *)title

{
    if(!geocoder)
    {
        geocoder = [[CLGeocoder alloc] init];
    }

    __block BNRMapPoint * annotation;

    [self.geocoder reverseGeocodeLocation:location completionHandler: 
     ^(NSArray * placeMarks, NSError * errors)
     {
         NSLog(@"in block code");
         if([placeMarks count] > 0)
         {
             NSLog(@"%@", [placeMarks objectAtIndex:0]);
             annotation = [[BNRMapPoint alloc] initWithCoordinate:location.coordinate title:title
                                                    placeMark:[placeMarks objectAtIndex:0]];
             NSLog(@"%@", annotation.placeMark.name);
         }
         else
         {
             NSLog(@"failed!!");
         }

     }];

    return annotation;
}

it is not printing anything at console.. so I figured it’s not entering the block code.
But I am really confused why it’s not entering. Thank you again for your help

  • 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-04T01:31:35+00:00Added an answer on June 4, 2026 at 1:31 am

    I seem to remember having a problem with NSLog in a block passed to reverseGeocodeLocation. The Geocoder executes on a separate thread, as will the block, I expect. (I’m sure someone will correct me if I’m wrong about that). In my case, I think `UIAlertView worked even in the block code, so you might try that …

    I reviewed your code against an app I have that’s working with reverseGeocodeLocation and I don’t see a problem with your code. The only difference is that I do a check for if (![geocoder isGeocoding])... before I do the reverseGeocode. That’s just to keep geoCoder calls from stacking up, which may not be possible in your app depending on how your code gets called.

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

Sidebar

Related Questions

Here is my program which reverses a string. I am trying to use function
I am really going beserk here. I am trying to reverse the words in
I'm trying to use django's reverse() function in definition of django form for my
Here is my Html code. What I am trying sounds simple but I am
Trying to use this code to connect the AD PrincipalContext context = new PrincipalContext(ContextType.Domain,
I am trying to use GDB's reverse debugging with a Django application. I get
I have several views with @login_required decorator. And I'm going to use django.core.urlresolvers.reverse() function
I seem to have some difficulty trying to use a href template tag. Here
this code compiles in Linux but not Solaris, because apparently ppoll() is Linux specific
I am trying to use the titanium reverseGeocoder but I am having a strange

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.