CesiumJS map imagery
Adds, layers and swaps base maps in CesiumJS, so your 3D globe shows the right imagery with no blank tiles.
What we improved
Fixed the quick start, which used Cesium.Cartesian3 without importing it; Cartesian3 is now imported like everything else. Fixed the time-dynamic WMTS example. It never set the clock, so the viewer started at today's date, outside the layer
Improved by YourAISkill from the original by CesiumGS, under its Apache-2.0 licence. The download includes the author's licence and a CHANGES.md listing every change. Both Claude reviews read the improved version.
Claude's review
8/10 Accurate, version-aware CesiumJS imagery reference with a sync versus async provider table, working examples, a symptom diagnosis table and attribution rules.
We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.
In detail
CesiumJS imagery layers - ImageryProvider, ImageryLayer, ImageryLayerCollection, WMS, WMTS, Bing, OpenStreetMap, ArcGIS, Mapbox, tile discard policies. Use when adding or swapping base map layers, configuring imagery providers, layering multiple map sources, or creating split-screen imagery comparisons.
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: cesiumjs-imagery
description: "CesiumJS imagery layers: ImageryProvider, ImageryLayer and ImageryLayerCollection; which providers are created with new and which need an async factory (fromUrl, fromAssetId, fromBasemapType); OpenStreetMap, URL template (XYZ and TMS), WMS, WMTS (including GetFeatureInfo picking and time-dynamic layers), ArcGIS, Bing, Mapbox, Cesium ion and single-image providers; layer order and display properties; base layer swaps and light versus dark basemaps; split-screen comparison, cutouts, color-to-alpha, draping imagery on 3D Tiles, error handling, tile discard policies, performance, camera framing for named places, and tile usage and attribution rules. Use when adding or swapping base maps, layering map sources, building imagery comparisons, or debugging blank, black or misplaced imagery in CesiumJS."
---
<!-- Modified by YourAISkill (youraiskill.com) on 2 December 2026 from the original by CesiumGS. See CHANGES.md. -->
# CesiumJS Imagery Layers
> Targets CesiumJS 1.140 and later; features added in a specific release are marked with it.
An **ImageryProvider** fetches raster tiles; an **ImageryLayer** wraps one provider with display settings (alpha, brightness, split and so on); an **ImageryLayerCollection** stacks layers on the Globe or on a Cesium3DTileset. Layers render bottom to top. Index 0 is the **base layer**, stretched to fill the globe even if its rectangle does not cover the whole world.
Full examples for each provider, TMS, custom tags, WMTS picking, debugging overlays and discard policies: `references/providers.md`.
## Sync or Async: How Each Provider Is Created
Since CesiumJS 1.104, providers that must fetch metadata before they work are created with a static async factory; do not call their constructors directly. Wrap the promise with `ImageryLayer.fromProviderAsync()` so you can add the layer immediately:
| Create with `new` | Create with a static async factory |
|---|---|
| `UrlTemplateImageryProvider`, `OpenStreetMapImageryProvider`, `WebMapServiceImageryProvider`, `WebMapTileServiceImageryProvider`, `MapboxImageryProvider`, `MapboxStyleImageryProvider`, `GridImageryProvider`, `TileCoordinatesImageryProvider` | `IonImageryProvider.fromAssetId()`, `BingMapsImageryProvider.fromUrl()`, `ArcGisMapServerImageryProvider.fromUrl()` / `.fromBasemapType()`, `TileMapServiceImageryProvider.fromUrl()`, `SingleTileImageryProvider.fromUrl()` |
So: `new ImageryLayer(new OpenStreetMapImageryProvider({...}))`, but `ImageryLayer.fromProviderAsync(IonImageryProvider.fromAssetId(3812))`.
## Quick Start
For an imagery-focused viewer, disable distracting widgets. Use `camera.setView` (not `flyTo`) when the camera must be in position immediately: `flyTo` animates.
```js
import {
Viewer, ImageryLayer, OpenStreetMapImageryProvider, UrlTemplateImageryProvider,
Cartesian3, Math as CesiumMath,
} from "cesium";
const viewer = new Viewer("cesiumContainer", {
baseLayer: new ImageryLayer(new OpenStreetMapImageryProvider({
url: "https://tile.openstreetmap.org/",
maximumLevel: 18,
credit: "© OpenStreetMap contributors", // the default credit still names MapQuest and CC-BY-SA
})), // or baseLayer: false for no imagery at all
...From CesiumGS's repository, Apache-2.0 licence.
Related skills
-
Checked
glTF model shrinking
Compresses glTF models with gltf-transform, Draco, meshopt and KTX2 and wires the loader for fast 3D scenes.
8/101 credit -
Checked
React Three Fiber scenes
Builds three.js scenes as React components with React Three Fiber, so 3D sits cleanly in your React app.
8/101 credit -
Checked
Three.js app audit
Audits Three.js and React Three Fiber apps for slow frames, leaks and visual bugs, then fixes them.
7/101 credit -
Checked
3D and scroll effects
Adds three.js or WebGL scenes and scroll animation to your site with fallbacks, so it stays fast on every device.
8/101 credit -
Checked
Three.js model animation
Plays, blends and crossfades skeletal and morph target animation in three.js without the usual mixer bugs.
7/101 credit -
Checked
Interactive 3D viewers
Builds interactive 3D viewers, AR product configurators and WebXR scenes with three-live and xr-live.
7/101 credit