Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-29-2010, 02:50 AM   #1 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 26
Default Animated GPS Location Update?

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!


-dan
borg359 is offline   Reply With Quote
Old 01-29-2010, 04:52 AM   #2 (permalink)
Registered Member
 
Join Date: Apr 2009
Posts: 81
Default

Put this in the method where you get updated location


Code:
   MKCoordinateRegion region;
    region.center=location.coordinate;
    //Set Zoom level using Span
    MKCoordinateSpan span;
    span.latitudeDelta=.002;
    span.longitudeDelta=.002;
    region.span=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
MB5,1 C2D 2GHz 2GB RAM
Mac OS X 10.5.8
Jeepston is offline   Reply With Quote
Old 01-29-2010, 02:50 PM   #3 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 26
Default Need the annotation to animate, not the map

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.
borg359 is offline   Reply With Quote
Reply

Bookmarks

Tags
gps, location, map, update

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 285
16 members and 269 guests
@sandris, ADY, dacapo, Dani77, djohnson, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, timle8n1, tomtom100
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:03 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0