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.

PropertyTypeDescription
showboolean
PropertyTypeDescription
minZoomnumber | undefinedMinimum zoom level represented in the generated tileset. Fixed at creation time.
maxZoomnumber | undefinedMaximum zoom level represented in the generated tileset. Fixed at creation time.
extentRectangle | undefinedOptional geographic extent (radians) constraining the generated tile tree. Fixed at creation time.
featureIdPropertystring | undefinedMVT property name to use as feature ID. Fixed at creation time.

N/A

PropertyTypeDescription
urlstring | ResourceRequired URL template containing {z}/{x}/{y} placeholders.
onReady((provider: MVTDataProviderShape) => void) | undefinedFires once fromUrl resolves. Reach provider.tileset (or call getTileset(provider)) here to apply clipping/styling.
onError((err: unknown) => void) | undefinedFires if fromUrl rejects.