我與我的努力獲得PointLatLng虛擬圓弧的名單GMAP-應用給出3點(中心,開始,結束)
使用GMAP.NET庫,我想畫一個充滿弧由3個座標給出的多邊形:center_coordinate
,start_coordinate
和end_coordinate
(全部格式爲DD,MM.MMM
)。
由於知道我想以適當的分辨率在地圖上繪製圓弧作爲多邊形,我還額外定義了多個分段和順時針/逆時針方向信息。
我通常知道如何繪製一個多邊形(由列表PointLatLng
產生)到GMAP.NET地圖上。這工作正常,所以我決定得到PointLatLng
列表。
我的問題是,我沒有關於如何計算理想弧上每個點的具體想法。
我到目前爲止已經
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
做任何有助於推動我在正確的方向是高度讚賞。謝謝。