@saschabrunnerch/arcgis-maps-sdk-js-ai-context 0.0.2 → 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 (52) hide show
  1. package/README.md +163 -203
  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/{claude → skills}/arcgis-starter-app-extended/SKILL.md +649 -649
  25. package/contexts/4.34/{claude → skills}/arcgis-tables-forms/SKILL.md +877 -877
  26. package/contexts/4.34/{claude → skills}/arcgis-time-animation/SKILL.md +722 -722
  27. package/contexts/4.34/{claude → skills}/arcgis-utility-networks/SKILL.md +301 -301
  28. package/contexts/4.34/{claude → skills}/arcgis-visualization/SKILL.md +580 -580
  29. package/contexts/4.34/{claude → skills}/arcgis-widgets-ui/SKILL.md +574 -574
  30. package/lib/installer.js +19 -104
  31. package/package.json +45 -45
  32. package/contexts/4.34/copilot/arcgis-3d.instructions.md +0 -267
  33. package/contexts/4.34/copilot/arcgis-analysis.instructions.md +0 -294
  34. package/contexts/4.34/copilot/arcgis-arcade.instructions.md +0 -234
  35. package/contexts/4.34/copilot/arcgis-authentication.instructions.md +0 -187
  36. package/contexts/4.34/copilot/arcgis-cim-symbols.instructions.md +0 -177
  37. package/contexts/4.34/copilot/arcgis-core-maps.instructions.md +0 -246
  38. package/contexts/4.34/copilot/arcgis-core-utilities.instructions.md +0 -247
  39. package/contexts/4.34/copilot/arcgis-editing.instructions.md +0 -262
  40. package/contexts/4.34/copilot/arcgis-geometry.instructions.md +0 -225
  41. package/contexts/4.34/copilot/arcgis-layers.instructions.md +0 -278
  42. package/contexts/4.34/copilot/arcgis-popup-templates.instructions.md +0 -266
  43. package/contexts/4.34/copilot/arcgis-portal-advanced.instructions.md +0 -275
  44. package/contexts/4.34/copilot/arcgis-smart-mapping.instructions.md +0 -184
  45. package/contexts/4.34/copilot/arcgis-starter-app-extended.instructions.md +0 -643
  46. package/contexts/4.34/copilot/arcgis-starter-app.instructions.md +0 -268
  47. package/contexts/4.34/copilot/arcgis-time-animation.instructions.md +0 -112
  48. package/contexts/4.34/copilot/arcgis-visualization.instructions.md +0 -321
  49. package/contexts/4.34/copilot/arcgis-widgets-ui.instructions.md +0 -277
  50. /package/contexts/4.34/{claude → skills}/arcgis-arcade/SKILL.md +0 -0
  51. /package/contexts/4.34/{claude → skills}/arcgis-popup-templates/SKILL.md +0 -0
  52. /package/contexts/4.34/{claude → skills}/arcgis-starter-app/SKILL.md +0 -0
