Skip to content

3D · 类型声明 ​

本页集中展示 3D 组件 API 中使用的复杂类型。组件页只保留参数表和示例,需要确认字段时再从类型名称跳转到这里。

坐标与颜色 ​

CesiumPositionInput ​

展开类型声明
ts
interface CesiumPosition {
  longitude: number
  latitude: number
  height?: number
}

type CesiumPositionInput =
  | CesiumPosition
  | [longitude: number, latitude: number, height?: number]

CesiumColorInput ​

展开类型声明
ts
type CesiumColorInput = string | Color

地图 ​

CesiumMapOptions ​

展开类型声明
ts
interface CesiumMapOptions {
  animation?: boolean
  baseLayerPicker?: boolean
  fullscreenButton?: boolean
  geocoder?: boolean
  homeButton?: boolean
  infoBox?: boolean
  sceneModePicker?: boolean
  selectionIndicator?: boolean
  timeline?: boolean
  navigationHelpButton?: boolean
  creditContainer?: HTMLElement | string
  [key: string]: unknown
}

PickResult ​

展开类型声明
ts
interface PickResult {
  windowPosition: Cartesian2
  position?: CesiumPosition
  pickedEntity?: Entity
}

实体与多边形 ​

CesiumEntityLabelOptions ​

展开类型声明
ts
interface CesiumEntityLabelOptions {
  text?: string
  font?: string
  style?: "fill" | "outline" | "fill-and-outline" | LabelStyle
  fillColor?: CesiumColorInput
  outlineColor?: CesiumColorInput
  outlineWidth?: number
  showBackground?: boolean
  backgroundColor?: CesiumColorInput
  pixelOffset?: Cartesian2 | [x: number, y: number]
  horizontalOrigin?: "left" | "center" | "right" | HorizontalOrigin
  verticalOrigin?: "top" | "center" | "bottom" | "baseline" | VerticalOrigin
  heightReference?: CesiumHeightReferenceInput
  alwaysVisible?: boolean
  position?: CesiumPositionInput
  placement?: "center" | "top" | "bottom" | "left" | "right"
  [key: string]: unknown
}

BusinessProperties ​

展开类型声明
ts
type BusinessProperties = Record<string, unknown>

CesiumPolygonGraphicsOptions ​

展开类型声明
ts
type CesiumPolygonGraphicsOptions = Omit<
  PolygonGraphics.ConstructorOptions,
  | "hierarchy"
  | "material"
  | "outline"
  | "outlineColor"
  | "height"
  | "extrudedHeight"
  | "perPositionHeight"
  | "heightReference"
  | "extrudedHeightReference"
>

CesiumPolygonOptions ​

展开类型声明
ts
interface CesiumPolygonOptions {
  id?: string
  name?: string
  positions: CesiumPositionInput[]
  holes?: CesiumPositionInput[][]
  color?: CesiumColorInput
  opacity?: number
  outline?: boolean
  outlineColor?: CesiumColorInput
  height?: number
  extrudedHeight?: number
  perPositionHeight?: boolean
  heightReference?: CesiumHeightReferenceInput
  extrudedHeightReference?: CesiumHeightReferenceInput
  label?: CesiumEntityLabelOptions
  properties?: Record<string, unknown>
  polygon?: CesiumPolygonGraphicsOptions
  show?: boolean
  flyToOnLoad?: boolean
}

Marker ​

MarkerPoint ​

展开类型声明
ts
interface MarkerPoint {
  longitude: number
  latitude: number
  height?: number
  image?: string
  text?: string
  labelColor?: string
  labelStyle?: MarkerLabelStyle
  id?: string | number
  [key: string]: unknown
}

MarkerLabelStyle ​

展开类型声明
ts
interface MarkerLabelStyle {
  fillColor?: string
  font?: string
  outlineColor?: string
  outlineWidth?: number
  showBackground?: boolean
  backgroundColor?: string
  pixelOffset?: [x: number, y: number]
  scale?: number
  [key: string]: unknown
}

动态墙 ​

CesiumDynamicWallOptions ​

展开类型声明
ts
interface CesiumDynamicWallOptions {
  positions: number[] | [number, number, number?][] | CesiumPosition[]
  maximumHeight: number | number[]
  minimumHeight?: number | number[]
  color?: CesiumColorInput
  image?: string | HTMLCanvasElement
  speed?: number
  repeat?: number
  show?: boolean
  close?: boolean
  depthTestAgainstTerrain?: boolean
  flyToOnLoad?: boolean
}

影像与三维模型 ​

CesiumImageryOptions ​

展开类型声明
ts
interface CesiumImageryOptions {
  type?: "tms" | "wmts" | "xyz" | "ion" | "default"
  url?: string
  assetId?: number
  show?: boolean
  alpha?: number
  options?: Record<string, unknown>
}

Cesium3DTilesetOptions ​

展开类型声明
ts
interface Cesium3DTilesetOptions {
  url?: string
  assetId?: number
  show?: boolean
  flyToOnLoad?: boolean
  maximumScreenSpaceError?: number
}

相机 ​

CameraPositionResult ​

展开类型声明
ts
interface CameraPositionResult {
  longitude: number
  latitude: number
  height: number
  heading: number
  pitch: number
  roll: number
}