Skip to content

KmlDataSource

KmlDataSource provides the way to load and show KML data into the scene. Both KML and KMZ are supported, and can be loaded from a URL, string or raw object.

Inside Viewer or CesiumWidget components.

Property Type Description
show boolean
clustering EntityCluster
name string
Property Type Description
ellipsoid Ellipsoid | undefined
canvas HTMLCanvasElement | undefined
camera Camera | undefined
credit Credit
sourceUri string | undefined
clampToGround boolean | undefined
screenOverlayContainer string | Element | undefined
Property Type Description
onChange ((kmlDataSource: KmlDataSource) => void) | undefined
onError ((kmlDataSource: KmlDataSource, error: any) => void) | undefined
onLoading ((kmlDataSource: KmlDataSource, isLoaded: boolean) => void) | undefined
onRefresh ((kmlDataSource: KmlDataSource, urlComponent: string) => void) | undefined
onUnsupportedNode ((kmlDataSource: KmlDataSource) => void) | undefined
Property Type Description
onClick ((movement: CesiumMovementEvent, target: T) => void) | undefined
onDoubleClick ((movement: CesiumMovementEvent, target: T) => void) | undefined
onMouseDown ((movement: CesiumMovementEvent, target: T) => void) | undefined
onMouseUp ((movement: CesiumMovementEvent, target: T) => void) | undefined
onMiddleClick ((movement: CesiumMovementEvent, target: T) => void) | undefined
onMiddleDown ((movement: CesiumMovementEvent, target: T) => void) | undefined
onMiddleUp ((movement: CesiumMovementEvent, target: T) => void) | undefined
onMouseMove ((movement: CesiumMovementEvent, target: T) => void) | undefined
onPinchEnd ((movement: CesiumMovementEvent, target: T) => void) | undefined
onPinchMove ((movement: CesiumMovementEvent, target: T) => void) | undefined
onPinchStart ((movement: CesiumMovementEvent, target: T) => void) | undefined
onRightClick ((movement: CesiumMovementEvent, target: T) => void) | undefined
onRightDown ((movement: CesiumMovementEvent, target: T) => void) | undefined
onRightUp ((movement: CesiumMovementEvent, target: T) => void) | undefined
onMouseEnter ((movement: CesiumMovementEvent, target: T) => void) | undefined
onMouseLeave ((movement: CesiumMovementEvent, target: T) => void) | undefined
suspense boolean | undefined Opt in to React Suspense for async loading. When enabled and the data is aURL or Resource, it is fetched during render so a parent <Suspense>boundary can show a fallback and a parent error boundary can catch failures.
cacheKey string | undefined Overrides the Suspense cache key (defaults to the resolved URL). Change it tobust the cache when the content at a stable URL changes, or share it acrosscomponents to dedupe a fetch. Only used when suspense is enabled.
onLoad ((kmlDataSouce: KmlDataSource) => void) | undefined Calls when the Promise for loading data is fullfilled.
data string | Resource | Document | Blob | undefined