@saschabrunnerch/arcgis-maps-sdk-js-ai-context 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +163 -201
  2. package/bin/cli.js +157 -173
  3. package/contexts/4.34/{claude → skills}/arcgis-3d-advanced/SKILL.md +586 -586
  4. package/contexts/4.34/{claude → skills}/arcgis-advanced-layers/SKILL.md +431 -431
  5. package/contexts/4.34/{claude → skills}/arcgis-analysis-services/SKILL.md +607 -607
  6. package/contexts/4.34/{claude → skills}/arcgis-authentication/SKILL.md +301 -301
  7. package/contexts/4.34/{claude → skills}/arcgis-cim-symbols/SKILL.md +486 -486
  8. package/contexts/4.34/{claude → skills}/arcgis-coordinates-projection/SKILL.md +406 -406
  9. package/contexts/4.34/{claude → skills}/arcgis-core-maps/SKILL.md +739 -739
  10. package/contexts/4.34/{claude → skills}/arcgis-core-utilities/SKILL.md +732 -732
  11. package/contexts/4.34/{claude → skills}/arcgis-custom-rendering/SKILL.md +445 -445
  12. package/contexts/4.34/{claude → skills}/arcgis-editing-advanced/SKILL.md +702 -702
  13. package/contexts/4.34/{claude → skills}/arcgis-feature-effects/SKILL.md +393 -393
  14. package/contexts/4.34/{claude → skills}/arcgis-geometry-operations/SKILL.md +489 -489
  15. package/contexts/4.34/{claude → skills}/arcgis-imagery/SKILL.md +307 -307
  16. package/contexts/4.34/{claude → skills}/arcgis-interaction/SKILL.md +572 -572
  17. package/contexts/4.34/{claude → skills}/arcgis-knowledge-graphs/SKILL.md +582 -582
  18. package/contexts/4.34/{claude → skills}/arcgis-layers/SKILL.md +601 -601
  19. package/contexts/4.34/{claude → skills}/arcgis-map-tools/SKILL.md +668 -668
  20. package/contexts/4.34/{claude → skills}/arcgis-media-layers/SKILL.md +290 -290
  21. package/contexts/4.34/{claude → skills}/arcgis-portal-content/SKILL.md +679 -679
  22. package/contexts/4.34/{claude → skills}/arcgis-scene-effects/SKILL.md +512 -512
  23. package/contexts/4.34/{claude → skills}/arcgis-smart-mapping/SKILL.md +686 -686
  24. package/contexts/4.34/skills/arcgis-starter-app/SKILL.md +273 -0
  25. package/contexts/4.34/skills/arcgis-starter-app-extended/SKILL.md +649 -0
  26. package/contexts/4.34/{claude → skills}/arcgis-tables-forms/SKILL.md +877 -877
  27. package/contexts/4.34/{claude → skills}/arcgis-time-animation/SKILL.md +722 -722
  28. package/contexts/4.34/{claude → skills}/arcgis-utility-networks/SKILL.md +301 -301
  29. package/contexts/4.34/{claude → skills}/arcgis-visualization/SKILL.md +580 -580
  30. package/contexts/4.34/{claude → skills}/arcgis-widgets-ui/SKILL.md +574 -574
  31. package/lib/installer.js +294 -379
  32. package/package.json +45 -45
  33. package/contexts/4.34/copilot/arcgis-3d.instructions.md +0 -267
  34. package/contexts/4.34/copilot/arcgis-analysis.instructions.md +0 -294
  35. package/contexts/4.34/copilot/arcgis-arcade.instructions.md +0 -234
  36. package/contexts/4.34/copilot/arcgis-authentication.instructions.md +0 -187
  37. package/contexts/4.34/copilot/arcgis-cim-symbols.instructions.md +0 -177
  38. package/contexts/4.34/copilot/arcgis-core-maps.instructions.md +0 -246
  39. package/contexts/4.34/copilot/arcgis-core-utilities.instructions.md +0 -247
  40. package/contexts/4.34/copilot/arcgis-editing.instructions.md +0 -262
  41. package/contexts/4.34/copilot/arcgis-geometry.instructions.md +0 -225
  42. package/contexts/4.34/copilot/arcgis-layers.instructions.md +0 -278
  43. package/contexts/4.34/copilot/arcgis-popup-templates.instructions.md +0 -266
  44. package/contexts/4.34/copilot/arcgis-portal-advanced.instructions.md +0 -275
  45. package/contexts/4.34/copilot/arcgis-smart-mapping.instructions.md +0 -184
  46. package/contexts/4.34/copilot/arcgis-time-animation.instructions.md +0 -112
  47. package/contexts/4.34/copilot/arcgis-visualization.instructions.md +0 -321
  48. package/contexts/4.34/copilot/arcgis-widgets-ui.instructions.md +0 -277
  49. /package/contexts/4.34/{claude → skills}/arcgis-arcade/SKILL.md +0 -0
  50. /package/contexts/4.34/{claude → skills}/arcgis-popup-templates/SKILL.md +0 -0
