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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:21:43+00:00 2026-06-13T21:21:43+00:00

I dont understand why the userLocation doesnt move when i set a costum image

  • 0

I dont understand why the userLocation doesnt move when i set a costum image on it.

If i don’t set an image, it uses the default pin blue and it works; i can see the userlocation moves when the postion changes.

here is my viewForAnnotation taken from an other post.

- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation
{
    static NSString* AnnotationIdentifier = @"Annotation";
    MKPinAnnotationView *pinView = (MKPinAnnotationView *)[mk dequeueReusableAnnotationViewWithIdentifier:AnnotationIdentifier];
    if (!pinView)
    {
        pinView = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:AnnotationIdentifier] autorelease];
        pinView.animatesDrop = NO;
        pinView.canShowCallout = YES;
    }
    else
    {
        pinView.annotation = annotation;
    }

    if (annotation == mk.userLocation)
        pinView.image = [UIImage imageNamed:@"PositionPin.png"];
    else
        pinView.image = [UIImage imageNamed:@"PositionPin.png"];

    return pinView;
}    
  • 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-13T21:21:45+00:00Added an answer on June 13, 2026 at 9:21 pm

    This appears to be a bug in the map view (still present in iOS 6) where the user location coordinates no longer update when a custom annotation view is used (even though documentation suggests it will work).

    A workaround is to use Core Location to get user location updates and create your own annotation (instead of using the map view’s userLocation) and then supplying a custom image for it in viewForAnnotation.

    See the answer to Custom Annotation view for userlocation not moving the mapview for more details and some sample code to implement the workaround.

    In addition, note that when using a custom image for your annotation view, you should use MKAnnotationView instead of MKPinAnnotationView.
    When using MKPinAnnotationView, it sometimes shows its default pin image instead of your custom image.

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

Sidebar

Related Questions

I want to use the status method but i dont understand how it works.
Ok so i dont understand regex checker works in ruby =~ 1.9.2p290 :009 >
I am using Hornetq 2.0 i dont understand how can i know how many
I really dont understand how lastIndexOf works. I could not get the usage of
This code works, but i dont understand why. With DeferredLoadingEnabld = false, I would
I dont understand why a template parameter can be initialized only with a const
i really dont understand what happen here, its works on most of servers but
Im recieving an error that I dont understand using FCM. If I set options
I dont understand how I can import(I dont know the right terminology, so please
I dont understand why my SDL app wont set the DOUBLE_BUF as i'm asking;

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.