-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
31 lines (28 loc) · 903 Bytes
/
index.html
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
30
31
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
</head>
<body>
<script>
const args = { key: '703926d2-dd29-4425-9591-d49100485729', profile: 'car' };
const ghOptimization = new GHOptimization.GraphHopperOptimization(args);
ghOptimization.addPoint({ lng: -0.103512, lat: 51.503634 });
ghOptimization.addPoint({ lng: -0.074673, lat: 51.519339 });
ghOptimization.addPoint({ lng: -0.103168, lat: 51.52681 });
ghOptimization.addVehicle({
vehicle_id: `_vehicle_0`,
start_address: {
location_id: '_start_location',
lon: -0.103512,
lat: 51.503634
}
});
let p = ghOptimization.doVRPRequest();
p.then(a => { console.log(a); return a; });
</script>
</body>
</html>