CodeGuy
CodeGuy

Reputation: 28907

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 the 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.

Upvotes: 0

Views: 464

Answers (1)

benwong
benwong

Reputation: 2226

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.

Upvotes: 1

Related Questions