Android Question Polyline not error but not showing

I have this code and all work perfectly, only the polyline not showing....how can i do?

PolyLine Implementation:
' Aggiunta di un marker sulla mappa
            Dim lat As Double = DR_VISITE.GetString("Latitudine")
            Dim lng As Double = DR_VISITE.GetString("Longitudine")
            Dim RAGSOCCLI As String = DR_VISITE.GetString("RAGSOCCLI").Trim
            GoogleMaps.AddMarker(lat, lng, RAGSOCCLI)
            Log("lat: " & lat & "lng: " & lng)
            
            Dim point As LatLng
            point.Initialize(lat,lng)
            
            Dim line As Polyline = GoogleMaps.AddPolyline()
            line.Color = Colors.Black
            line.Geodesic = True
            line.Visible = True
            line.Width = 10
            line.Points.Add(point)
            Log(line.Points.Size)
            
            Dim cp As CameraPosition
            cp.Initialize(lat,lng, 0)
            GoogleMaps.AnimateCamera(cp)
 

DonManfred

Expert
Licensed User
Longtime User
only the polyline not showing....how can i do?
your "line" is just one POINT. Nothing more based on the code...

A Polyline consists on two or more points. Point 1 is connected to point 2. Point 2 connected to 3. and so on.

What does
B4X:
Log(line.Points.Size)
print to the LOG? I guess 1.
 
Last edited:
Upvote 0
Top