@@ -1,486 +1,486 @@
1
- ---
2
- name: arcgis-cim-symbols
3
- description: Create advanced cartographic symbols using CIM (Cartographic Information Model). Use for complex multi-layer symbols, animated markers, custom line patterns, and data-driven symbology.
4
- ---
5
-
6
- # ArcGIS CIM Symbols
7
-
8
- Use this skill for creating advanced cartographic symbols with CIM (Cartographic Information Model).
9
-
10
- ## CIM Symbol Basics
11
-
12
- CIM symbols provide advanced cartographic capabilities:
13
- - Multi-layer symbols
14
- - Complex marker graphics
15
- - Custom line patterns
16
- - Animated symbols
17
- - Data-driven symbol properties
18
-
19
- ### Basic CIM Symbol
20
- ```javascript
21
- const graphic = new Graphic({
22
- geometry: point,
23
- symbol: {
24
- type: "cim",
25
- data: {
26
- type: "CIMSymbolReference",
27
- symbol: {
28
- type: "CIMPointSymbol",
29
- symbolLayers: [{
30
- type: "CIMVectorMarker",
31
- enable: true,
32
- size: 20,
33
- frame: { xmin: 0, ymin: 0, xmax: 10, ymax: 10 },
34
- markerGraphics: [{
35
- type: "CIMMarkerGraphic",
36
- geometry: {
37
- rings: [[[0,0], [10,0], [10,10], [0,10], [0,0]]]
38
- },
39
- symbol: {
40
- type: "CIMPolygonSymbol",
41
- symbolLayers: [{
42
- type: "CIMSolidFill",
43
- enable: true,
44
- color: [255, 0, 0, 255]
45
- }]
46
- }
47
- }]
48
- }]
49
- }
50
- }
51
- }
52
- });
53
- ```
54
-
55
- ## CIM Point Symbols
56
-
57
- ### Numbered Marker
58
- ```javascript
59
- function getNumberedMarkerCIM(number) {
60
- return {
61
- type: "CIMSymbolReference",
62
- primitiveOverrides: [{
63
- type: "CIMPrimitiveOverride",
64
- primitiveName: "textGraphic",
65
- propertyName: "TextString",
66
- valueExpressionInfo: {
67
- type: "CIMExpressionInfo",
68
- expression: "$feature.text",
69
- returnType: "Default"
70
- }
71
- }],
72
- symbol: {
73
- type: "CIMPointSymbol",
74
- symbolLayers: [
75
- // Text layer (on top)
76
- {
77
- type: "CIMVectorMarker",
78
- enable: true,
79
- size: 32,
80
- frame: { xmin: -5, ymin: -5, xmax: 5, ymax: 5 },
81
- markerGraphics: [{
82
- type: "CIMMarkerGraphic",
83
- primitiveName: "textGraphic",
84
- geometry: { x: 0, y: 0 },
85
- symbol: {
86
- type: "CIMTextSymbol",
87
- fontFamilyName: "Arial",
88
- fontStyleName: "Bold",
89
- height: 4,
90
- horizontalAlignment: "Center",
91
- verticalAlignment: "Center",
92
- symbol: {
93
- type: "CIMPolygonSymbol",
94
- symbolLayers: [{
95
- type: "CIMSolidFill",
96
- enable: true,
97
- color: [255, 255, 255, 255]
98
- }]
99
- }
100
- },
101
- textString: String(number)
102
- }]
103
- },
104
- // Circle background
105
- {
106
- type: "CIMVectorMarker",
107
- enable: true,
108
- size: 24,
109
- frame: { xmin: 0, ymin: 0, xmax: 10, ymax: 10 },
110
- markerGraphics: [{
111
- type: "CIMMarkerGraphic",
112
- geometry: {
113
- rings: [/* circle coordinates */]
114
- },
115
- symbol: {
116
- type: "CIMPolygonSymbol",
117
- symbolLayers: [{
118
- type: "CIMSolidFill",
119
- enable: true,
120
- color: [0, 100, 200, 255]
121
- }]
122
- }
123
- }]
124
- }
125
- ]
126
- }
127
- };
128
- }
129
- ```
130
-
131
- ### Pin Marker
132
- ```javascript
133
- const pinMarkerCIM = {
134
- type: "CIMSymbolReference",
135
- symbol: {
136
- type: "CIMPointSymbol",
137
- symbolLayers: [{
138
- type: "CIMVectorMarker",
139
- enable: true,
140
- anchorPoint: { x: 0, y: -0.5 },
141
- anchorPointUnits: "Relative",
142
- size: 40,
143
- frame: { xmin: 0, ymin: 0, xmax: 20, ymax: 30 },
144
- markerGraphics: [{
145
- type: "CIMMarkerGraphic",
146
- geometry: {
147
- rings: [[
148
- [10, 30], [0, 15], [0, 10],
149
- [10, 0], [20, 10], [20, 15], [10, 30]
150
- ]]
151
- },
152
- symbol: {
153
- type: "CIMPolygonSymbol",
154
- symbolLayers: [
155
- {
156
- type: "CIMSolidStroke",
157
- enable: true,
158
- width: 1,
159
- color: [50, 50, 50, 255]
160
- },
161
- {
162
- type: "CIMSolidFill",
163
- enable: true,
164
- color: [255, 100, 100, 255]
165
- }
166
- ]
167
- }
168
- }]
169
- }]
170
- }
171
- };
172
- ```
173
-
174
- ## CIM Line Symbols
175
-
176
- ### Arrow Line
177
- ```javascript
178
- const arrowLineCIM = {
179
- type: "CIMSymbolReference",
180
- symbol: {
181
- type: "CIMLineSymbol",
182
- symbolLayers: [
183
- // Arrow head at end
184
- {
185
- type: "CIMVectorMarker",
186
- enable: true,
187
- size: 12,
188
- markerPlacement: {
189
- type: "CIMMarkerPlacementAtExtremities",
190
- extremityPlacement: "JustEnd",
191
- angleToLine: true
192
- },
193
- frame: { xmin: 0, ymin: 0, xmax: 10, ymax: 10 },
194
- markerGraphics: [{
195
- type: "CIMMarkerGraphic",
196
- geometry: {
197
- rings: [[[0, 0], [10, 5], [0, 10], [3, 5], [0, 0]]]
198
- },
199
- symbol: {
200
- type: "CIMPolygonSymbol",
201
- symbolLayers: [{
202
- type: "CIMSolidFill",
203
- enable: true,
204
- color: [0, 0, 0, 255]
205
- }]
206
- }
207
- }]
208
- },
209
- // Line stroke
210
- {
211
- type: "CIMSolidStroke",
212
- enable: true,
213
- width: 2,
214
- color: [0, 0, 0, 255]
215
- }
216
- ]
217
- }
218
- };
219
- ```
220
-
221
- ### Dashed Line with Pattern
222
- ```javascript
223
- const dashedLineCIM = {
224
- type: "CIMSymbolReference",
225
- symbol: {
226
- type: "CIMLineSymbol",
227
- symbolLayers: [{
228
- type: "CIMSolidStroke",
229
- enable: true,
230
- width: 3,
231
- color: [0, 100, 200, 255],
232
- effects: [{
233
- type: "CIMGeometricEffectDashes",
234
- dashTemplate: [8, 4, 2, 4], // dash, gap, dash, gap
235
- lineDashEnding: "NoConstraint"
236
- }]
237
- }]
238
- }
239
- };
240
- ```
241
-
242
- ## CIM Polygon Symbols
243
-
244
- ### Hatched Fill
245
- ```javascript
246
- const hatchedFillCIM = {
247
- type: "CIMSymbolReference",
248
- symbol: {
249
- type: "CIMPolygonSymbol",
250
- symbolLayers: [
251
- // Hatch pattern
252
- {
253
- type: "CIMHatchFill",
254
- enable: true,
255
- lineSymbol: {
256
- type: "CIMLineSymbol",
257
- symbolLayers: [{
258
- type: "CIMSolidStroke",
259
- enable: true,
260
- width: 1,
261
- color: [0, 0, 0, 255]
262
- }]
263
- },
264
- rotation: 45,
265
- separation: 5
266
- },
267
- // Background fill
268
- {
269
- type: "CIMSolidFill",
270
- enable: true,
271
- color: [255, 255, 200, 255]
272
- },
273
- // Outline
274
- {
275
- type: "CIMSolidStroke",
276
- enable: true,
277
- width: 2,
278
- color: [0, 0, 0, 255]
279
- }
280
- ]
281
- }
282
- };
283
- ```
284
-
285
- ## Marker Placement
286
-
287
- ### Along Line
288
- ```javascript
289
- const markerAlongLine = {
290
- type: "CIMVectorMarker",
291
- enable: true,
292
- size: 10,
293
- markerPlacement: {
294
- type: "CIMMarkerPlacementAlongLineSameSize",
295
- placementTemplate: [20], // Every 20 points
296
- angleToLine: true
297
- },
298
- // ... marker graphics
299
- };
300
- ```
301
-
302
- ### At Vertices
303
- ```javascript
304
- const markerAtVertices = {
305
- type: "CIMVectorMarker",
306
- enable: true,
307
- size: 8,
308
- markerPlacement: {
309
- type: "CIMMarkerPlacementAtRatioPositions",
310
- positionArray: [0, 0.5, 1], // Start, middle, end
311
- angleToLine: true
312
- },
313
- // ... marker graphics
314
- };
315
- ```
316
-
317
- ## Animated CIM Symbols
318
-
319
- ```javascript
320
- // Animation is controlled via primitive overrides
321
- const animatedCIM = {
322
- type: "CIMSymbolReference",
323
- primitiveOverrides: [{
324
- type: "CIMPrimitiveOverride",
325
- primitiveName: "rotatingElement",
326
- propertyName: "Rotation",
327
- valueExpressionInfo: {
328
- type: "CIMExpressionInfo",
329
- expression: "$view.animation.currentTime * 360",
330
- returnType: "Default"
331
- }
332
- }],
333
- symbol: {
334
- type: "CIMPointSymbol",
335
- symbolLayers: [{
336
- type: "CIMVectorMarker",
337
- primitiveName: "rotatingElement",
338
- // ... marker definition
339
- }]
340
- }
341
- };
342
- ```
343
-
344
- ## Data-Driven Properties
345
-
346
- ### Color from Attribute
347
- ```javascript
348
- const dataDrivenCIM = {
349
- type: "CIMSymbolReference",
350
- primitiveOverrides: [{
351
- type: "CIMPrimitiveOverride",
352
- primitiveName: "fillLayer",
353
- propertyName: "Color",
354
- valueExpressionInfo: {
355
- type: "CIMExpressionInfo",
356
- expression: `
357
- var val = $feature.value;
358
- if (val < 50) return [255, 0, 0, 255];
359
- if (val < 100) return [255, 255, 0, 255];
360
- return [0, 255, 0, 255];
361
- `,
362
- returnType: "Default"
363
- }
364
- }],
365
- symbol: {
366
- type: "CIMPointSymbol",
367
- symbolLayers: [{
368
- type: "CIMVectorMarker",
369
- markerGraphics: [{
370
- type: "CIMMarkerGraphic",
371
- symbol: {
372
- type: "CIMPolygonSymbol",
373
- symbolLayers: [{
374
- type: "CIMSolidFill",
375
- primitiveName: "fillLayer",
376
- enable: true,
377
- color: [128, 128, 128, 255] // Default
378
- }]
379
- }
380
- }]
381
- }]
382
- }
383
- };
384
- ```
385
-
386
- ### Size from Attribute
387
- ```javascript
388
- primitiveOverrides: [{
389
- type: "CIMPrimitiveOverride",
390
- primitiveName: "mainMarker",
391
- propertyName: "Size",
392
- valueExpressionInfo: {
393
- type: "CIMExpressionInfo",
394
- expression: "Sqrt($feature.population) * 0.01",
395
- returnType: "Default"
396
- }
397
- }]
398
- ```
399
-
400
- ## Common CIM Properties
401
-
402
- ### Colors
403
- ```javascript
404
- // RGBA array [R, G, B, A] where each value is 0-255
405
- color: [255, 0, 0, 255] // Red, fully opaque
406
- color: [0, 0, 255, 128] // Blue, 50% transparent
407
- ```
408
-
409
- ### Stroke Properties
410
- ```javascript
411
- {
412
- type: "CIMSolidStroke",
413
- enable: true,
414
- width: 2,
415
- color: [0, 0, 0, 255],
416
- capStyle: "Round", // Butt, Round, Square
417
- joinStyle: "Round", // Bevel, Miter, Round
418
- miterLimit: 10
419
- }
420
- ```
421
-
422
- ### Anchor Points
423
- ```javascript
424
- {
425
- anchorPoint: { x: 0, y: 0 }, // Center
426
- anchorPoint: { x: 0, y: -0.5 }, // Bottom center
427
- anchorPointUnits: "Relative" // Relative or Absolute
428
- }
429
- ```
430
-
431
- ## TypeScript Usage
432
-
433
- CIM symbols are plain objects by design (following CIM specification). For TypeScript safety, use `as const` or type annotations:
434
-
435
- ### Using `as const`
436
- ```typescript
437
- const cimSymbol = {
438
- type: "cim",
439
- data: {
440
- type: "CIMSymbolReference",
441
- symbol: {
442
- type: "CIMPointSymbol",
443
- symbolLayers: [{
444
- type: "CIMVectorMarker",
445
- enable: true,
446
- size: 20,
447
- // ... rest of symbol definition
448
- }]
449
- }
450
- }
451
- } as const;
452
- ```
453
-
454
- ### Using Type Annotation
455
- ```typescript
456
- const cimSymbol: __esri.CIMSymbolProperties = {
457
- type: "cim",
458
- data: {
459
- type: "CIMSymbolReference",
460
- symbol: {
461
- type: "CIMPointSymbol",
462
- symbolLayers: [{
463
- type: "CIMVectorMarker",
464
- enable: true,
465
- size: 20,
466
- // ... rest of symbol definition
467
- }]
468
- }
469
- }
470
- };
471
- ```
472
-
473
- > **Note:** CIM symbols are configuration objects and work well with autocasting. Use `as const` to keep discriminated union types narrow in TypeScript. See [arcgis-core-maps skill](../arcgis-core-maps/SKILL.md) for detailed guidance on autocasting.
474
-
475
- ## Common Pitfalls
476
-
477
- 1. **Frame coordinates**: Frame defines the coordinate space for marker graphics
478
-
479
- 2. **Layer order**: Symbol layers render bottom to top in the array
480
-
481
- 3. **Primitive names**: Must be unique within symbol for overrides to work
482
-
483
- 4. **Color format**: Always use [R, G, B, A] with values 0-255
484
-
485
- 5. **Geometry rings**: Rings must be closed (first point = last point)
486
-
1
+ ---
2
+ name: arcgis-cim-symbols
3
+ description: Create advanced cartographic symbols using CIM (Cartographic Information Model). Use for complex multi-layer symbols, animated markers, custom line patterns, and data-driven symbology.
4
+ ---
5
+
6
+ # ArcGIS CIM Symbols
7
+
8
+ Use this skill for creating advanced cartographic symbols with CIM (Cartographic Information Model).
9
+
10
+ ## CIM Symbol Basics
11
+
12
+ CIM symbols provide advanced cartographic capabilities:
13
+ - Multi-layer symbols
14
+ - Complex marker graphics
15
+ - Custom line patterns
16
+ - Animated symbols
17
+ - Data-driven symbol properties
18
+
19
+ ### Basic CIM Symbol
20
+ ```javascript
21
+ const graphic = new Graphic({
22
+ geometry: point,
23
+ symbol: {
24
+ type: "cim",
25
+ data: {
26
+ type: "CIMSymbolReference",
27
+ symbol: {
28
+ type: "CIMPointSymbol",
29
+ symbolLayers: [{
30
+ type: "CIMVectorMarker",
31
+ enable: true,
32
+ size: 20,
33
+ frame: { xmin: 0, ymin: 0, xmax: 10, ymax: 10 },
34
+ markerGraphics: [{
35
+ type: "CIMMarkerGraphic",
36
+ geometry: {
37
+ rings: [[[0,0], [10,0], [10,10], [0,10], [0,0]]]
38
+ },
39
+ symbol: {
40
+ type: "CIMPolygonSymbol",
41
+ symbolLayers: [{
42
+ type: "CIMSolidFill",
43
+ enable: true,
44
+ color: [255, 0, 0, 255]
45
+ }]
46
+ }
47
+ }]
48
+ }]
49
+ }
50
+ }
51
+ }
52
+ });
53
+ ```
54
+
55
+ ## CIM Point Symbols
56
+
57
+ ### Numbered Marker
58
+ ```javascript
59
+ function getNumberedMarkerCIM(number) {
60
+ return {
61
+ type: "CIMSymbolReference",
62
+ primitiveOverrides: [{
63
+ type: "CIMPrimitiveOverride",
64
+ primitiveName: "textGraphic",
65
+ propertyName: "TextString",
66
+ valueExpressionInfo: {
67
+ type: "CIMExpressionInfo",
68
+ expression: "$feature.text",
69
+ returnType: "Default"
70
+ }
71
+ }],
72
+ symbol: {
73
+ type: "CIMPointSymbol",
74
+ symbolLayers: [
75
+ // Text layer (on top)
76
+ {
77
+ type: "CIMVectorMarker",
78
+ enable: true,
79
+ size: 32,
80
+ frame: { xmin: -5, ymin: -5, xmax: 5, ymax: 5 },
81
+ markerGraphics: [{
82
+ type: "CIMMarkerGraphic",
83
+ primitiveName: "textGraphic",
84
+ geometry: { x: 0, y: 0 },
85
+ symbol: {
86
+ type: "CIMTextSymbol",
87
+ fontFamilyName: "Arial",
88
+ fontStyleName: "Bold",
89
+ height: 4,
90
+ horizontalAlignment: "Center",
91
+ verticalAlignment: "Center",
92
+ symbol: {
93
+ type: "CIMPolygonSymbol",
94
+ symbolLayers: [{
95
+ type: "CIMSolidFill",
96
+ enable: true,
97
+ color: [255, 255, 255, 255]
98
+ }]
99
+ }
100
+ },
101
+ textString: String(number)
102
+ }]
103
+ },
104
+ // Circle background
105
+ {
106
+ type: "CIMVectorMarker",
107
+ enable: true,
108
+ size: 24,
109
+ frame: { xmin: 0, ymin: 0, xmax: 10, ymax: 10 },
110
+ markerGraphics: [{
111
+ type: "CIMMarkerGraphic",
112
+ geometry: {
113
+ rings: [/* circle coordinates */]
114
+ },
115
+ symbol: {
116
+ type: "CIMPolygonSymbol",
117
+ symbolLayers: [{
118
+ type: "CIMSolidFill",
119
+ enable: true,
120
+ color: [0, 100, 200, 255]
121
+ }]
122
+ }
123
+ }]
124
+ }
125
+ ]
126
+ }
127
+ };
128
+ }
129
+ ```
130
+
131
+ ### Pin Marker
132
+ ```javascript
133
+ const pinMarkerCIM = {
134
+ type: "CIMSymbolReference",
135
+ symbol: {
136
+ type: "CIMPointSymbol",
137
+ symbolLayers: [{
138
+ type: "CIMVectorMarker",
139
+ enable: true,
140
+ anchorPoint: { x: 0, y: -0.5 },
141
+ anchorPointUnits: "Relative",
142
+ size: 40,
143
+ frame: { xmin: 0, ymin: 0, xmax: 20, ymax: 30 },
144
+ markerGraphics: [{
145
+ type: "CIMMarkerGraphic",
146
+ geometry: {
147
+ rings: [[
148
+ [10, 30], [0, 15], [0, 10],
149
+ [10, 0], [20, 10], [20, 15], [10, 30]
150
+ ]]
151
+ },
152
+ symbol: {
153
+ type: "CIMPolygonSymbol",
154
+ symbolLayers: [
155
+ {
156
+ type: "CIMSolidStroke",
157
+ enable: true,
158
+ width: 1,
159
+ color: [50, 50, 50, 255]
160
+ },
161
+ {
162
+ type: "CIMSolidFill",
163
+ enable: true,
164
+ color: [255, 100, 100, 255]
165
+ }
166
+ ]
167
+ }
168
+ }]
169
+ }]
170
+ }
171
+ };
172
+ ```
173
+
174
+ ## CIM Line Symbols
175
+
176
+ ### Arrow Line
177
+ ```javascript
178
+ const arrowLineCIM = {
179
+ type: "CIMSymbolReference",
180
+ symbol: {
181
+ type: "CIMLineSymbol",
182
+ symbolLayers: [
183
+ // Arrow head at end
184
+ {
185
+ type: "CIMVectorMarker",
186
+ enable: true,
187
+ size: 12,
188
+ markerPlacement: {
189
+ type: "CIMMarkerPlacementAtExtremities",
190
+ extremityPlacement: "JustEnd",
191
+ angleToLine: true
192
+ },
193
+ frame: { xmin: 0, ymin: 0, xmax: 10, ymax: 10 },
194
+ markerGraphics: [{
195
+ type: "CIMMarkerGraphic",
196
+ geometry: {
197
+ rings: [[[0, 0], [10, 5], [0, 10], [3, 5], [0, 0]]]
198
+ },
199
+ symbol: {
200
+ type: "CIMPolygonSymbol",
201
+ symbolLayers: [{
202
+ type: "CIMSolidFill",
203
+ enable: true,
204
+ color: [0, 0, 0, 255]
205
+ }]
206
+ }
207
+ }]
208
+ },
209
+ // Line stroke
210
+ {
211
+ type: "CIMSolidStroke",
212
+ enable: true,
213
+ width: 2,
214
+ color: [0, 0, 0, 255]
215
+ }
216
+ ]
217
+ }
218
+ };
219
+ ```
220
+
221
+ ### Dashed Line with Pattern
222
+ ```javascript
223
+ const dashedLineCIM = {
224
+ type: "CIMSymbolReference",
225
+ symbol: {
226
+ type: "CIMLineSymbol",
227
+ symbolLayers: [{
228
+ type: "CIMSolidStroke",
229
+ enable: true,
230
+ width: 3,
231
+ color: [0, 100, 200, 255],
232
+ effects: [{
233
+ type: "CIMGeometricEffectDashes",
234
+ dashTemplate: [8, 4, 2, 4], // dash, gap, dash, gap
235
+ lineDashEnding: "NoConstraint"
236
+ }]
237
+ }]
238
+ }
239
+ };
240
+ ```
241
+
242
+ ## CIM Polygon Symbols
243
+
244
+ ### Hatched Fill
245
+ ```javascript
246
+ const hatchedFillCIM = {
247
+ type: "CIMSymbolReference",
248
+ symbol: {
249
+ type: "CIMPolygonSymbol",
250
+ symbolLayers: [
251
+ // Hatch pattern
252
+ {
253
+ type: "CIMHatchFill",
254
+ enable: true,
255
+ lineSymbol: {
256
+ type: "CIMLineSymbol",
257
+ symbolLayers: [{
258
+ type: "CIMSolidStroke",
259
+ enable: true,
260
+ width: 1,
261
+ color: [0, 0, 0, 255]
262
+ }]
263
+ },
264
+ rotation: 45,
265
+ separation: 5
266
+ },
267
+ // Background fill
268
+ {
269
+ type: "CIMSolidFill",
270
+ enable: true,
271
+ color: [255, 255, 200, 255]
272
+ },
273
+ // Outline
274
+ {
275
+ type: "CIMSolidStroke",
276
+ enable: true,
277
+ width: 2,
278
+ color: [0, 0, 0, 255]
279
+ }
280
+ ]
281
+ }
282
+ };
283
+ ```
284
+
285
+ ## Marker Placement
286
+
287
+ ### Along Line
288
+ ```javascript
289
+ const markerAlongLine = {
290
+ type: "CIMVectorMarker",
291
+ enable: true,
292
+ size: 10,
293
+ markerPlacement: {
294
+ type: "CIMMarkerPlacementAlongLineSameSize",
295
+ placementTemplate: [20], // Every 20 points
296
+ angleToLine: true
297
+ },
298
+ // ... marker graphics
299
+ };
300
+ ```
301
+
302
+ ### At Vertices
303
+ ```javascript
304
+ const markerAtVertices = {
305
+ type: "CIMVectorMarker",
306
+ enable: true,
307
+ size: 8,
308
+ markerPlacement: {
309
+ type: "CIMMarkerPlacementAtRatioPositions",
310
+ positionArray: [0, 0.5, 1], // Start, middle, end
311
+ angleToLine: true
312
+ },
313
+ // ... marker graphics
314
+ };
315
+ ```
316
+
317
+ ## Animated CIM Symbols
318
+
319
+ ```javascript
320
+ // Animation is controlled via primitive overrides
321
+ const animatedCIM = {
322
+ type: "CIMSymbolReference",
323
+ primitiveOverrides: [{
324
+ type: "CIMPrimitiveOverride",
325
+ primitiveName: "rotatingElement",
326
+ propertyName: "Rotation",
327
+ valueExpressionInfo: {
328
+ type: "CIMExpressionInfo",
329
+ expression: "$view.animation.currentTime * 360",
330
+ returnType: "Default"
331
+ }
332
+ }],
333
+ symbol: {
334
+ type: "CIMPointSymbol",
335
+ symbolLayers: [{
336
+ type: "CIMVectorMarker",
337
+ primitiveName: "rotatingElement",
338
+ // ... marker definition
339
+ }]
340
+ }
341
+ };
342
+ ```
343
+
344
+ ## Data-Driven Properties
345
+
346
+ ### Color from Attribute
347
+ ```javascript
348
+ const dataDrivenCIM = {
349
+ type: "CIMSymbolReference",
350
+ primitiveOverrides: [{
351
+ type: "CIMPrimitiveOverride",
352
+ primitiveName: "fillLayer",
353
+ propertyName: "Color",
354
+ valueExpressionInfo: {
355
+ type: "CIMExpressionInfo",
356
+ expression: `
357
+ var val = $feature.value;
358
+ if (val < 50) return [255, 0, 0, 255];
359
+ if (val < 100) return [255, 255, 0, 255];
360
+ return [0, 255, 0, 255];
361
+ `,
362
+ returnType: "Default"
363
+ }
364
+ }],
365
+ symbol: {
366
+ type: "CIMPointSymbol",
367
+ symbolLayers: [{
368
+ type: "CIMVectorMarker",
369
+ markerGraphics: [{
370
+ type: "CIMMarkerGraphic",
371
+ symbol: {
372
+ type: "CIMPolygonSymbol",
373
+ symbolLayers: [{
374
+ type: "CIMSolidFill",
375
+ primitiveName: "fillLayer",
376
+ enable: true,
377
+ color: [128, 128, 128, 255] // Default
378
+ }]
379
+ }
380
+ }]
381
+ }]
382
+ }
383
+ };
384
+ ```
385
+
386
+ ### Size from Attribute
387
+ ```javascript
388
+ primitiveOverrides: [{
389
+ type: "CIMPrimitiveOverride",
390
+ primitiveName: "mainMarker",
391
+ propertyName: "Size",
392
+ valueExpressionInfo: {
393
+ type: "CIMExpressionInfo",
394
+ expression: "Sqrt($feature.population) * 0.01",
395
+ returnType: "Default"
396
+ }
397
+ }]
398
+ ```
399
+
400
+ ## Common CIM Properties
401
+
402
+ ### Colors
403
+ ```javascript
404
+ // RGBA array [R, G, B, A] where each value is 0-255
405
+ color: [255, 0, 0, 255] // Red, fully opaque
406
+ color: [0, 0, 255, 128] // Blue, 50% transparent
407
+ ```
408
+
409
+ ### Stroke Properties
410
+ ```javascript
411
+ {
412
+ type: "CIMSolidStroke",
413
+ enable: true,
414
+ width: 2,
415
+ color: [0, 0, 0, 255],
416
+ capStyle: "Round", // Butt, Round, Square
417
+ joinStyle: "Round", // Bevel, Miter, Round
418
+ miterLimit: 10
419
+ }
420
+ ```
421
+
422
+ ### Anchor Points
423
+ ```javascript
424
+ {
425
+ anchorPoint: { x: 0, y: 0 }, // Center
426
+ anchorPoint: { x: 0, y: -0.5 }, // Bottom center
427
+ anchorPointUnits: "Relative" // Relative or Absolute
428
+ }
429
+ ```
430
+
431
+ ## TypeScript Usage
432
+
433
+ CIM symbols are plain objects by design (following CIM specification). For TypeScript safety, use `as const` or type annotations:
434
+
435
+ ### Using `as const`
436
+ ```typescript
437
+ const cimSymbol = {
438
+ type: "cim",
439
+ data: {
440
+ type: "CIMSymbolReference",
441
+ symbol: {
442
+ type: "CIMPointSymbol",
443
+ symbolLayers: [{
444
+ type: "CIMVectorMarker",
445
+ enable: true,
446
+ size: 20,
447
+ // ... rest of symbol definition
448
+ }]
449
+ }
450
+ }
451
+ } as const;
452
+ ```
453
+
454
+ ### Using Type Annotation
455
+ ```typescript
456
+ const cimSymbol: __esri.CIMSymbolProperties = {
457
+ type: "cim",
458
+ data: {
459
+ type: "CIMSymbolReference",
460
+ symbol: {
461
+ type: "CIMPointSymbol",
462
+ symbolLayers: [{
463
+ type: "CIMVectorMarker",
464
+ enable: true,
465
+ size: 20,
466
+ // ... rest of symbol definition
467
+ }]
468
+ }
469
+ }
470
+ };
471
+ ```
472
+
473
+ > **Note:** CIM symbols are configuration objects and work well with autocasting. Use `as const` to keep discriminated union types narrow in TypeScript. See [arcgis-core-maps skill](../arcgis-core-maps/SKILL.md) for detailed guidance on autocasting.
474
+
475
+ ## Common Pitfalls
476
+
477
+ 1. **Frame coordinates**: Frame defines the coordinate space for marker graphics
478
+
479
+ 2. **Layer order**: Symbol layers render bottom to top in the array
480
+
481
+ 3. **Primitive names**: Must be unique within symbol for overrides to work
482
+
483
+ 4. **Color format**: Always use [R, G, B, A] with values 0-255
484
+
485
+ 5. **Geometry rings**: Rings must be closed (first point = last point)
486
+