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.
MKPolyLineRenderer change color without removing overlay
Asked Answered
This answer solves it perfectly. https://mcmap.net/q/1465309/-mkpolyline-mkpolylinerenderer-changing-color-without-remove-it –
Extracellular
Yes:
Make sure your annotation view has
enabled = YES
.Implement
-[MKMapViewDelegate mapView:didSelectAnnotationView:]
.In that callback, get
view
and change its properties.
This is for the annotation not the MKPolylineRenderer. –
Extracellular
© 2022 - 2024 — McMap. All rights reserved.