Re: MKMapView: Can't keep annotations from flashing during an update. Ideas?
Re: MKMapView: Can't keep annotations from flashing during an update. Ideas?
- Subject: Re: MKMapView: Can't keep annotations from flashing during an update. Ideas?
- From: Joe Wollard <email@hidden>
- Date: Tue, 26 Jun 2012 22:38:05 -0400
Out of curiosity, why are you manually removing them in the first place? MKMapView should be handling that logic for you as I understand it. If its for performance, the docs say to make sure you dequeue the MKAnnotationView instead of creating a new one when possible so that it can reuse the views intelligently.
Im working on a problem where I've got around 30-40k annotations on the map and of course performance is terrible when they are all visible at the same time. I'm looking into ways to only drop one pin per x pixels so that fewer pins that are near each other are visible when zoomed out and more pins are visible when zoomed in. If that's similar to the problem you're trying to address, I'd be interested in your findings as I can't seem to come up with anything that doesn't involve a bunch of overhead and rect calculations.
---
Joe Wollard
On Jun 26, 2012, at 8:48 PM, Gavin Stokes <email@hidden> wrote:
> After the user drags the map, I do a query and update the pins on it. To
> prevent flashing of all the pins, I add the new (complete) collection of
> annotations before removing the old ones. I call addAnnotations before
> removeAnnotations.
>
> But the pins still flash. The map goes completely blank before the updated
> collection appears.
>
> Anybody know why? Thanks for any insight!
>
> Gavin
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden