Best practice to display POI in iPhone's MapKit?
Posted
by iamj4de
on Stack Overflow
See other posts from Stack Overflow
or by iamj4de
Published on 2010-04-11T03:07:33Z
Indexed on
2010/04/11
3:13 UTC
Read the original article
Hit count: 558
Assuming I have a database of POI with their respective coordinates (longitude & latitude). What would be the "standard" way to display the POI as annotations around the user's current location? To elaborate:
- Given a zoom level, I guess I have to search through the database for all POI whose distance to the current location < a certain threshold, then create annotations for them. Or is there any smarter way?
- If the user zooms in/out, moves the map... I will need to redo the whole thing again?
- It seems that MapKit has a mechanism to cache/reuse annotations. Should I create a lot of them right away and let MapKit decides what to render when the visible region changes? I guess this would make the transition smoother, but also consumes more memory. What is your experience with this?
Thanks.
© Stack Overflow or respective owner