Skip to content

GeoJsonDataSource

GeoJsonDataSource provides the way to load and show GeoJSON data into the scene. Both GeoJSON and TopoJSON 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
fill Color | undefined
credit string | Credit | undefined
sourceUri string | undefined
describe describe | undefined
markerSize number | undefined
markerSymbol string | undefined
markerColor Color | undefined
stroke Color | undefined
strokeWidth number | undefined
clampToGround boolean | undefined
Property Type Description
onChange ((GeoJsonDataSource: GeoJsonDataSource) => void) | undefined
onError ((GeoJsonDataSource: GeoJsonDataSource, error: any) => void) | undefined
onLoading ((GeoJsonDataSource: GeoJsonDataSource, isLoaded: boolean) => 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 ((GeoJsonDataSouce: GeoJsonDataSource) => void) | undefined Calls when the Promise for loading data is fullfilled.
data any