Note that there are some explanatory texts on larger screens.

plurals
  1. POMKMapView not updating user position image
    primarykey
    data
    text
    <p>My MKMapView shows my position at startup but then the image never 'follows' me. The location gets updated and the screen does follow me, but the original "User Location" image stays behind.</p> <p>Here is some code snippets:</p> <pre><code>-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id &lt;MKAnnotation&gt;)annotation { static NSString* AnnotationIdentifier = @"Annotation"; MKPinAnnotationView *pinView = (MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:AnnotationIdentifier]; if(!pinView) { MKPinAnnotationView *customPinView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:AnnotationIdentifier] autorelease]; if(annotation == mapView.userLocation) customPinView.image = [self rotate:[UIImage imageNamed:@"myCar.png"] orientation:UIImageOrientationUp]; else customPinView.image = [UIImage imageNamed:@"randomPin.png"]; customPinView.animatesDrop = NO; customPinView.canShowCallout = YES; return customPinView; } else { pinView.annotation = annotation; } return pinView; } -(void)locationUpdate:(CLLocation *)location { CLLocationCoordinate2D loc = [location coordinate]; if(isFollowing) [myMapView setCenterCoordinate:loc];//Works } </code></pre> <p>and in my <code>viewDidLoad</code> I do call: <code>[myMapView setShowsUserLocation:YES];</code> which does work.</p> <p>So basically somewhere I neglect updating my position or its most possibly where I draw the new image for my current position.</p> <p>Can anyone possibly see what I am missing or doing wrong there for it to not follow my location updates?</p> <p>Thanks. </p>
    singulars
    1. This table or related slice is empty.
    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.
 

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