UNPKG

cve-connector

Version:
60 lines (56 loc) 2.02 kB
import type { Coordinates, Offset, TagMap } from './common' import type { CustomParams, FeatureParams } from './params' export interface PolygonData<S extends PolygonStyle> { /** * 坐标数组 * - [longitude, latitude, altitude][] * - 若未指定 altitude 值,则取默认值 0 * - 当未指定 altitude 值时,建议将参数 isHeightBasedSurface 设置为 true,并结合参数 offset 使用 */ Coordinates: Coordinates[] /** 是否启用选择后飞行 */ EnableFlyTo?: boolean /** 聚焦过渡时长 */ FlyToDuration?: number /** * 聚焦时是否定位至距要素的指定距离处 * - 若为true,则定位至SpecifiedDistance属性指示的距离 */ FlyToSpecifiedDistance?: boolean /** * 聚焦时是否定位至距要素的指定位置处 * - 若为true,则定位至SpecifiedPosition属性指示的距离 */ FlyToSpecifiedPosition?: boolean Id?: string /** * 指示 Feature 生成时,其高度是否基于场景上表面 * - 若为 true,则高度为各点平面坐标处与场景上表面的交点加上 offset 参数的 z 值 */ IsHeightBasedSurface?: boolean Name?: string /** [x, y, z] 基于坐标的偏移量(米) */ Offset?: Offset /** 其他参数 */ Parameters?: PointParams[S] /** 聚焦时,相机距要素的距离 */ SpecifiedDistance?: number /** 聚焦时,相机位置 */ SpecifiedPosition?: number[] /** 'Custom' | 'Solid01' | 'Stripe01' */ Style: S /** 数据标签 */ Tags?: TagMap } /** Polygon Parameters,不同 PolygonStyle 对应的补充参数接口 */ export interface PolygonParams { Custom: CustomParams Solid01: Partial<Pick<FeatureParams, 'Color' | 'Emissive' | "OutlineColor" | "OutlineWidth">> Stripe01: Partial< Pick< FeatureParams, 'Angle' | 'Color' | 'Color2' | 'Emissive' | 'Ratio' | 'Scale' | 'Speed' > > } export type PolygonStyle = 'Custom' | 'Solid01' | 'Stripe01'