Hi Guys,
Spending 2 hours try to find this simple problem.
Loading various point from a Listview - work
add Markers to map - Work
Add Point but they don't draw a line
Please advice
THanks
D
Spending 2 hours try to find this simple problem.
Loading various point from a Listview - work
add Markers to map - Work
Add Point but they don't draw a line
Please advice
B4X:
gmap = mFragment.GetMap
gmap.AddMarker(coordlistlat.GetItem(0),coordlistlon.GetItem(0) , "Departure/Take Off "&routeplaningList.GetItem(0))
Log("1- gmap add marker "&coordlistlat.GetItem(0)&" , "&coordlistlon.GetItem(0))
Dim line As Polyline
Dim ppoints As List
Dim Point As LatLng
line=gmap.AddPolyline
ppoints.Initialize
line.color=Colors.Red 'Array As Int(255,255,255)
line.Geodesic=True
line.Visible =True
line.Width=15
line.Points.AddAll(ppoints)
For i = 0 To routeplaningList.size -1
Point.Initialize(coordlistlat.GetItem(i),coordlistlon.GetItem(i))
ppoints.Add(Point)
Log("Point.Initialize("&coordlistlat.GetItem(i)&" , "&coordlistlon.GetItem(i)&" ")
gmap.AddMarker(coordlistlat.GetItem(i),coordlistlon.GetItem(i) , routeplaningList.GetItem(i))
Next
Log(ppoints.Size)
Dim cp As CameraPosition
cp.Initialize(coordlistlat.GetItem(0),coordlistlon.GetItem(0) , 12)
Log ("1 - cp initialized after gmap "&coordlistlat.GetItem(0)&" , "&coordlistlon.GetItem(0))
gmap.AnimateCamera(cp)
THanks
D