-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathhtml.json
More file actions
44 lines (44 loc) · 1.75 KB
/
Copy pathhtml.json
File metadata and controls
44 lines (44 loc) · 1.75 KB
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
{
"Add ArcGIS Map Component": {
"prefix": "addArcgisMapComponent",
"body": [
"<arcgis-map item-id=\"${1:item-id}\">",
"\t${2:<arcgis-home position=\"${3|top-left,top-right,bottom-left,bottom-right|}\"></arcgis-home>}",
"\t${4:<arcgis-zoom position=\"${5|top-left,top-right,bottom-left,bottom-right|}\"></arcgis-zoom>}",
"</arcgis-map>"
],
"description": "Add ArcGIS Map Component"
},
"Get the API from the CDN": {
"prefix": "getApi",
"body": [
"<link rel=\"stylesheet\" href=\"https://js.arcgis.com/${1|4.32,4.31,4.30,4.29,4.28,4.27,4.26,4.25,4.24,4.23,4.22,4.21,4.20,4.19,4.18,4.17,4.16,1.15,4.14|}/esri/css/main.css\">",
"<script src=\"https://js.arcgis.com/${1}\"></script>"
],
"description": "Add script and link tags for jsapi"
},
"Get the API + Map Components from the CDN": {
"prefix": "getApiPlusComponents",
"body": [
"<link rel=\"stylesheet\" href=\"https://js.arcgis.com/${1|4.32,4.31|}/esri/css/main.css\">",
"<script src=\"https://js.arcgis.com/${2|4.32,4.31}\"></script>",
"${3:<script type=\"module\" src=\"https://js.arcgis.com/map-components/4.32/arcgis-map-components.esm.js\"></script>}"
],
"description": "Add script and link tags for jsapi and optionally for map components"
},
"Set package name and location": {
"prefix": "dojoConfig",
"body": [
"<script>",
"\tconst locationPath = location.pathname.replace(/\\/[^\\/]+$/,\"\");",
"\twindow.dojoConfig = {",
"\t\tpackages:[{",
"\t\t\tname: \"app\",",
"\t\t\tlocation: locationPath + \"/app\"",
"\t\t}]",
"\t};",
"</script>"
],
"description": "Sets /app folder to be able to load packages using require([\"app/your_file.js\"]);"
}
}