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