Reputation: 3
From the server response comes to me with an update of coordinates every 5 second. This coordinates I add to map like pins. But existing coordinates of current object not removes, it coordinates just add as new. How to update coordinates of current object and remove object that have no coordinates for now?
I use native map. If you give any simple I'll be happy
The response from the server, I receive the coordinates of users if the user is, if not - nothing comes. I need an approach without removing all the coordinates and with management (delete or update), depending on the receipt of a new member eoordinaty or delete it
Upvotes: 0
Views: 107
Reputation: 1296
Use this :
[mapView removeAnnotations:mapView.annotations]
Before adding your annotation.
Hope it works :)
Upvotes: 1