开发者

Google Maps Shading - iOS

Let's say I have a list of cities (from around the world). Perhaps "Dallas" shows up 4 times whereas another city might show up 2 times, or even just once. I'd like to have a map of th开发者_如何学Ce globe in my iPhone application where cities are shaded according to how often they appear in the list such that the darker the city is, the more times it shows up on the list of cities. Can I use google maps for this? What would achieving something like this consist of? I have experience with iOS and I've written many applications for the iPhone, but I've never dealt with GPS, google maps, etc.


You could use MapKit (Google Maps) for this. Off the top of my head you would need to code your own MKAnnotationView class that displays a custom pin on the map and a MKAnnotation class to pass frequency (times the city shows up) data to the view.

You would need to override - (id)initWithAnnotation:(id <MKAnnotation>)annotation reuseIdentifier:(NSString *)reuseIdentifier in your custom MKAnnotationView and set the image based on the NSInteger property in your custom MKAnnotation class that stores the frequency for the city.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