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

  • Home
  • SEARCH
  • 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 814851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:35:20+00:00 2026-05-15T01:35:20+00:00

This is a weird one, y’all. – (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {

  • 0

This is a weird one, y’all.

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
{

    CLLocationCoordinate2D coordinate = newLocation.coordinate;
    self.mark.longitude = [NSNumber numberWithDouble:coordinate.longitude];
    self.mark.latitude = [NSNumber numberWithDouble:coordinate.latitude];
    NSLog(@"Got %f %f, set %f %f", coordinate.latitude, coordinate.longitude, self.mark.latitude, self.mark.longitude);

    [manager stopUpdatingLocation];
    manager.delegate = nil;

    if (self.waitingForLocation) {
        [self completeUpload];
    }
}

The latitude and longitude in that “mark” object are synthesized parameters referring to NSNumber iVars.

In the simulator, my NSLog output for that line in the middle there reads:

2010-05-28 15:08:46.938 EverWondr[8375:207] Got 37.331689 -122.030731, set 0.000000 -44213283338325225829852024986561881455984640.000000

That’s a WHOLE lot further East than 1 Infinite Loop! The numbers are different on the device, but similar–lat is still zero and long is a very unlikely high negative number.

Elsewhere in the controller I’m accepting a button press and uploading a file (an image I just took with the camera) with its geocoding info associated, and I need that self.waitingForLocation to inform the CLLocationManager delegate that I already hit that button and once its done its deal, it should go ahead and fire off the upload. Thing is, up in the button-click-receiving method, I test see if CL is finished by testing self.mark.latitude, which seems to be getting set zero…

  • 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-05-15T01:35:21+00:00Added an answer on May 15, 2026 at 1:35 am

    You are printing the pointers to the NSNumber objects as floats – that is likely to look quite different.

    Use:

    NSLog(@"Got %f %f, set %@ %@", coordinate.latitude, coordinate.longitude, 
          self.mark.latitude, self.mark.longitude);
    

    … or:

    NSLog(@"Got %f %f, set %f %f", coordinate.latitude, coordinate.longitude, 
          [self.mark.latitude doubleValue], [self.mark.longitude doubleValue]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is a weird one, when I run the following code all rows are
Ok, this is a weird one. The junk data isn't random either, it appears
This is a bit of a weird one, and I could well be coding
This one is weird, I have a page that consists of a html table
This is a weird one. I am using the ExecWB method to create a
This is a weird one, but hopefully someone can give me an idea here.
This is a weird one. Probably painfully obvious. :D I have a View (let's
This is a weird one, and unfortunately I can't test it. At my company
This is a weird one. On and off as I have been working on
Now this is a weird one We have a project where we are reading

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.