Skip to main content

Viewer

Viewer is a root component of resium same as CesiumWidget. All components of resium except the root components have to be mounted inside it.

Availability

Everywhere. Viewer is a root component.

Properties

Cesium properties

PropertyTypeDescription
shadowsboolean
resolutionScalenumber
useDefaultRenderLoopboolean
targetFrameRatenumber
useBrowserRecommendedResolutionboolean
terrainProviderTerrainProvider
terrainShadowsShadowMode
clockTrackedDataSourceDataSource
allowDataSourcesToSuspendAnimationboolean
trackedEntityEntity
selectedEntityEntity

Cesium read-only properties

PropertyTypeDescription
creditContainerstring | Element
creditViewportstring | Element
skyBoxfalse | SkyBox
skyAtmospherefalse | SkyAtmosphere
sceneModeSceneMode
scene3DOnlyboolean
orderIndependentTranslucencyboolean
mapProjectionMapProjection
globefalse | Globe
showRenderLoopErrorsboolean
contextOptionsany
mapMode2DMapMode2D
blurActiveElementOnCanvasFocusboolean
requestRenderModeboolean
maximumRenderTimeChangenumber
msaaSamplesnumber
shouldAnimateboolean
selectionIndicatorboolean
infoBoxboolean
geocoderboolean | GeocoderService[]
homeButtonboolean
sceneModePickerboolean
projectionPickerboolean
baseLayerPickerboolean
navigationHelpButtonboolean
animationboolean
timelineboolean
fullscreenButtonboolean
vrButtonboolean
dataSourcesDataSourceCollection
clockViewModelClockViewModel
navigationInstructionsInitiallyVisibleboolean
selectedImageryProviderViewModelProviderViewModel
imageryProviderViewModelsProviderViewModel[]
selectedTerrainProviderViewModelProviderViewModel
terrainProviderViewModelsProviderViewModel[]
fullscreenElementstring | Element
automaticallyTrackDataSourceClocksboolean
depthPlaneEllipsoidOffsetnumber
imageryProviderfalse | ImageryProviderIf false, the default imagery layer will be removed.

Cesium events

PropertyTypeDescription
onSelectedEntityChange() => void
onTrackedEntityChange() => 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
onWheel(delta: number) => void
classNamestringApplied to outer div element
idstringApplied to outer div element
styleCSSPropertiesApplied to outer div element
fullbooleanSame as style={{ position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }} if it is true.
containerPropsanyAll props applied to outer div element
extendViewerMixin | ViewerMixin[]It is applied in order from the top to Viewer as viewer.extend(XXX); after the viewer is mounted. Nothing happens even it is updated by itself.
childrenReactNode