I am struggling with my GMAP-Application
Using the GMAP.NET library, I'm trying to draw a filled arc-polygon given by 3 coordinates: center_coordinate
, start_coordinate
and end_coordinate
(All in format DD,MM.MMM
).
Knowing that I want to draw the arc as a polygon on the map with appropriate resolution, I additionally define a number of segments and the clockwise/counterclockwise direction information.
I generally know how to draw a polygon (generated by List of PointLatLng
) onto the map with GMAP.NET. That works fine, so I decided to get a List of PointLatLng
.
My problem is that I don't have a concrete idea on how to calculate each point on the ideal arc.
What I've done so far
Public Function list_of_points_on_arc(point_center As PointLatLng, point_arc_start As PointLatLng, point_arc_end As PointLatLng, direction As String) As List(Of PointLatLng)
'direction: CW - clockwise / CC - Counter Clockwise
Const radiusEarthKilometres As Double = 6371.01
'sets the resolution of arc
Dim elements As Integer = 20
'unknown point on arc, each ...element
Dim point_on_arc As PointLatLng
'List collects all points aon arc
Dim gpollist As List(Of PointLatLng) = New List(Of PointLatLng)
For i As Integer = 0 To elements
' ?????????????????????????????????????????????????????????
'calculates new point_on_arc based on following information
' - elements, point_center, point_arc_start, point_arc_end
' ...
'
' ...
'
' point_on_arc = New PointLatLng(on_arc_lat, on_arc_lon)
' ?????????????????????????????????????????????????????????
'adds point_on_arc to list
gpollist.Add(point_on_arc)
Next
'returns list of pointsLatLon
Return gpollist
End Function
Any help to push me in the right direction is highly appreciated. Thanks.