Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Change color of polyline

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 136
    Comment on it

    Hi all,

    If you want to change the color of a polyline or route on map just change the color in this delegate of map.

    - (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id <MKOverlay>)overlay
    {
        MKPolylineRenderer *renderer = [[MKPolylineRenderer alloc] initWithOverlay:overlay];
        renderer.strokeColor = [UIColor colorWithRed:1/255.0f green:172/255.0f blue:233/255.0f alpha:1];
        renderer.lineWidth = 3.0;
        return renderer;
    }
    

    In this method you can change polyline width also.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: