Skip to content

MVTDataProvider

MVTDataProvider loads Mapbox Vector Tiles (MVT) as runtime-generated 3D Tiles.

Despite the “DataProvider” name, this class is not an ImageryProvider or TerrainProvider. It implements its own update(frameState) and attaches directly to Scene#primitives, like a Cesium3DTileset. Use it as a top-level child of <Viewer>/<CesiumWidget>, not as a prop on an <ImageryLayer>.

This API is experimental and subject to change without standard deprecation.

Inside Viewer or CesiumWidget component. An MVTDataProvider object will be attached to the PrimitiveCollection of the Viewer or CesiumWidget.

Property Type Description
show boolean
Property Type Description
minZoom number | undefined Minimum zoom level represented in the generated tileset. Fixed at creation time.
maxZoom number | undefined Maximum zoom level represented in the generated tileset. Fixed at creation time.
extent Rectangle | undefined Optional geographic extent (radians) constraining the generated tile tree. Fixed at creation time.
featureIdProperty string | undefined MVT property name to use as feature ID. Fixed at creation time.

N/A

Property Type Description
url string | Resource Required URL template containing {z}/{x}/{y} placeholders.
onReady ((provider: MVTDataProviderShape) => void) | undefined Fires once fromUrl resolves. Reach provider.tileset (or call getTileset(provider)) here to apply clipping/styling.
onError ((err: unknown) => void) | undefined Fires if fromUrl rejects.