Advertise here

Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Animated GPS Location Update?

borg359borg359 Posts: 26Registered Users
edited January 2010 in iOS SDK Development
Hi guys,
I've successfully put together a mapview with a pin annotation representing the users current position that updates at a set interval. When the location manager updates the user's position, the pin annotation disappears and reappears at the new location. Has anyone played with getting the current user's GPS location to update through the use of an animation, like what is done in Apple's offical mapping application? If so, I'd love some pointers to get this to work. Thanks!

Post edited by borg359 on


  • JeepstonJeepston Posts: 81Registered Users
    edited January 2010
    Put this in the method where you get updated location

    MKCoordinateRegion region;;
        //Set Zoom level using Span
        MKCoordinateSpan span;
        [mapView setRegion:region animated:YES];
    iPhone 2G 8Gb 3.1.2 JB, 3G 16Gb 3.1.2 JB, 3GS 16 Gb 3.1.2 JB<br />
    MB5,1 C2D 2GHz 2GB RAM<br />
    Mac OS X 10.5.8
  • borg359borg359 Posts: 26Registered Users
    edited January 2010
    Sorry that I wasn't more specific, I'm trying to get the GPS location annotation to animate, not the map center. I'm trying to replicate the behavior that you see in Apple's mapping program, where the blue GPS annotation smoothly moves when the location is updated.

    I think this can be done by manually adding the GPS icon as an image subview and moving it using a Quartz animation, but I was hoping there was an easier way of doing this that I've overlooked.
Sign In or Register to comment.