This code does not work. The pointlist has 4 entries, but as they are added to the poly line points, the log shows the size remains as 0.
[CODE lang="b4x" title="My code for a polyline"]Course =gmap.AddPolyline
For Each px As LatLng In pointlist
Course.Points.Add(px)
Log(px.Latitude)
Log(Course.Points.Size)
Next
Course.Color = Colors.blue
Course.Width =7[/CODE]
This is the code from the B4I GoogleMaps example, which works.
[CODE lang="b4x" title="example"] pl = gmap.AddPolyline
Dim l1, l2, l3, l4 As LatLng
l1.Initialize(10, 10)
l2.Initialize(10, 20)
l3.Initialize(20, 20)
l4.Initialize(20, 10)
pl.Points = Array(l1, l2, l3, l4, l1)
gextra.ZoomToPoints(pl.Points)
pl.Width = 5
pl.Color = Colors.Red[/CODE]
I tried initialize2, addall as well, and both produce an empty points list.
I changed my code to Course.Points = pointlist and it works. This seems like a bug in the library.