Note that there are some explanatory texts on larger screens.

plurals
  1. PO"StopUpdatingLocation" is called but GPS Arrow doesnt disappear
    primarykey
    data
    text
    <p>I don´t understand why the gray gps arrow don´t disappear after stopUpdatingLocation is called. Here is my code:</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. if (self.locationManager == nil) { self.locationManager = [[[CLLocationManager alloc] init]autorelease]; self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; self.locationManager.delegate = self; } CLLocation *location = [self.locationManager location]; CLLocationCoordinate2D coordinate = [location coordinate]; g_lat = coordinate.latitude; g_lng = coordinate.longitude; [self.locationManager startUpdatingLocation]; } </code></pre> <p>And here ist my didUpdateLocation:</p> <pre><code>- (void) locationManager:(CLLocationManager *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { NSLog(@"Core location has a position."); CLLocationCoordinate2D coordinate = [newLocation coordinate]; global_lat = coordinate.latitude; global_lng = coordinate.longitude; [self.locationManager stopUpdatingLocation]; } - (void) locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error { NSLog(@"Core location can't get a fix."); } </code></pre> <p>I also checked if any other app is using GPS! After 20 minutes the Arrow is still there.... Thanks for help!</p> <p><em><strong>EDIT:</em></strong></p> <p>I think i missed something very important, on my first view after the App is started there is a Google Map! This is my Code:</p> <pre><code> GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:g_lat longitude:g_lng zoom:15]; self.mapView = [GMSMapView mapWithFrame:CGRectMake(1.0f, 160.0f, 320.0f, 100) camera:camera]; self.mapView.delegate = self; self.showsUserLocation = YES; self.mapView.trafficEnabled = YES; self.mapView.myLocationEnabled = YES; self.mapView.settings.myLocationButton = YES; self.mapView.settings.compassButton = YES; [self.mapView setUserInteractionEnabled:YES]; [self.mapView setCamera:camera]; [self.containerView addSubview:self.mapView]; </code></pre> <p>Is it possible that the google map is updating all the time? If Yes, how can i stop that?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload