سؤال

Is there a way how can I change callout view when there are multiple annotations at same position? If there is one then just show normal callout and if there is more then I would like to show callout with text like: "3 items at this place" and then I would go to table view and then to detail (with one item at place just go to detail place). Is it possible? What's best way to do this? Thanks

هل كانت مفيدة؟

المحلول

This technique is called clustering. Check out cocoacontrols.com for some approaches for doing this with MapKit.

نصائح أخرى

About 18 minutes into the WWDC 2011 #111 - Visualizing Information Geographically with MapKit video, Apple illustrates an example of how you can prevent overlapping annotations (including some nice animation revealing and hiding more detailed annotations as you zoom in and out). It could easily be adapted to handle the different callouts that you describe, too.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top