Skip to main 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.

Availability

Inside Viewer or CesiumWidget components.

Properties

Cesium properties

PropertyTypeDescription
showboolean
clusteringEntityCluster
namestring

Cesium read-only properties

PropertyTypeDescription
fillColor
creditstring | Credit
sourceUristring
describedescribe
markerSizenumber
markerSymbolstring
markerColorColor
strokeColor
strokeWidthnumber
clampToGroundboolean

Cesium events

PropertyTypeDescription
onChange(GeoJsonDataSource: GeoJsonDataSource) => void
onError(GeoJsonDataSource: GeoJsonDataSource, error: any) => void
onLoading(GeoJsonDataSource: GeoJsonDataSource, isLoaded: boolean) => void

Other properties

PropertyTypeDescription
onClick(movement: CesiumMovementEvent, target: T) => void
onDoubleClick(movement: CesiumMovementEvent, target: T) => void
onMouseDown(movement: CesiumMovementEvent, target: T) => void
onMouseUp(movement: CesiumMovementEvent, target: T) => void
onMiddleClick(movement: CesiumMovementEvent, target: T) => void
onMiddleDown(movement: CesiumMovementEvent, target: T) => void
onMiddleUp(movement: CesiumMovementEvent, target: T) => void
onMouseMove(movement: CesiumMovementEvent, target: T) => void
onPinchEnd(movement: CesiumMovementEvent, target: T) => void
onPinchMove(movement: CesiumMovementEvent, target: T) => void
onPinchStart(movement: CesiumMovementEvent, target: T) => void
onRightClick(movement: CesiumMovementEvent, target: T) => void
onRightDown(movement: CesiumMovementEvent, target: T) => void
onRightUp(movement: CesiumMovementEvent, target: T) => void
onMouseEnter(movement: CesiumMovementEvent, target: T) => void
onMouseLeave(movement: CesiumMovementEvent, target: T) => void
onLoad(GeoJsonDataSouce: GeoJsonDataSource) => voidCalls when the Promise for loading data is fullfilled.
dataany