Private Sub gmap_PolygonClick (SelectedPolygon As MapPolygon)
Private joPoint, joPath As JavaObject
CurrentDrawObjcet = CurrentDrawObjcet.InitializeNewInstance("com.lynden.gmapsfx.shapes.Polygon", Null)
CurrentDrawObjcet = SelectedPolygon
joPath = joPath.InitializeNewInstance("com.lynden.gmapsfx.javascript.object.MVCArray", Null)
joPath = CurrentDrawObjcet.RunMethod("getPath", Null)
ckbDraggable.Checked = CurrentDrawObjcet.RunMethod("getDraggable", Null)
ckbEditable.Checked = CurrentDrawObjcet.RunMethod("getEditable", Null)
Private i As Int
Private Size As Double = joPath.RunMethod("getLength", Null)
ltvPoints.Items.Clear
For i = 0 To Size - 1
joPoint = joPath.RunMethod("getAt", Array As Object (i))
Private ll As LatLng = joPoint.InitializeNewInstance("com.lynden.gmapsfx.javascript.object.LatLong", Array(joPoint))
ltvPoints.Items.Add("Lat" & i & "= " & NumberFormat(ll.Latitude, 1, 6))
ltvPoints.Items.Add("Lng" & i & "= " & NumberFormat(ll.Longitude, 1, 6))
Next
pnlDrawing.Visible = True
End Sub