|
@@ -0,0 +1,33 @@
|
|
1
|
+<!DOCTYPE html>
|
|
2
|
+<html>
|
|
3
|
+<head>
|
|
4
|
+ <title>Quick Start - Leaflet</title>
|
|
5
|
+
|
|
6
|
+ <meta charset="utf-8" />
|
|
7
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
8
|
+
|
|
9
|
+ <link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" />
|
|
10
|
+
|
|
11
|
+ <link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css"/>
|
|
12
|
+ <script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet.js"></script>
|
|
13
|
+ <script src="https://labs.easyblog.it/maps/leaflet-layerjson/src/leaflet-layerjson.js"></script>
|
|
14
|
+</head>
|
|
15
|
+<body>
|
|
16
|
+
|
|
17
|
+<div id="mapid" style="width: 600px; height: 400px;"></div>
|
|
18
|
+<script>
|
|
19
|
+
|
|
20
|
+ var mymap = L.map('mapid').setView([20, 30], 12);
|
|
21
|
+
|
|
22
|
+ L.tileLayer('https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}', {
|
|
23
|
+ maxZoom: 18,
|
|
24
|
+ }).addTo(mymap);
|
|
25
|
+
|
|
26
|
+ L.layerJSON({
|
|
27
|
+ url: "http://localhost:8000/api.php/geojson/users?filter=location,swi,POLYGON(({lon1} {lat1},{lon1} {lat2},{lon2} {lat2},{lon2} {lat1},{lon1} {lat1}))"
|
|
28
|
+ }).addTo(mymap);
|
|
29
|
+
|
|
30
|
+</script>
|
|
31
|
+
|
|
32
|
+</body>
|
|
33
|
+</html>
|