-
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathindex.html
62 lines (57 loc) · 2.11 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>CSV to GeoJSON</title>
<meta name="description" content="Convert a CSV file to GeoJSON" />
<meta name="author" content="Gavin Rehkemper (gavinr.com)" />
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1/dist/leaflet.css"" />
</head>
<body class="pt-12 px-4 max-w-7xl mx-auto">
<header>
<h1 class="center text-4xl mb-2">CSV to GeoJSON</h1>
</header>
<p class="mb-2">
Copy in a CSV. First line is the header, and must have a
<span class="underline" title="'lat', 'Lat', 'LAT', 'latitude', 'Latitude', 'LATITUDE'">latitude</span>
and
<span
class="underline"
title="'lng', 'Lng', 'LNG', 'lon', 'Lon', 'LON', 'long', 'Long', 'LONG', 'longitude', 'Longitude', 'LONGITUDE'"
>longitude</span
>.
</p>
<div class="md:columns-2">
<form id="csvInputForm" class="mb-10">
<textarea
class="border-2 w-full h-64 p-2"
name="csvTextArea"
id="csvTextArea"
spellcheck="false"
placeholder="Put CSV here."
></textarea>
<label><input type="checkbox" id="pretty" /> Pretty Print</label>
<button type="submit" class="float-right border p-2 m-2">Convert</button>
<textarea
class="border-2 w-full h-64 p-2 invisible"
name="resultTextArea"
id="resultTextArea"
spellcheck="false"
>
Result appears here.
</textarea
>
</form>
<div id="leafletMap" class="invisible h-[632px]"></div>
</div>
<div class="w-full text-center text-gray-400 my-6">
<a href="https://github.com/gavinr/csv-to-geojson">More info on GitHub</a>
</div>
<script src="js/libs/geojson.min.js"></script>
<script src="js/libs/papaparse.min.js"></script>
<script src="https://unpkg.com/leaflet@1/dist/leaflet.js"></script>
<script src="https://unpkg.com/esri-leaflet@3/dist/esri-leaflet.js"></script>
<script src="js/app.js"></script>
</body>
</html>