-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
121 lines (110 loc) · 3.39 KB
/
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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width,initial-scale=1,user-scalable=no"
/>
<title>Split Polygon Demo</title>
<link
rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.1/styles/default.min.css"
/>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.1/highlight.min.js"></script>
<!-- Leaflet: -->
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css"
/>
<!-- Calcite: -->
<link
rel="stylesheet"
href="https://unpkg.com/@esri/calcite-components@1.0.0-beta.33/dist/calcite/calcite.css"
/>
<!-- Main CSS: -->
<link rel="stylesheet" href="style.css" />
<!-- Leaflet -->
<script
defer
src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
></script>
<script
defer
src="https://unpkg.com/esri-leaflet@3.0.12/dist/esri-leaflet.js"
></script>
<script
defer
src="https://cdn.jsdelivr.net/npm/@turf/turf@5/turf.min.js"
></script>
<link
rel="stylesheet"
href="https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"
/>
<script
defer
src="https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js"
></script>
<!-- Calcite -->
<script
src="https://js.arcgis.com/calcite-components/2.8.0/calcite.esm.js"
type="module"
></script>
<link
rel="stylesheet"
href="https://js.arcgis.com/calcite-components/2.8.0/calcite.css"
/>
<!-- Main JS File: -->
<script defer src="main.js"></script>
</head>
<body>
<div class="wrapper">
<select id="mainSelect">
<option>Polygon</option>
<option>Random Points</option>
<option>Cluster the Points (K-Means)</option>
<option>Centroids</option>
<option>Voronoi</option>
<option>Voronoi Clip</option>
</select>
<calcite-stepper icon numbered>
<calcite-stepper-item
heading="Polygon"
description="Click twice to draw"
></calcite-stepper-item>
<calcite-stepper-item
heading="Random Points"
description="Click twice to re-generate"
title="Click twice to re-generate random points"
></calcite-stepper-item>
<calcite-stepper-item
heading="Cluster the Points (K-Means)"
description="Click twice to change the number of clusters"
title="Click twice to change the number of clusters"
>
</calcite-stepper-item>
<calcite-stepper-item heading="Centroids"></calcite-stepper-item>
<calcite-stepper-item heading="Voronoi"></calcite-stepper-item>
<calcite-stepper-item
heading="Voronoi Clip"
description="Click twice to re-run"
title="Click twice to re-run"
></calcite-stepper-item>
</calcite-stepper>
<div class="mapWrapper">
<div id="map"></div>
<div id="codeBlock">
<h4>Code</h4>
<pre><code class="javascript">polygon = L.polygon([...]).addTo(map);</code></pre>
<div class="linkWrapper">
(<a
href="https://github.com/gavinr/split-polygon-demo"
target="_blank"
>more on GitHub</a
>)
</div>
</div>
</div>
</div>
</body>
</html>