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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:09:42+00:00 2026-06-17T18:09:42+00:00

#define LOCATION_DISTANCE 80.4672 – (void)viewDidLoad { [super viewDidLoad]; ….some computation locationManager = [[CLLocationManager alloc]

  • 0
 #define LOCATION_DISTANCE 80.4672
 - (void)viewDidLoad
{
     [super viewDidLoad];
     ....some computation
     locationManager = [[CLLocationManager alloc] init];
    locationManager.delegate = self;
    [locationManager setDesiredAccuracy:kCLLocationAccuracyBestForNavigation];
    [locationManager setDistanceFilter:kCLDistanceFilterNone];
    [locationManager startUpdatingLocation];

    dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 360.0*NSEC_PER_SEC);
    dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
        [locationManager stopUpdatingLocation];

    });
     ..........some more computation
 }
- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
{

  CLLocation *obj = [locations lastObject];
  if (obj.coordinate.latitude != 0 && obj.coordinate.longitude != 0 )
{
    CLLocationCoordinate2D currrentCoordinates ;
    currrentCoordinates.latitude = obj.coordinate.latitude;
    currrentCoordinates.longitude = obj.coordinate.longitude;
 if(obj.horizontalAccuracy>0 && obj.horizontalAccuracy<100){
            self.turnedOffLocationServices =YES;
                [locationManager stopUpdatingLocation];

        } .... more computation
  [self setUpMap:currrentCoordinates];
}
 - (void)setUpMap:(CLLocationCoordinate2D)currentCoordinates
{
      MKCoordinateRegion extentsRegion = MKCoordinateRegionMakeWithDistance(currentCoordinates, LOCATION_DISTANCE, LOCATION_DISTANCE);

MKMapView *mvMap = [[MKMapView alloc] initWithFrame:CGRectMake(20, 594, 360, 347)];
mvMap.delegate = self;
[mvMap setRegion:extentsRegion animated:YES];
mvMap.mapType = MKMapTypeSatellite;
mvMap.autoresizingMask = UIViewAutoresizingNone;
//mvMap.showsUserLocation = YES;
NSLog(@"the current lat is %f", currentCoordinates.latitude);
NSLog(@"the current long val is %f", currentCoordinates.longitude);

[self.scrollView addSubview:mvMap];

ITMAnnotation *annotation = [[ITMAnnotation alloc] initWithCoordinate:currentCoordinates addressDictionary:nil];
annotation.title = @"Drag to Move Pin";
annotation.subtitle = [NSString stringWithFormat:@"%f %f", annotation.coordinate.latitude, annotation.coordinate.longitude];
NSLog(@"subtitle change at 314");

[mvMap addAnnotation:annotation];
self.tempMapView = mvMap;
}

So i have viewDidLoad that creates location manager. I use didUpdateLocations as I think it is supposed to. I call setUpMap method with that co-ordinates and i get a map at the bottom left corner of my ipad screen.
My problems are:1)When in no-wifi/cell mode i don’t get the accurate location. Its way off. But i put in the co-ordinates manually( have text fields which will take this co-ordinates) it works and shows the location.
2)I added suppose 4 records in this no-wifi/no cell mode. I can add 3 fine with map showing( but again different location way off my current location). But on the 4th time(or later some time) when i visit the screen where map should show up is white. Does this make sense. IF you need more information please ask. Thanks.. Oh and all this is on the device NOT simulator. And its iOS6.

  • 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-17T18:09:44+00:00Added an answer on June 17, 2026 at 6:09 pm

    The cell and the GPS are on the same chip so turning the cell off turns off the GPS too. If you just want to stop data transfers but still want GPS then you can turn off Mobile Data under Network settings. You’ll still be able to make calls, but your device can’t download anything (if you turn off wifi too).

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

Sidebar

Related Questions

Ext.define('DigitalPaper.controller.Documents', { extend: 'Ext.app.Controller', views: ['Documents'], stores: ['Documents'], models: ['Documents'], init: function() { console.log('[OK]
I'm wondering if I can define the location of the error queue for my
I have a function defined like this: public static void ShowAbout(Point location, bool stripSystemAssemblies
#define BUF_SIZE 10 char *html = foo:baa\r\nxxx:yyyy:\r\nLocation:........................................\r\Connection:close\r\n\r\n; char *p = (char*)html, *buf, *pbuf, *tbuf;
(define (lcs lst1 lst2) (define (except-last-pair list) (if (pair? (cdr list)) (cons (car list)
#define MAX 100 struct bs{ int ab; int ac; }be; struct s{ be b;
#define HISTORY_SIZE 50 #define INPUT_SIZE 512 /*Max input size*/ char input[INPUT_SIZE]; /*Holding user input
#define __HAVE_ARCH_STRCPY What's the meaning of __HAVE_ARCH ? I'm not a native speaker and
I define a tabs using JQuery <div id=tabs> <ul> <li><a href=#tabs-1>Tab 1</a></li> <li><a href=#tabs-2>Tab
I could use some advice on how to handle errors in my Python script.

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.