Skip to content

Cesium: extend CesiumLayerSync to the remaining layer kinds #2261

Description

@giswqs

Part of #2259.

Problem

packages/map/src/cesium-layer-sync.ts renders imagery (raster / xyz / wms / wmts / image), GeoJSON-backed vector, and 3d-tiles. NON_GEOJSON_TYPES explicitly skips vector-tiles, pmtiles, mbtiles, deckgl-viz, and arcgis; Zarr, LiDAR / point clouds, splats, and COG have no globe path either.

So most Add Data entries do "work" in the sense that the store accepts the layer — but nothing draws, which is indistinguishable from broken. That is what the "2D only" badge in LayerPanel.tsx exists to explain.

The architectural fork (decide first)

There is no native Cesium MVT renderer, and deck.gl has no official Cesium interop. Two strategies:

Per-kind Cesium implementations. Clean, native, each layer kind gets true 3D behavior. But it is roughly eight separate implementations and some (deck.gl) have no good answer.

The drape escape hatch. Run a headless MapLibre map (packages/map/src/headless.ts already exists) into an offscreen canvas and expose it to Cesium as a custom ImageryProvider. Vector tiles, PMTiles, MBTiles, control-painted plugin layers, and the whole Mapbox Style Spec then get a globe representation from one component. Cesium contributes the globe, terrain, and 3D Tiles on top.

Trade-offs of the drape: content is flat (no extrusion), picking must be reprojected through the drape, and there are two render loops to pay for.

  • Decide drape vs. per-kind before any of the checkboxes below. A hybrid is plausible — drape as the general fallback, native implementations where 3D actually matters.

Work

  • COG / raster-from-tiler → ImageryProvider. Already flagged as "a candidate for a later pass" in docs/architecture.md; lowest-hanging and native either way.
  • vector-tiles / pmtiles / mbtiles.
  • deckgl-viz.
  • Zarr, LiDAR / point clouds, splats.
  • arcgis (VectorTileServer-backed; follows the vector-tile decision).
  • Keep isCesiumSupportedLayerType and the "2D only" badge in LayerPanel.tsx accurate as each kind lands — a stale predicate is worse than an unsupported kind, because it promises rendering that never arrives.
  • Update the Layer sync bullet in docs/architecture.md.

Depends on

Nothing hard-blocks this, but identifyFeatures / picking in #2260 shapes how draped content is picked, so settle the fork above before both land.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwishlistFeature requests that require significant efforts

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions