@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.
- package/README.md +163 -203
- package/bin/cli.js +157 -173
- package/contexts/4.34/{claude → skills}/arcgis-3d-advanced/SKILL.md +586 -586
- package/contexts/4.34/{claude → skills}/arcgis-advanced-layers/SKILL.md +431 -431
- package/contexts/4.34/{claude → skills}/arcgis-analysis-services/SKILL.md +607 -607
- package/contexts/4.34/{claude → skills}/arcgis-authentication/SKILL.md +301 -301
- package/contexts/4.34/{claude → skills}/arcgis-cim-symbols/SKILL.md +486 -486
- package/contexts/4.34/{claude → skills}/arcgis-coordinates-projection/SKILL.md +406 -406
- package/contexts/4.34/{claude → skills}/arcgis-core-maps/SKILL.md +739 -739
- package/contexts/4.34/{claude → skills}/arcgis-core-utilities/SKILL.md +732 -732
- package/contexts/4.34/{claude → skills}/arcgis-custom-rendering/SKILL.md +445 -445
- package/contexts/4.34/{claude → skills}/arcgis-editing-advanced/SKILL.md +702 -702
- package/contexts/4.34/{claude → skills}/arcgis-feature-effects/SKILL.md +393 -393
- package/contexts/4.34/{claude → skills}/arcgis-geometry-operations/SKILL.md +489 -489
- package/contexts/4.34/{claude → skills}/arcgis-imagery/SKILL.md +307 -307
- package/contexts/4.34/{claude → skills}/arcgis-interaction/SKILL.md +572 -572
- package/contexts/4.34/{claude → skills}/arcgis-knowledge-graphs/SKILL.md +582 -582
- package/contexts/4.34/{claude → skills}/arcgis-layers/SKILL.md +601 -601
- package/contexts/4.34/{claude → skills}/arcgis-map-tools/SKILL.md +668 -668
- package/contexts/4.34/{claude → skills}/arcgis-media-layers/SKILL.md +290 -290
- package/contexts/4.34/{claude → skills}/arcgis-portal-content/SKILL.md +679 -679
- package/contexts/4.34/{claude → skills}/arcgis-scene-effects/SKILL.md +512 -512
- package/contexts/4.34/{claude → skills}/arcgis-smart-mapping/SKILL.md +686 -686
- package/contexts/4.34/{claude → skills}/arcgis-starter-app-extended/SKILL.md +649 -649
- package/contexts/4.34/{claude → skills}/arcgis-tables-forms/SKILL.md +877 -877
- package/contexts/4.34/{claude → skills}/arcgis-time-animation/SKILL.md +722 -722
- package/contexts/4.34/{claude → skills}/arcgis-utility-networks/SKILL.md +301 -301
- package/contexts/4.34/{claude → skills}/arcgis-visualization/SKILL.md +580 -580
- package/contexts/4.34/{claude → skills}/arcgis-widgets-ui/SKILL.md +574 -574
- package/lib/installer.js +19 -104
- package/package.json +45 -45
- package/contexts/4.34/copilot/arcgis-3d.instructions.md +0 -267
- package/contexts/4.34/copilot/arcgis-analysis.instructions.md +0 -294
- package/contexts/4.34/copilot/arcgis-arcade.instructions.md +0 -234
- package/contexts/4.34/copilot/arcgis-authentication.instructions.md +0 -187
- package/contexts/4.34/copilot/arcgis-cim-symbols.instructions.md +0 -177
- package/contexts/4.34/copilot/arcgis-core-maps.instructions.md +0 -246
- package/contexts/4.34/copilot/arcgis-core-utilities.instructions.md +0 -247
- package/contexts/4.34/copilot/arcgis-editing.instructions.md +0 -262
- package/contexts/4.34/copilot/arcgis-geometry.instructions.md +0 -225
- package/contexts/4.34/copilot/arcgis-layers.instructions.md +0 -278
- package/contexts/4.34/copilot/arcgis-popup-templates.instructions.md +0 -266
- package/contexts/4.34/copilot/arcgis-portal-advanced.instructions.md +0 -275
- package/contexts/4.34/copilot/arcgis-smart-mapping.instructions.md +0 -184
- package/contexts/4.34/copilot/arcgis-starter-app-extended.instructions.md +0 -643
- package/contexts/4.34/copilot/arcgis-starter-app.instructions.md +0 -268
- package/contexts/4.34/copilot/arcgis-time-animation.instructions.md +0 -112
- package/contexts/4.34/copilot/arcgis-visualization.instructions.md +0 -321
- package/contexts/4.34/copilot/arcgis-widgets-ui.instructions.md +0 -277
- /package/contexts/4.34/{claude → skills}/arcgis-arcade/SKILL.md +0 -0
- /package/contexts/4.34/{claude → skills}/arcgis-popup-templates/SKILL.md +0 -0
- /package/contexts/4.34/{claude → skills}/arcgis-starter-app/SKILL.md +0 -0
package/lib/installer.js
CHANGED
|
@@ -169,9 +169,9 @@ function listDirContents(dirPath, indent = '') {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
|
-
* Install
|
|
172
|
+
* Install Agent Skills
|
|
173
173
|
*/
|
|
174
|
-
function
|
|
174
|
+
function installSkills(targetDir = process.cwd(), sdkVersion = null) {
|
|
175
175
|
const version = sdkVersion || getLatestVersion();
|
|
176
176
|
|
|
177
177
|
if (!version) {
|
|
@@ -179,15 +179,15 @@ function installClaude(targetDir = process.cwd(), sdkVersion = null) {
|
|
|
179
179
|
return false;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
const destPath = path.join(targetDir, '.
|
|
183
|
-
const srcPath = path.join(getContextsDir(), version, '
|
|
182
|
+
const destPath = path.join(targetDir, '.github', 'skills');
|
|
183
|
+
const srcPath = path.join(getContextsDir(), version, 'skills');
|
|
184
184
|
|
|
185
|
-
header(`Installing
|
|
185
|
+
header(`Installing Agent Skills (SDK ${version})`);
|
|
186
186
|
info(`Source: ${srcPath}`);
|
|
187
187
|
info(`Target: ${destPath}`);
|
|
188
188
|
|
|
189
189
|
if (!fs.existsSync(srcPath)) {
|
|
190
|
-
error(`
|
|
190
|
+
error(`Agent Skills not found for SDK version ${version}`);
|
|
191
191
|
return false;
|
|
192
192
|
}
|
|
193
193
|
|
|
@@ -201,73 +201,11 @@ function installClaude(targetDir = process.cwd(), sdkVersion = null) {
|
|
|
201
201
|
try {
|
|
202
202
|
copyDirSync(srcPath, destPath);
|
|
203
203
|
const fileCount = countFiles(destPath);
|
|
204
|
-
success(`Installed ${fileCount}
|
|
204
|
+
success(`Installed ${fileCount} Agent Skills files for SDK ${version}`);
|
|
205
205
|
success(`Location: ${colorize('cyan', destPath)}`);
|
|
206
206
|
return true;
|
|
207
207
|
} catch (err) {
|
|
208
|
-
error(`Failed to install
|
|
209
|
-
return false;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Install GitHub Copilot instructions
|
|
215
|
-
*/
|
|
216
|
-
function installCopilot(targetDir = process.cwd(), sdkVersion = null) {
|
|
217
|
-
const version = sdkVersion || getLatestVersion();
|
|
218
|
-
|
|
219
|
-
if (!version) {
|
|
220
|
-
error('No SDK versions available');
|
|
221
|
-
return false;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
const destPath = path.join(targetDir, '.github', 'instructions');
|
|
225
|
-
const srcPath = path.join(getContextsDir(), version, 'copilot');
|
|
226
|
-
|
|
227
|
-
header(`Installing GitHub Copilot Instructions (SDK ${version})`);
|
|
228
|
-
info(`Source: ${srcPath}`);
|
|
229
|
-
info(`Target: ${destPath}`);
|
|
230
|
-
|
|
231
|
-
if (!fs.existsSync(srcPath)) {
|
|
232
|
-
error(`Copilot instructions not found for SDK version ${version}`);
|
|
233
|
-
return false;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
if (!isWritable(destPath)) {
|
|
237
|
-
error(`Cannot write to directory: ${destPath}`);
|
|
238
|
-
error('Please check permissions and try again');
|
|
239
|
-
return false;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
try {
|
|
243
|
-
copyDirSync(srcPath, destPath);
|
|
244
|
-
const fileCount = countFiles(destPath);
|
|
245
|
-
success(`Installed ${fileCount} Copilot instruction files for SDK ${version}`);
|
|
246
|
-
success(`Location: ${colorize('cyan', destPath)}`);
|
|
247
|
-
return true;
|
|
248
|
-
} catch (err) {
|
|
249
|
-
error(`Failed to install Copilot instructions: ${err.message}`);
|
|
250
|
-
return false;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Install all contexts
|
|
256
|
-
*/
|
|
257
|
-
function installAll(targetDir = process.cwd(), sdkVersion = null) {
|
|
258
|
-
const version = sdkVersion || getLatestVersion();
|
|
259
|
-
|
|
260
|
-
header(`Installing All AI Context Files (SDK ${version})`);
|
|
261
|
-
|
|
262
|
-
const claudeResult = installClaude(targetDir, version);
|
|
263
|
-
const copilotResult = installCopilot(targetDir, version);
|
|
264
|
-
|
|
265
|
-
log('');
|
|
266
|
-
if (claudeResult && copilotResult) {
|
|
267
|
-
success(colorize('bold', 'All installations completed successfully!'));
|
|
268
|
-
return true;
|
|
269
|
-
} else {
|
|
270
|
-
warning('Some installations failed. See errors above.');
|
|
208
|
+
error(`Failed to install Agent Skills: ${err.message}`);
|
|
271
209
|
return false;
|
|
272
210
|
}
|
|
273
211
|
}
|
|
@@ -279,7 +217,7 @@ function listContexts() {
|
|
|
279
217
|
const contextsDir = getContextsDir();
|
|
280
218
|
const versions = getAvailableVersions();
|
|
281
219
|
|
|
282
|
-
header('Available
|
|
220
|
+
header('Available Agent Skills');
|
|
283
221
|
log('');
|
|
284
222
|
|
|
285
223
|
// Show available versions
|
|
@@ -302,18 +240,18 @@ function listContexts() {
|
|
|
302
240
|
return;
|
|
303
241
|
}
|
|
304
242
|
|
|
305
|
-
//
|
|
306
|
-
const
|
|
307
|
-
if (fs.existsSync(
|
|
308
|
-
log(`${colorize('bold', colorize('blue', `
|
|
309
|
-
log(colorize('dim', ` Installs to: .
|
|
243
|
+
// Agent Skills
|
|
244
|
+
const skillsDir = path.join(contextsDir, latestVersion, 'skills');
|
|
245
|
+
if (fs.existsSync(skillsDir)) {
|
|
246
|
+
log(`${colorize('bold', colorize('blue', `Agent Skills (SDK ${latestVersion})`))}`);
|
|
247
|
+
log(colorize('dim', ` Installs to: .github/skills/`));
|
|
310
248
|
|
|
311
|
-
const entries = fs.readdirSync(
|
|
249
|
+
const entries = fs.readdirSync(skillsDir, { withFileTypes: true })
|
|
312
250
|
.filter(e => e.isDirectory())
|
|
313
251
|
.sort((a, b) => a.name.localeCompare(b.name));
|
|
314
252
|
|
|
315
253
|
for (const entry of entries) {
|
|
316
|
-
const skillPath = path.join(
|
|
254
|
+
const skillPath = path.join(skillsDir, entry.name, 'SKILL.md');
|
|
317
255
|
if (fs.existsSync(skillPath)) {
|
|
318
256
|
// Read first few lines to get name and description
|
|
319
257
|
const content = fs.readFileSync(skillPath, 'utf8');
|
|
@@ -334,37 +272,14 @@ function listContexts() {
|
|
|
334
272
|
log(` ${colorize('dim', `(${skillCount} skills total)`)}`);
|
|
335
273
|
}
|
|
336
274
|
|
|
337
|
-
log('');
|
|
338
|
-
|
|
339
|
-
// Copilot instructions
|
|
340
|
-
const copilotDir = path.join(contextsDir, latestVersion, 'copilot');
|
|
341
|
-
if (fs.existsSync(copilotDir)) {
|
|
342
|
-
log(`${colorize('bold', colorize('blue', `GitHub Copilot Instructions (SDK ${latestVersion})`))}`);
|
|
343
|
-
log(colorize('dim', ` Installs to: .github/instructions/`));
|
|
344
|
-
|
|
345
|
-
const files = fs.readdirSync(copilotDir)
|
|
346
|
-
.filter(f => f.endsWith('.md') || f.endsWith('.instructions.md'))
|
|
347
|
-
.sort();
|
|
348
|
-
|
|
349
|
-
for (const file of files) {
|
|
350
|
-
log(` ${colorize('green', '\u2022')} ${colorize('cyan', file)}`);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
log(` ${colorize('dim', `(${files.length} file${files.length !== 1 ? 's' : ''} total)`)}`);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
275
|
log('');
|
|
357
276
|
log(colorize('dim', 'Usage:'));
|
|
358
|
-
log(colorize('dim', ' npx @saschabrunnerch/arcgis-maps-sdk-js-ai-context
|
|
359
|
-
log(colorize('dim', ' npx @saschabrunnerch/arcgis-maps-sdk-js-ai-context
|
|
360
|
-
log(colorize('dim', ' npx @saschabrunnerch/arcgis-maps-sdk-js-ai-context copilot # Install Copilot instructions'));
|
|
361
|
-
log(colorize('dim', ' npx @saschabrunnerch/arcgis-maps-sdk-js-ai-context all # Install everything'));
|
|
277
|
+
log(colorize('dim', ' npx @saschabrunnerch/arcgis-maps-sdk-js-ai-context skills # Install skills (latest)'));
|
|
278
|
+
log(colorize('dim', ' npx @saschabrunnerch/arcgis-maps-sdk-js-ai-context skills --sdk 4.34 # Install for specific version'));
|
|
362
279
|
}
|
|
363
280
|
|
|
364
281
|
module.exports = {
|
|
365
|
-
|
|
366
|
-
installCopilot,
|
|
367
|
-
installAll,
|
|
282
|
+
installSkills,
|
|
368
283
|
listContexts,
|
|
369
284
|
getAvailableVersions,
|
|
370
285
|
getLatestVersion,
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@saschabrunnerch/arcgis-maps-sdk-js-ai-context",
|
|
3
|
-
"version": "0.0
|
|
4
|
-
"description": "Install
|
|
5
|
-
"main": "lib/installer.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"arcgis-maps-sdk-js-ai-context": "bin/cli.js"
|
|
8
|
-
},
|
|
9
|
-
"files": [
|
|
10
|
-
"bin",
|
|
11
|
-
"contexts",
|
|
12
|
-
"lib"
|
|
13
|
-
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"test": "node bin/cli.js --help"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"arcgis",
|
|
19
|
-
"esri",
|
|
20
|
-
"gis",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"anthropic"
|
|
31
|
-
],
|
|
32
|
-
"author": "Sascha Brunner",
|
|
33
|
-
"license": "MIT",
|
|
34
|
-
"repository": {
|
|
35
|
-
"type": "git",
|
|
36
|
-
"url": "git+https://github.com/SaschaBrunnerCH/arcgis-maps-sdk-js-ai-context.git"
|
|
37
|
-
},
|
|
38
|
-
"bugs": {
|
|
39
|
-
"url": "https://github.com/SaschaBrunnerCH/arcgis-maps-sdk-js-ai-context/issues"
|
|
40
|
-
},
|
|
41
|
-
"homepage": "https://github.com/SaschaBrunnerCH/arcgis-maps-sdk-js-ai-context#readme",
|
|
42
|
-
"engines": {
|
|
43
|
-
"node": ">=14.0.0"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@saschabrunnerch/arcgis-maps-sdk-js-ai-context",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Install Agent Skills for ArcGIS Maps SDK for JavaScript development. Compatible with Claude, VS Code, Cursor, and other AI agents.",
|
|
5
|
+
"main": "lib/installer.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"arcgis-maps-sdk-js-ai-context": "bin/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"contexts",
|
|
12
|
+
"lib"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "node bin/cli.js --help"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"arcgis",
|
|
19
|
+
"esri",
|
|
20
|
+
"gis",
|
|
21
|
+
"agent-skills",
|
|
22
|
+
"claude",
|
|
23
|
+
"copilot",
|
|
24
|
+
"ai",
|
|
25
|
+
"skills",
|
|
26
|
+
"maps",
|
|
27
|
+
"javascript",
|
|
28
|
+
"context",
|
|
29
|
+
"assistant",
|
|
30
|
+
"anthropic"
|
|
31
|
+
],
|
|
32
|
+
"author": "Sascha Brunner",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/SaschaBrunnerCH/arcgis-maps-sdk-js-ai-context.git"
|
|
37
|
+
},
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/SaschaBrunnerCH/arcgis-maps-sdk-js-ai-context/issues"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/SaschaBrunnerCH/arcgis-maps-sdk-js-ai-context#readme",
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=14.0.0"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
applyTo: "**/*.{js,ts,jsx,tsx,html}"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# ArcGIS Maps SDK - 3D Visualization
|
|
6
|
-
|
|
7
|
-
## SceneView
|
|
8
|
-
|
|
9
|
-
```javascript
|
|
10
|
-
import SceneView from "@arcgis/core/views/SceneView.js";
|
|
11
|
-
|
|
12
|
-
const view = new SceneView({
|
|
13
|
-
container: "viewDiv",
|
|
14
|
-
map: map,
|
|
15
|
-
camera: {
|
|
16
|
-
position: {
|
|
17
|
-
longitude: -118.24,
|
|
18
|
-
latitude: 34.05,
|
|
19
|
-
z: 25000
|
|
20
|
-
},
|
|
21
|
-
heading: 0,
|
|
22
|
-
tilt: 45
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
```html
|
|
28
|
-
<arcgis-scene basemap="topo-3d" ground="world-elevation">
|
|
29
|
-
<arcgis-zoom slot="top-left"></arcgis-zoom>
|
|
30
|
-
<arcgis-navigation-toggle slot="top-left"></arcgis-navigation-toggle>
|
|
31
|
-
</arcgis-scene>
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## 3D Layers
|
|
35
|
-
|
|
36
|
-
### SceneLayer (Buildings)
|
|
37
|
-
```javascript
|
|
38
|
-
import SceneLayer from "@arcgis/core/layers/SceneLayer.js";
|
|
39
|
-
|
|
40
|
-
const layer = new SceneLayer({
|
|
41
|
-
portalItem: { id: "2e0761b9a4274b8db52c4bf34356911e" }
|
|
42
|
-
});
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### IntegratedMeshLayer
|
|
46
|
-
```javascript
|
|
47
|
-
import IntegratedMeshLayer from "@arcgis/core/layers/IntegratedMeshLayer.js";
|
|
48
|
-
|
|
49
|
-
const layer = new IntegratedMeshLayer({
|
|
50
|
-
url: "https://tiles.arcgis.com/tiles/.../IntegratedMeshServer"
|
|
51
|
-
});
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### PointCloudLayer
|
|
55
|
-
```javascript
|
|
56
|
-
import PointCloudLayer from "@arcgis/core/layers/PointCloudLayer.js";
|
|
57
|
-
|
|
58
|
-
const layer = new PointCloudLayer({
|
|
59
|
-
url: "https://tiles.arcgis.com/tiles/.../SceneServer"
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
// RGB Renderer
|
|
63
|
-
layer.renderer = { type: "point-cloud-rgb", field: "RGB" };
|
|
64
|
-
|
|
65
|
-
// Classification Renderer
|
|
66
|
-
layer.renderer = {
|
|
67
|
-
type: "point-cloud-unique-value",
|
|
68
|
-
field: "CLASS_CODE",
|
|
69
|
-
colorUniqueValueInfos: [
|
|
70
|
-
{ values: ["2"], label: "Ground", color: [139, 90, 43] },
|
|
71
|
-
{ values: ["6"], label: "Building", color: [194, 194, 194] }
|
|
72
|
-
]
|
|
73
|
-
};
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### VoxelLayer
|
|
77
|
-
```javascript
|
|
78
|
-
import VoxelLayer from "@arcgis/core/layers/VoxelLayer.js";
|
|
79
|
-
|
|
80
|
-
const layer = new VoxelLayer({
|
|
81
|
-
url: "https://tiles.arcgis.com/tiles/.../SceneServer"
|
|
82
|
-
});
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
## 3D Symbols
|
|
86
|
-
|
|
87
|
-
### PointSymbol3D
|
|
88
|
-
```javascript
|
|
89
|
-
const symbol = {
|
|
90
|
-
type: "point-3d",
|
|
91
|
-
symbolLayers: [{
|
|
92
|
-
type: "icon",
|
|
93
|
-
resource: { primitive: "circle" },
|
|
94
|
-
material: { color: "red" },
|
|
95
|
-
size: 12
|
|
96
|
-
}]
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
// Object symbol
|
|
100
|
-
const symbol = {
|
|
101
|
-
type: "point-3d",
|
|
102
|
-
symbolLayers: [{
|
|
103
|
-
type: "object",
|
|
104
|
-
resource: { primitive: "cylinder" }, // cone, cube, sphere, diamond
|
|
105
|
-
material: { color: "blue" },
|
|
106
|
-
height: 100,
|
|
107
|
-
width: 10
|
|
108
|
-
}]
|
|
109
|
-
};
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### glTF Model
|
|
113
|
-
```javascript
|
|
114
|
-
const graphic = new Graphic({
|
|
115
|
-
geometry: point,
|
|
116
|
-
symbol: {
|
|
117
|
-
type: "point-3d",
|
|
118
|
-
symbolLayers: [{
|
|
119
|
-
type: "object",
|
|
120
|
-
resource: { href: "https://example.com/model.glb" },
|
|
121
|
-
width: 10,
|
|
122
|
-
height: 10
|
|
123
|
-
}]
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
### PolygonSymbol3D (Extrusion)
|
|
129
|
-
```javascript
|
|
130
|
-
const symbol = {
|
|
131
|
-
type: "polygon-3d",
|
|
132
|
-
symbolLayers: [{
|
|
133
|
-
type: "extrude",
|
|
134
|
-
material: { color: "blue" },
|
|
135
|
-
size: 100
|
|
136
|
-
}]
|
|
137
|
-
};
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### MeshSymbol3D
|
|
141
|
-
```javascript
|
|
142
|
-
const symbol = {
|
|
143
|
-
type: "mesh-3d",
|
|
144
|
-
symbolLayers: [{
|
|
145
|
-
type: "fill",
|
|
146
|
-
material: { color: [244, 247, 134] }
|
|
147
|
-
}]
|
|
148
|
-
};
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## Weather Effects
|
|
152
|
-
|
|
153
|
-
```javascript
|
|
154
|
-
// Sunny
|
|
155
|
-
view.environment.weather = { type: "sunny", cloudCover: 0.2 };
|
|
156
|
-
|
|
157
|
-
// Cloudy
|
|
158
|
-
view.environment.weather = { type: "cloudy", cloudCover: 0.6 };
|
|
159
|
-
|
|
160
|
-
// Rainy
|
|
161
|
-
view.environment.weather = { type: "rainy", cloudCover: 0.8, precipitation: 0.5 };
|
|
162
|
-
|
|
163
|
-
// Foggy
|
|
164
|
-
view.environment.weather = { type: "foggy", fogStrength: 0.5 };
|
|
165
|
-
|
|
166
|
-
// Snowy
|
|
167
|
-
view.environment.weather = { type: "snowy", precipitation: 0.5, snowCover: "enabled" };
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
```html
|
|
171
|
-
<arcgis-expand slot="top-right">
|
|
172
|
-
<arcgis-weather></arcgis-weather>
|
|
173
|
-
</arcgis-expand>
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
## Daylight & Lighting
|
|
177
|
-
|
|
178
|
-
```javascript
|
|
179
|
-
view.environment.lighting = {
|
|
180
|
-
date: new Date("2024-06-21T12:00:00"),
|
|
181
|
-
directShadowsEnabled: true,
|
|
182
|
-
ambientOcclusionEnabled: true
|
|
183
|
-
};
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
```html
|
|
187
|
-
<arcgis-expand slot="top-right">
|
|
188
|
-
<arcgis-daylight></arcgis-daylight>
|
|
189
|
-
</arcgis-expand>
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
## Ground Configuration
|
|
193
|
-
|
|
194
|
-
```javascript
|
|
195
|
-
// World elevation
|
|
196
|
-
map.ground = "world-elevation";
|
|
197
|
-
|
|
198
|
-
// Custom elevation
|
|
199
|
-
import ElevationLayer from "@arcgis/core/layers/ElevationLayer.js";
|
|
200
|
-
|
|
201
|
-
map.ground = {
|
|
202
|
-
layers: [
|
|
203
|
-
new ElevationLayer({
|
|
204
|
-
url: "https://elevation.arcgis.com/.../Terrain3D/ImageServer"
|
|
205
|
-
})
|
|
206
|
-
]
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
// Underground navigation
|
|
210
|
-
map.ground.navigationConstraint = "none";
|
|
211
|
-
map.ground.opacity = 0.5;
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
## Scene Environment
|
|
215
|
-
|
|
216
|
-
```javascript
|
|
217
|
-
view.environment.atmosphereEnabled = true;
|
|
218
|
-
view.environment.starsEnabled = true;
|
|
219
|
-
view.qualityProfile = "high"; // low, medium, high
|
|
220
|
-
|
|
221
|
-
// Background
|
|
222
|
-
view.environment.background = {
|
|
223
|
-
type: "color",
|
|
224
|
-
color: [0, 0, 0, 1] // or [0, 0, 0, 0] for transparent
|
|
225
|
-
};
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
## Viewing Modes
|
|
229
|
-
|
|
230
|
-
```javascript
|
|
231
|
-
view.viewingMode = "global"; // Spherical Earth
|
|
232
|
-
view.viewingMode = "local"; // Flat, for local areas
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
```html
|
|
236
|
-
<arcgis-scene viewing-mode="local"></arcgis-scene>
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
## Elevation Info
|
|
240
|
-
|
|
241
|
-
```javascript
|
|
242
|
-
layer.elevationInfo = {
|
|
243
|
-
mode: "on-the-ground", // Features on ground
|
|
244
|
-
mode: "relative-to-ground", // Height above ground
|
|
245
|
-
mode: "absolute-height", // Height above sea level
|
|
246
|
-
mode: "relative-to-scene", // Height above scene
|
|
247
|
-
offset: 10,
|
|
248
|
-
featureExpressionInfo: {
|
|
249
|
-
expression: "$feature.height"
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
## 3D Measurement
|
|
255
|
-
|
|
256
|
-
```html
|
|
257
|
-
<arcgis-direct-line-measurement-3d slot="top-right"></arcgis-direct-line-measurement-3d>
|
|
258
|
-
<arcgis-area-measurement-3d slot="top-right"></arcgis-area-measurement-3d>
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
## Common Pitfalls
|
|
262
|
-
|
|
263
|
-
1. **VoxelLayer requires local mode** - Use `viewing-mode="local"`
|
|
264
|
-
2. **Weather only in SceneView** - Doesn't work in MapView
|
|
265
|
-
3. **glTF model scale** - May need scaling to fit scene
|
|
266
|
-
4. **Ground navigation** - Set `navigationConstraint: "none"` for underground
|
|
267
|
-
5. **PointCloud fields** - Common: `RGB`, `CLASS_CODE`, `ELEVATION`
|