Topic: Drawing multiple lines with Google API
Hey there,
Here's some sample code of mine. I'm only seeing only line shown on my map whereas there should be 50.
Cheers,
private void DrawPersonalLinks()
{
List<Vector2> points = new List<Vector2>();
foreach (SentimentMarker sentimentMarker in _sentimentMarkers)
{
points.Clear();
points.Add(_yourLocationStaticMapMarker.position);
points.Add(sentimentMarker.position);
OnlineMapsDrawingLine line = new OnlineMapsDrawingLine(points, Color.white);
// Draw the line route on the map.
OnlineMaps.instance.AddDrawingElement(line);
}
}