问题
I am developing an application that almost replicates Apple maps application behavior. When i touch a route, i need to change its color to blue and change the other ones colors to gray. Is there an efficient way to accomplish this without having to remove the overlays and adding them again ? Thanks.
回答1:
Yes:
Make sure your annotation view has
enabled = YES
.Implement
-[MKMapViewDelegate mapView:didSelectAnnotationView:]
.In that callback, get
view
and change its properties.
来源:https://stackoverflow.com/questions/24226290/mkpolylinerenderer-change-color-without-removing-overlay