B4J Question Google Maps - Geodesic Polyline?

RichardN

Well-Known Member
Licensed User
Longtime User
In B4A you can describe a polyline object and draw a great-circle track instead of a rhumb line...

Code: Copy
'In B4A.....

Dim pl As Polyline = Gmap.AddPolyline
pl.Geodesic = True
pl.points = List.......

'However in B4J

gmap.AddPolyline(Waypoints,1,fx.Colors.blue)

I can't find any exposure of a Geodesic property in the B4J inplementation of Google Maps.

How is it done?
 
You can use this sub to set the geodesic property:
Code: Copy
Sub SetGeodesic(shape As JavaObject)
   shape.GetFieldJO("jsObject").RunMethod("eval", Array($"
       this.setOptions({
          geodesic: true
        });
   "$))
End Sub
Code: Copy
Dim p As MapPolygon = gmap.AddPolygon(points, 1, fx.Colors.Red, fx.Colors.Transparent, 0)
   SetGeodesic(p)
 
Upvote 0
Back
Top