Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

waterskier2007

macrumors 68000
Original poster
Jun 19, 2007
1,877
243
Novi, MI
Hey guys/gals,
Hoping for some quick help on this issue. I am adding a bunch of MKPolygons to my MKMapView and I need to uniquely color them. To do this I figure that I need some way of uniquely identifying them so that when I create the MKPolygon view for them I can figure out what color to make each one. So far I am doing that by assigning the title property (NSString) of each MKPolygon as a number (like @"1", @"2") and then reading the intValue of the title when I create the MKPolygonView and using a separate method to pick a color (details of that not relevant).

Basically, I want to know if that is the best way or if there is some other property of a MKPolygon that I can set to uniquely identify it later when the view is drawn.

Thanks
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.