I queried a set of coordinates for users around me from Parse(PFGeoPoint) and I have created annotations for said locations/coordinates. I will be updating the users location every 5 seconds and updating the location of the annotations, everything is working fine except for the fact that I'm having to remove and add annotations instead of them moving on their own similar to lyft, is there a way to do this in swift? please reply, thank you!!
Asked
Active
Viewed 4,113 times
1 Answers
1
Yes it is. As I can see from your tags, you are using MKPointAnnotation
, so you an access its coordinate
property and update it as you wish.
var coordinate: CLLocationCoordinate2D
So all you have to do is set it up like this:
annotation.coordinate = newCoordinate
For more information, please look at Accessing the Annotation’s Location.

Fengson
- 4,751
- 8
- 37
- 62
-
can you please show some code so i can better understand your answer? thank you! – Eric Prieto May 07 '15 at 06:36