-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathForm1.vb
29 lines (21 loc) · 950 Bytes
/
Form1.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Imports Ptv.XServer.Controls.Map
Imports Point = System.Windows.Point
Imports Ptv.XServer.Demo.UseCases.RoutingDragAndDrop
Public Class Form1
ReadOnly token = "Insert your xToken here"
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Initialize()
End Sub
Private Sub Initialize()
' initialize base map (for xServer internet)
FormsMap1.XMapUrl = "https://xmap-eu-n-test.cloud.ptvgroup.com/xmap/ws/XMap"
FormsMap1.XMapCredentials = token
Dim startPoint = New Point(8.4, 49)
Dim destPoint = New Point(8.4, 50)
' set map view
FormsMap1.SetEnvelope(New MapRectangle({startPoint, destPoint}).Inflate(1.25))
Dim dd = New RoutingDragAndDropUseCase(FormsMap1.WrappedMap, "https://xroute-eu-n-test.cloud.ptvgroup.com/xroute/ws/XRoute", "xtok", token)
dd.SetRoute(startPoint, destPoint)
dd.Enable()
End Sub
End Class