-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathleafletmap.html
101 lines (93 loc) · 4.77 KB
/
leafletmap.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en">
<head>
<title>NEW LEAFLET</title>
<!-- CDN FOR LEAFLET API -->
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<!-- measurement css and js -->
<link rel="stylesheet" href="./leaflet-measure.css">
<!-- search control css and js -->
<link rel="stylesheet" href="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.css" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
margin: 0;
padding: 0;
}
#map {
width: 100%;
height: 95vh;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
<script src="./leaflet-measure2.js"></script>
<script src="./leafet.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4"
crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="./addpoint.js"></script>
<script src="./visualize.js"></script>
<button type="button" class="btn btn-primary btn-sm" onclick=fullScreenview()>View in fullscreen</button>
<button type="button" class="btn btn-primary btn-sm" data-bs-toggle="modal" data-bs-target="#exampleModal">Add
Coordinate</button>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Add Coordinate</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="container">
<br />
<form name="" action="" method="POST">
<input type="button" value="Add Row" onclick="addRow('dataTable')"
class="btn btn-success btn-sm" />
<input type="button" value="Delete Row" onclick="deleteRow('dataTable')"
class="btn btn-danger btn-sm" />
<br /><br />
<table>
<tr>
<th># </th>
<th>Latitude </th>
<th>Longitude</th>
</tr>
<tbody id="dataTable" width="350px" border="1">
<tr>
<td><input type="checkbox" name="chk[]" id="chk_1" /></td>
<td><input type="number" name="lat[]" id="lat_1" placeholder="Latitude"
class="form-control lat_1" /></td>
<td><input type="number" name="lng[]" id="lng_1" placeholder="Longitude"
class="form-control lng_1" /></td>
</tr>
</tbody>
<input type="hidden" name="count" id="count" value="1">
<tr>
<td colspan="5"> </td>
</tr>
</table>
</form>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal" onclick="getInputValue();">Visualise</button>
</div>
</div>
</div>
</div>
</body>
</html>