Skip to content

Instantly share code, notes, and snippets.

@suchithm
Last active September 3, 2015 12:32
Show Gist options
  • Save suchithm/dc2c0c396aca9322310b to your computer and use it in GitHub Desktop.
Save suchithm/dc2c0c396aca9322310b to your computer and use it in GitHub Desktop.
//Draw line by connecting polyline points
UIColor pathColor = UIColor.Red;
int intRoutesCount=objRoutes.routes.Count;
//available routes may be more then one
for ( int intCounter = 0 ; intCounter < intRoutesCount ; intCounter++ )
{
var path = Google.Maps.Path.FromEncodedPath ( objRoutes.routes [intCounter].overview_polyline.points );
var line = Google.Maps.Polyline.FromPath ( path );
line.StrokeWidth = 3f;
line.StrokeColor = UIColor.Red;
line.Geodesic = true; //more curved path
line.Map = mapView;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment