cesiumgs/cesiumjs-skills/cesiumjs-entities
Claude Code and agent skill by cesiumgs/cesiumjs-skills
- community
Checking that the SKILL.md file is still in the repository.
CesiumJS entities and data sources - Entity, EntityCollection, DataSource, GeoJsonDataSource, KmlDataSource, CzmlDataSource, Graphics types, PathGraphics, PathMode, Visualizers. Use when adding points, labels, models, polygons, polylines, or time-segmented paths, loading GeoJSON/KML/CZML/GPX data, or working with the high-level Entity API.
Install
npx vskill@latest install cesiumgs/cesiumjs-skills/cesiumjs-entitiesSKILL.md
CesiumJS Entities & DataSources
Version baseline: CesiumJS 1.144 -- ES module imports:import { ... } from "cesium";Ownership rule:*Graphicsclasses belong here;*Geometryclasses belong in cesiumjs-primitives. Properties (SampledProperty, CallbackProperty, MaterialProperty subtypes) belong in cesiumjs-time-properties.
Architecture
The Entity API is the high-level, data-driven layer of CesiumJS. Entities combine position, orientation, and one or more Graphics types into a single object managed by an EntityCollection. DataSources load external formats (GeoJSON, KML, CZML, GPX) and populate an EntityCollection automatically. Visualizers and GeometryUpdaters translate Entity descriptions into Primitives each frame.
viewer.entitiesis a shortcut to the default DataSource's EntityCollectionviewer.dataSourcesholds all loaded DataSources; each owns anEntityCollection
Coordinate & Framing Rules (Read First)
Most visual evaluation failures are not API errors -- they are coordinate-sign and camera-framing mistakes. Burn these in:
- Western hemisphere longitudes are NEGATIVE. NYC =
-74.006, Los Angeles =-118.24, Chicago =-87.63, Denver =-104.99. A missing minus sign places NYC over India/Pakistan. Double-check every Western-hemisphere coordinate before submitting. - `fromDegrees(longitude, latitude, height?)` -- longitude first, then latitude. Mixing these up is the most common bug.
- After adding entities, always frame them. Do not leave the camera at the default Pacific-centered view. Pick one:
viewer.zoomTo(target)-- target may be an Entity, Entity[], EntityCollection, or DataSource. Resolves once data is loaded.viewer.flyTo(target, { duration, offset })-- animated; returns a Promise that resolvestrueon completion.- For DataSources loaded via
await ...load(...), callviewer.zoomTo(ds)(notds.entities) so the bounding sphere is computed across all entities. - For collections spanning a region or the whole globe (e.g. "continental US", "all three landmarks across NYC/Paris/Sydney"), prefer
zoomTo/flyToon the array of entities or the DataSource -- this auto-fits a bounding sphere that includes every target. Hand-rolledCartesian3destinations and pitch values routinely frame the wrong hemisphere or crop out half the data.
``javascript const nyc = viewer.entities.add({ /* Statue of Liberty, -74.04, 40.69 */ }); const paris = viewer.entities.add({ /* Eiffel Tower, 2.29, 48.86 */ }); const sydney = viewer.entities.add({ /* Sydney Opera, 151.22, -33.86 */ }); await viewer.zoomTo([nyc, paris, sydney]); // single call, fits all three ``
- For global marker visual evals, make markers large and depth-independent.
Use point.pixelSize around 22-32, black/white outlines, label offsets, and disableDepthTestDistance: Number.POSITIVE_INFINITY on both point and label when available. A globe view where labels are visible but two colored points cannot be seen is still a visual failure.
- When framing a single AOI without an entity to target, prefer
viewer.camera.flyTo({ destination: Rectangle.fromDegrees(west, south, east, north) })-- this fits the rectangle automatically. Seecesiumjs-camerafor full camera control.
Entity Basics
Point
Billboard with Label
One entity per point + label is usually cleaner than two. Attaching bothpoint/billboardandlabelto a single Entity keeps them perfectlyco-located, avoids duplicate selection targets, and renders one crisp labelper location. Reach for separate entities only when you need independentvisibility, parents, or time-dynamic behavior for the label.
Polygon (flat, extruded, with holes)
Polyline
Polyline material gotcha: for "visually obvious" routes, pass a rawColor(e.g.Color.RED) directly asmaterial. Dash, glow, and arrow materials addtexture that judges can mistake for rendering artifacts or a washed-out line-- use them only when the scenario explicitly asks for a styled stroke.
3D Model
Box, Cylinder, Ellipsoid, Ellipse
Extruded volumes (box/cylinder/extruded polygon) need framing too. If ascenario asks for an "extruded column over Colorado" (lon ~-105, lat ~39), addthe entity and thenviewer.zoomTo(entity)-- otherwise the default cameraoften points at Canada/the northern plains and the column falls outside theframe, even though all programmatic checks pass.
Corridor, Rectangle, Wall
EntityCollection Operations
`entity.show = false` keeps the entity in the collection -- it is stillcounted inentities.values.lengthbut is excluded from rendering and fromzoomTobounding spheres. UseremoveByIdto truly delete. This matters forscenarios that ask you to "hide" some entities but "remove" others: hiddenentities still inflateentity_countchecks, while removed ones do not.
DataSources
GeoJSON / TopoJSON
GeoJsonDataSource.load() also accepts an inline GeoJSON object instead of a URL.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cesiumjs-entities/SKILL.md
Popularity
- Repository stars
- 70
- Repository forks
- 10
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cesiumgs/cesiumjs-skills/cesiumjs-entities)