iOS Question iGooglemaps library Polyline.points.add does not work. Bug?

touchsquid

Active Member
Licensed User
Longtime User
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.

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

This is the code from the B4I GoogleMaps example, which works.
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

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.
 

touchsquid

Active Member
Licensed User
Longtime User
Thanks. Why not remove the add and addall functions? Since they were there, I expected them to work. Anyway thanks. My app is working well now.
 
Upvote 0
Top