@@ -1,321 +0,0 @@
1
- ---
2
- applyTo: "**/*.{js,ts,jsx,tsx,html}"
3
- ---
4
-
5
- # ArcGIS Maps SDK - Visualization (Renderers & Symbols)
6
-
7
- ## Renderer Types
8
-
9
- | Renderer | Use Case |
10
- |----------|----------|
11
- | SimpleRenderer | Same symbol for all features |
12
- | UniqueValueRenderer | Different symbols by category |
13
- | ClassBreaksRenderer | Different symbols by numeric ranges |
14
- | HeatmapRenderer | Density visualization |
15
- | DotDensityRenderer | Dot density maps |
16
-
17
- ## SimpleRenderer
18
-
19
- ```javascript
20
- layer.renderer = {
21
- type: "simple",
22
- symbol: {
23
- type: "simple-marker",
24
- color: "blue",
25
- size: 8,
26
- outline: { color: "white", width: 1 }
27
- }
28
- };
29
- ```
30
-
31
- ### With Visual Variables
32
- ```javascript
33
- layer.renderer = {
34
- type: "simple",
35
- symbol: { type: "simple-marker", color: "#13EB0C" },
36
- visualVariables: [{
37
- type: "size",
38
- field: "population",
39
- stops: [
40
- { value: 1000, size: 4 },
41
- { value: 100000, size: 24 }
42
- ]
43
- }]
44
- };
45
- ```
46
-
47
- ## UniqueValueRenderer
48
-
49
- ```javascript
50
- layer.renderer = {
51
- type: "unique-value",
52
- field: "type",
53
- defaultSymbol: { type: "simple-fill", color: "gray" },
54
- uniqueValueInfos: [
55
- {
56
- value: "residential",
57
- symbol: { type: "simple-fill", color: "#FFFF00" },
58
- label: "Residential"
59
- },
60
- {
61
- value: "commercial",
62
- symbol: { type: "simple-fill", color: "#FF0000" },
63
- label: "Commercial"
64
- }
65
- ]
66
- };
67
- ```
68
-
69
- ## ClassBreaksRenderer
70
-
71
- ```javascript
72
- layer.renderer = {
73
- type: "class-breaks",
74
- field: "population",
75
- classBreakInfos: [
76
- { minValue: 0, maxValue: 100, symbol: { type: "simple-fill", color: "#fffcd4" }, label: "< 100" },
77
- { minValue: 100, maxValue: 500, symbol: { type: "simple-fill", color: "#b1cdc2" }, label: "100 - 500" },
78
- { minValue: 500, maxValue: Infinity, symbol: { type: "simple-fill", color: "#0d2644" }, label: "> 500" }
79
- ]
80
- };
81
- ```
82
-
83
- ## HeatmapRenderer
84
-
85
- ```javascript
86
- layer.renderer = {
87
- type: "heatmap",
88
- colorStops: [
89
- { color: "rgba(63, 40, 102, 0)", ratio: 0 },
90
- { color: "#472b77", ratio: 0.25 },
91
- { color: "#ffff00", ratio: 1 }
92
- ],
93
- radius: 18,
94
- maxDensity: 0.01
95
- };
96
- ```
97
-
98
- ## 2D Symbol Types
99
-
100
- ### SimpleMarkerSymbol (Points)
101
- ```javascript
102
- const symbol = {
103
- type: "simple-marker",
104
- style: "circle", // circle, square, cross, x, diamond, triangle
105
- color: [255, 0, 0],
106
- size: 12,
107
- outline: { color: [255, 255, 255], width: 2 }
108
- };
109
- ```
110
-
111
- ### SimpleLineSymbol
112
- ```javascript
113
- const symbol = {
114
- type: "simple-line",
115
- style: "solid", // solid, dash, dot, dash-dot
116
- color: [0, 0, 255],
117
- width: 2,
118
- cap: "round",
119
- join: "round"
120
- };
121
- ```
122
-
123
- ### SimpleFillSymbol
124
- ```javascript
125
- const symbol = {
126
- type: "simple-fill",
127
- style: "solid",
128
- color: [255, 255, 0, 0.5],
129
- outline: { type: "simple-line", color: [0, 0, 0], width: 1 }
130
- };
131
- ```
132
-
133
- ### PictureMarkerSymbol
134
- ```javascript
135
- const symbol = {
136
- type: "picture-marker",
137
- url: "https://example.com/icon.png",
138
- width: 24,
139
- height: 24
140
- };
141
- ```
142
-
143
- ### TextSymbol
144
- ```javascript
145
- const symbol = {
146
- type: "text",
147
- text: "Label",
148
- color: "white",
149
- font: { family: "Arial", size: 12, weight: "bold" },
150
- haloColor: "black",
151
- haloSize: 1
152
- };
153
- ```
154
-
155
- ## 3D Symbol Types
156
-
157
- ### PointSymbol3D
158
- ```javascript
159
- const symbol = {
160
- type: "point-3d",
161
- symbolLayers: [{
162
- type: "icon",
163
- resource: { primitive: "circle" },
164
- material: { color: "red" },
165
- size: 12
166
- }]
167
- };
168
-
169
- // Object marker
170
- const symbol = {
171
- type: "point-3d",
172
- symbolLayers: [{
173
- type: "object",
174
- resource: { primitive: "cylinder" },
175
- material: { color: "blue" },
176
- height: 100,
177
- width: 10
178
- }]
179
- };
180
- ```
181
-
182
- ### PolygonSymbol3D (Extrusion)
183
- ```javascript
184
- const symbol = {
185
- type: "polygon-3d",
186
- symbolLayers: [{
187
- type: "extrude",
188
- material: { color: "blue" },
189
- size: 100
190
- }]
191
- };
192
- ```
193
-
194
- ## Visual Variables
195
-
196
- ### Size Variable
197
- ```javascript
198
- visualVariables: [{
199
- type: "size",
200
- field: "magnitude",
201
- stops: [
202
- { value: 1, size: 4 },
203
- { value: 10, size: 40 }
204
- ]
205
- }]
206
- ```
207
-
208
- ### Color Variable
209
- ```javascript
210
- visualVariables: [{
211
- type: "color",
212
- field: "temperature",
213
- stops: [
214
- { value: 0, color: "blue" },
215
- { value: 100, color: "red" }
216
- ]
217
- }]
218
- ```
219
-
220
- ### Opacity Variable
221
- ```javascript
222
- visualVariables: [{
223
- type: "opacity",
224
- field: "confidence",
225
- stops: [
226
- { value: 0, opacity: 0.1 },
227
- { value: 100, opacity: 1 }
228
- ]
229
- }]
230
- ```
231
-
232
- ### Rotation Variable
233
- ```javascript
234
- visualVariables: [{
235
- type: "rotation",
236
- field: "heading",
237
- rotationType: "geographic"
238
- }]
239
- ```
240
-
241
- ## Labeling
242
-
243
- ```javascript
244
- layer.labelingInfo = [{
245
- symbol: {
246
- type: "text",
247
- color: "white",
248
- font: { family: "Noto Sans", size: 10, weight: "bold" },
249
- haloColor: "#472b77",
250
- haloSize: 1
251
- },
252
- labelPlacement: "above-center",
253
- labelExpressionInfo: {
254
- expression: "$feature.name"
255
- },
256
- where: "population > 10000",
257
- minScale: 500000
258
- }];
259
-
260
- layer.labelsVisible = true;
261
- ```
262
-
263
- ### Label Placements
264
- - Points: `above-center`, `below-center`, `center-center`
265
- - Lines: `above-along`, `below-along`, `center-along`
266
- - Polygons: `always-horizontal`
267
-
268
- ## Effects and Blend Modes
269
-
270
- ```javascript
271
- // Layer effects
272
- layer.effect = "drop-shadow(2px 2px 3px gray)";
273
- layer.effect = "blur(2px)";
274
- layer.effect = "grayscale(100%)";
275
- layer.effect = "brightness(150%) contrast(120%)";
276
-
277
- // Blend modes
278
- layer.blendMode = "multiply";
279
- ```
280
-
281
- ## Feature Effects
282
-
283
- ```javascript
284
- import FeatureEffect from "@arcgis/core/layers/support/FeatureEffect.js";
285
-
286
- layerView.featureEffect = new FeatureEffect({
287
- filter: { where: "population > 100000" },
288
- includedEffect: "bloom(1, 0.5px, 0.2)",
289
- excludedEffect: "grayscale(100%) opacity(30%)"
290
- });
291
- ```
292
-
293
- ## Smart Mapping (Auto-generated Renderers)
294
-
295
- ```javascript
296
- import colorRendererCreator from "@arcgis/core/smartMapping/renderers/color.js";
297
-
298
- const response = await colorRendererCreator.createContinuousRenderer({
299
- layer: layer,
300
- field: "population",
301
- view: view,
302
- theme: "high-to-low"
303
- });
304
- layer.renderer = response.renderer;
305
- ```
306
-
307
- ## TypeScript: Use `as const`
308
-
309
- ```typescript
310
- layer.renderer = {
311
- type: "simple",
312
- symbol: { type: "simple-marker", color: "red", size: 8 }
313
- } as const;
314
- ```
315
-
316
- ## Common Pitfalls
317
-
318
- 1. **Missing type property** - Always include `type` for autocasting
319
- 2. **Color formats** - Use hex, named, RGB array, or RGBA array
320
- 3. **Visual variables require numeric fields** - Field must contain numbers
321
- 4. **Label expressions are Arcade** - Use Arcade syntax, not JavaScript
@@ -1,277 +0,0 @@
1
- ---
2
- applyTo: "**/*.{js,ts,jsx,tsx,html}"
3
- ---
4
-
5
- # ArcGIS Maps SDK - Widgets & UI
6
-
7
- ## Map Components (Recommended)
8
-
9
- ### Available Components
10
-
11
- | Component | Purpose |
12
- |-----------|---------|
13
- | `arcgis-zoom` | Zoom buttons |
14
- | `arcgis-compass` | Orientation indicator |
15
- | `arcgis-home` | Return to initial extent |
16
- | `arcgis-locate` | Find user location |
17
- | `arcgis-fullscreen` | Toggle fullscreen |
18
- | `arcgis-scale-bar` | Display scale |
19
- | `arcgis-legend` | Layer symbology |
20
- | `arcgis-layer-list` | Layer visibility |
21
- | `arcgis-basemap-gallery` | Switch basemaps |
22
- | `arcgis-search` | Location search |
23
- | `arcgis-editor` | Feature editing |
24
- | `arcgis-sketch` | Draw geometries |
25
- | `arcgis-feature-table` | Tabular data |
26
- | `arcgis-time-slider` | Temporal navigation |
27
- | `arcgis-print` | Map printing |
28
- | `arcgis-expand` | Collapsible container |
29
-
30
- ### Slot-Based Positioning
31
-
32
- ```html
33
- <arcgis-map basemap="streets-vector">
34
- <arcgis-zoom slot="top-left"></arcgis-zoom>
35
- <arcgis-home slot="top-left"></arcgis-home>
36
- <arcgis-search slot="top-right"></arcgis-search>
37
- <arcgis-legend slot="bottom-left"></arcgis-legend>
38
- <arcgis-scale-bar slot="bottom-right"></arcgis-scale-bar>
39
- <arcgis-popup slot="popup"></arcgis-popup>
40
- </arcgis-map>
41
- ```
42
-
43
- Available slots: `top-left`, `top-right`, `bottom-left`, `bottom-right`, `popup`, `manual`
44
-
45
- ### Expand Component
46
-
47
- ```html
48
- <arcgis-expand slot="top-right" expand-tooltip="Show Legend" mode="floating">
49
- <arcgis-legend></arcgis-legend>
50
- </arcgis-expand>
51
- ```
52
-
53
- ### Reference Element (External Components)
54
-
55
- ```html
56
- <calcite-shell-panel slot="panel-start">
57
- <arcgis-legend reference-element="arcgis-map"></arcgis-legend>
58
- </calcite-shell-panel>
59
-
60
- <arcgis-map id="arcgis-map" basemap="topo-vector"></arcgis-map>
61
- ```
62
-
63
- ## Core API Widgets
64
-
65
- ### Adding Widgets
66
-
67
- ```javascript
68
- import Legend from "@arcgis/core/widgets/Legend.js";
69
- import Search from "@arcgis/core/widgets/Search.js";
70
-
71
- const legend = new Legend({ view: view });
72
- view.ui.add(legend, "bottom-left");
73
-
74
- // Add multiple widgets
75
- view.ui.add([
76
- { component: legend, position: "bottom-left" },
77
- { component: search, position: "top-right" }
78
- ]);
79
-
80
- // Remove widget
81
- view.ui.remove(legend);
82
- ```
83
-
84
- ### Widget in Custom Container
85
-
86
- ```javascript
87
- const legend = new Legend({
88
- view: view,
89
- container: "legendDiv"
90
- });
91
- ```
92
-
93
- ## Common Widgets
94
-
95
- ### Legend
96
-
97
- ```javascript
98
- import Legend from "@arcgis/core/widgets/Legend.js";
99
-
100
- const legend = new Legend({
101
- view: view,
102
- layerInfos: [{
103
- layer: featureLayer,
104
- title: "Custom Title"
105
- }]
106
- });
107
- ```
108
-
109
- ### LayerList with Actions
110
-
111
- ```javascript
112
- import LayerList from "@arcgis/core/widgets/LayerList.js";
113
-
114
- const layerList = new LayerList({
115
- view: view,
116
- listItemCreatedFunction: (event) => {
117
- event.item.actionsSections = [[{
118
- title: "Zoom to layer",
119
- icon: "zoom-to-object",
120
- id: "zoom-to"
121
- }]];
122
- }
123
- });
124
-
125
- layerList.on("trigger-action", (event) => {
126
- if (event.action.id === "zoom-to") {
127
- view.goTo(event.item.layer.fullExtent);
128
- }
129
- });
130
- ```
131
-
132
- ### Search with Custom Sources
133
-
134
- ```javascript
135
- import Search from "@arcgis/core/widgets/Search.js";
136
-
137
- const search = new Search({
138
- view: view,
139
- sources: [{
140
- layer: featureLayer,
141
- searchFields: ["name", "address"],
142
- displayField: "name",
143
- placeholder: "Search features"
144
- }]
145
- });
146
-
147
- search.on("select-result", (event) => {
148
- console.log("Selected:", event.result);
149
- });
150
- ```
151
-
152
- ### FeatureTable
153
-
154
- ```javascript
155
- import FeatureTable from "@arcgis/core/widgets/FeatureTable.js";
156
-
157
- const table = new FeatureTable({
158
- view: view,
159
- layer: featureLayer,
160
- container: "tableDiv",
161
- visibleElements: {
162
- header: true,
163
- columnMenus: true,
164
- selectionColumn: true
165
- }
166
- });
167
-
168
- table.on("selection-change", (event) => {
169
- console.log("Selected:", event.added);
170
- });
171
- ```
172
-
173
- ### TimeSlider
174
-
175
- ```javascript
176
- import TimeSlider from "@arcgis/core/widgets/TimeSlider.js";
177
-
178
- const timeSlider = new TimeSlider({
179
- view: view,
180
- mode: "time-window",
181
- fullTimeExtent: layer.timeInfo.fullTimeExtent,
182
- stops: { interval: { value: 1, unit: "hours" } },
183
- playRate: 1000,
184
- loop: true
185
- });
186
-
187
- timeSlider.watch("timeExtent", (timeExtent) => {
188
- console.log("Time:", timeExtent.start, timeExtent.end);
189
- });
190
- ```
191
-
192
- ### Print
193
-
194
- ```javascript
195
- import Print from "@arcgis/core/widgets/Print.js";
196
-
197
- const print = new Print({
198
- view: view,
199
- printServiceUrl: "https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
200
- });
201
- ```
202
-
203
- ## Calcite Design System
204
-
205
- ### Basic Layout
206
-
207
- ```html
208
- <calcite-shell>
209
- <calcite-navigation slot="header">
210
- <calcite-navigation-logo slot="logo" heading="My App"></calcite-navigation-logo>
211
- </calcite-navigation>
212
-
213
- <calcite-shell-panel slot="panel-start">
214
- <calcite-panel heading="Layers">
215
- <arcgis-layer-list reference-element="map"></arcgis-layer-list>
216
- </calcite-panel>
217
- </calcite-shell-panel>
218
-
219
- <arcgis-map id="map" basemap="streets-vector">
220
- <arcgis-zoom slot="top-left"></arcgis-zoom>
221
- </arcgis-map>
222
- </calcite-shell>
223
- ```
224
-
225
- ### Action Bar
226
-
227
- ```html
228
- <calcite-action-bar slot="action-bar">
229
- <calcite-action icon="layers" text="Layers"></calcite-action>
230
- <calcite-action icon="legend" text="Legend"></calcite-action>
231
- <calcite-action icon="bookmark" text="Bookmarks"></calcite-action>
232
- </calcite-action-bar>
233
- ```
234
-
235
- ### Common Calcite Components
236
-
237
- | Component | Purpose |
238
- |-----------|---------|
239
- | `calcite-shell` | App container |
240
- | `calcite-shell-panel` | Side panels |
241
- | `calcite-panel` | Content panel |
242
- | `calcite-navigation` | Header/footer |
243
- | `calcite-action-bar` | Icon button bar |
244
- | `calcite-button` | Standard button |
245
- | `calcite-input` | Text input |
246
- | `calcite-modal` | Modal dialog |
247
- | `calcite-alert` | Alert message |
248
- | `calcite-loader` | Loading indicator |
249
-
250
- ### Theming
251
-
252
- ```html
253
- <body class="calcite-mode-light">
254
- <body class="calcite-mode-dark">
255
-
256
- <style>
257
- :root {
258
- --calcite-color-brand: #007ac2;
259
- }
260
- </style>
261
- ```
262
-
263
- ## Widget Events
264
-
265
- ```javascript
266
- search.on("select-result", (event) => console.log(event.result));
267
- layerList.on("trigger-action", (event) => console.log(event.action));
268
- timeSlider.watch("timeExtent", (value) => console.log(value));
269
- featureTable.on("selection-change", (event) => console.log(event.added));
270
- ```
271
-
272
- ## Common Pitfalls
273
-
274
- 1. **Missing reference-element** - Use when placing components outside the map
275
- 2. **Slot names exact** - Use `top-left`, not `topleft`
276
- 3. **Calcite CSS** - Ensure Calcite script is loaded first
277
- 4. **Dark/light mode** - Add `calcite-mode-light` or `calcite-mode-dark` to body