-
Notifications
You must be signed in to change notification settings - Fork 2
/
demo.html
80 lines (62 loc) · 2.84 KB
/
demo.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OSRM Decentralized</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ=="
crossorigin=""/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="lib/leaflet.contextmenu.min.css">
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-tAGcCfR4Sc5ZP5ZoVz0quoZDYX5aCtEm/eu1KhSLj2c9eFrylXZknQYmxUssFaVJKvvc0dJQixhGjG2yXWiV9Q=="
crossorigin=""></script>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="lib/leaflet-ant-path.js"></script>
<script src="lib/polyline_convert.js"></script>
<script src="lib/leaflet.contextmenu.min.js"></script>
<script src="lib/leaflet-providers.js"></script>
<style>
body,
div {
font-family: sans-serif,"Trebuchet MS", Arial, Helvetica;
}
#map {
width: 100%;
height: 70vh;
}
#dump {
font-family: monospace;
font-size: 0.8em;
width: 100%;
height: 300px;
}
</style></head>
<body>
<div class="container-fluid">
<h1>OSRM Decentralized</h1>
<h3>Demo map</h3>
<p><select id="osrmSelect"><option value="">Choose the OSRM server</option></select>
<span id="aboutServer"></span></p>
<p><input id="osrm_fromPlace" placeholder="from lat,lon"> | <input id="osrm_toPlace" placeholder="to lat,lon"> | <button onclick="mapOSRM()">Run</button> | <span id="status"></span>
</p>
<div id="map"></div>
<small>Right-click on the map to place your start and end points</small><br><br>
<div class="row">
<div class="col-md-6">
<textarea id="dump">Query result</textarea>
</div>
<div class="col-md-6">
<a href="http://project-osrm.org/docs/v5.24.0/api">OSRM API docs</a><br>
<p>Query URL: <small><span id="url"></span></small>
</p>
</div>
</div>
<br>
<p>Roll your own OSRM instance for your own region using our easy docker recipes! Go to <a href="/">home page</a> to learn more.<br>
<b>Add your OSRM instance to this page</b>: Fork <a href="https://github.com/osrm-decentralized/osrm-decentralized.github.io">this repo</a>, add your server's details to <a href="https://github.com/osrm-decentralized/osrm-decentralized.github.io/blob/master/osrm_endpoints.json">osrm_endpoints.json</a> and submit a Pull request. <br>
<footer>Created by <a href="https://nikhilvj.co.in" target="_blank">Nikhil VJ</a>. Contact: nikhil.js [at] gmail.com. Consider making a one-time <a href="https://nikhilvj.co.in/contribute/" target="_blank">contribution to support</a> this and other such open source initiatives.
</footer>
<br><br>
</div>
<script src="main.js"></script>
</body></html>