-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
108 lines (102 loc) · 3.89 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Export Feature Service</title>
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
<!-- Load Calcite -->
<script
type="module"
src="https://js.arcgis.com/calcite-components/3.0.3/calcite.esm.js"
></script>
<script type="importmap">
{
"imports": {
"@arcgis/core/": "https://js.arcgis.com/4.32/@arcgis/core/"
}
}
</script>
<link
rel="stylesheet"
href="https://js.arcgis.com/4.32/esri/themes/light/main.css"
/>
</head>
<body class="m-auto p-4 w-full md:w-3/5">
<h1 class="text-4xl font-bold mb-4">Export Feature Service</h1>
<div id="loginButtonWrapper">
<calcite-button id="loginButton" class="w-full">Login</calcite-button>
</div>
<div id="wrapper" class="hidden">
<form class="">
<!-- For demo itemids, try this: -->
<!-- https://arcgis.com/home/search.html?restrict=false&sortField=relevance&searchTerm=owner%3Aesri_dm&focus=layers-weblayers-features -->
<calcite-label>
<span>
Item ID
<calcite-button
href="https://arcgis.com/home/search.html?restrict=false&sortField=relevance&searchTerm=owner%3Aesri_dm&focus=layers-weblayers-features"
target="_blank"
appearance="transparent"
icon-start="launch"
title="Find other item IDs to test with"
></calcite-button>
</span>
<calcite-input
placeholder="ItemID of a feature service to export"
id="itemIdInput"
value="8c2d6d7df8fa4142b0a1211c8dd66903"
class="mb-2"
></calcite-input
></calcite-label>
<!-- Options: -->
<!-- https://developers.arcgis.com/rest/users-groups-and-items/export-item/#request-parameters -->
<calcite-label
><span
>Export type
<calcite-button
href="https://developers.arcgis.com/rest/users-groups-and-items/export-item/#request-parameters"
target="_blank"
appearance="transparent"
icon-start="information"
></calcite-button>
</span>
<calcite-select class="mb-4" id="exportTypeInput">
<calcite-option value="Shapefile">Shapefile</calcite-option>
<calcite-option value="CSV">CSV</calcite-option>
<calcite-option value="File Geodatabase"
>File Geodatabase</calcite-option
>
<calcite-option value="Feature Collection"
>Feature Collection</calcite-option
>
<calcite-option value="GeoJson">GeoJson</calcite-option>
<calcite-option value="Scene Package">Scene Package</calcite-option>
<calcite-option value="KML">KML</calcite-option>
<calcite-option value="Excel">Excel</calcite-option>
</calcite-select>
</calcite-label>
<div class="float-right text-right">
<calcite-button id="exportButton">Export</calcite-button>
<calcite-button id="logoutButton">Logout</calcite-button>
<div class="text-gray-700 italic mt-2">
Warning: Clicking "Export" above will create <br />an item in your
portal content. You can delete it afterwards.
</div>
</div>
</form>
<!-- Area to show the results: -->
<div id="results"></div>
</div>
<div class="pt-8 text-center clear-both">
---<br />
<a
href="https://github.com/gavinr-maps/export-feature-service-to-shapefile?tab=readme-ov-file#export-a-feature-service-to-shapefile"
title="More info"
class="pt-2 inline-block"
>More info</a
>
</div>
<script src="main.js" type="module"></script>
</body>
</html>