import { BaseClass } from 'mars3d'; import { Cesium } from 'mars3d'; import { ChinaCRS } from 'mars3d'; import * as mars3d from 'mars3d'; /** * 材质属性(Entity使用) 基础类 * @param options - 参数对象 */ declare class BaseMaterialProperty extends mars3d.material.BaseMaterialProperty { constructor(options: any); } declare namespace BillboardEntity { /** * 图标点 支持的样式信息 * @property [image] - 用于矢量对象的 图像、URI或Canvas * @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0 * @property [scale = 1] - 图像大小的比例 * @property [rotation = 0] - 旋转角度(弧度值),正北为0,逆时针旋转 * @property [rotationDegree = 0] - 旋转角度(度数值,0-360度),与rotation二选一 * @property [horizontalOrigin] - 横向方向的定位 * @property [verticalOrigin] - 垂直方向的定位 * @property [width] - 指定广告牌的宽度(以像素为单位),覆盖图片本身大小。 * @property [height] - 指定广告牌的高度(以像素为单位),覆盖图片本身大小。 * @property [hasPixelOffset = false] - 是否存在偏移量 * @property [pixelOffsetX = 0] - 横向偏移像素 * @property [pixelOffsetY = 0] - 纵向偏移像素 * @property [pixelOffset = Cartesian2.ZERO] - 指定像素偏移量。 * @property [scaleByDistance = false] - 是否按视距缩放 或 设置基于与相机的距离缩放点 * @property [scaleByDistance_far = 1000000] - 上限 * @property [scaleByDistance_farValue = 0.1] - 比例值 * @property [scaleByDistance_near = 1000] - 下限 * @property [scaleByDistance_nearValue = 1] - 比例值 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定该广告牌将显示在与摄像机的多大距离 * @property [distanceDisplayCondition_far = 10000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [clampToGround = false] - 是否贴地 * @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。 * @property [visibleDepth = true] - 是否被遮挡 * @property [disableDepthTestDistance] - 指定从相机到禁用深度测试的距离。 * @property [color = Color.WHITE] - 附加的颜色 * @property [eyeOffset = Cartesian3.ZERO] - 眼偏移量 * @property [alignedAxis = Cartesian3.ZERO] - 指定单位旋转向量轴。 * @property [sizeInMeters] - 指定该广告牌的大小是否应该以米来度量。 * @property [translucencyByDistance] - 用于基于与相机的距离设置半透明度。 * @property [pixelOffsetScaleByDistance] - 用于基于与相机的距离设置pixelOffset。 * @property [imageSubRegion] - 定义用于广告牌的图像的子区域,而不是从左下角开始以像素为单位的整个图像。 * @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用 * @property [label] - 支持附带文字的显示 */ type StyleOptions = any | { image?: string | HTMLCanvasElement; opacity?: number; scale?: number; rotation?: number; rotationDegree?: number; horizontalOrigin?: Cesium.HorizontalOrigin; verticalOrigin?: Cesium.VerticalOrigin; width?: number; height?: number; hasPixelOffset?: boolean; pixelOffsetX?: number; pixelOffsetY?: number; pixelOffset?: Cesium.Cartesian2 | number[]; scaleByDistance?: boolean | Cesium.NearFarScalar; scaleByDistance_far?: number; scaleByDistance_farValue?: number; scaleByDistance_near?: number; scaleByDistance_nearValue?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; clampToGround?: boolean; heightReference?: Cesium.HeightReference; visibleDepth?: boolean; disableDepthTestDistance?: number; color?: Cesium.Color; eyeOffset?: Cesium.Cartesian3; alignedAxis?: Cesium.Cartesian3; sizeInMeters?: boolean; translucencyByDistance?: Cesium.NearFarScalar; pixelOffsetScaleByDistance?: Cesium.NearFarScalar; imageSubRegion?: Cesium.BoundingRectangle; setHeight?: number | string; addHeight?: number | string; highlight?: any; label?: LabelEntity.StyleOptions | any; }; } /** * 距离计算工具类(精简版) * 使用Cesium内置方法进行距离和方位角计算 * @namespace calculateDistance */ export declare const calculateDistance: { /** * 计算两点间距离(使用Cesium内置方法) * @param {CameraPosition} point1 - 第一个点的坐标 * @param {CameraPosition} point2 - 第二个点的坐标 * @returns {number} 两点间距离(单位:米) * @example * const point1 = { lng: 116.3974, lat: 39.9093, alt: 0 }; * const point2 = { lng: 116.4074, lat: 39.9193, alt: 0 }; * const distance = calculateDistance.getDistance(point1, point2); * console.log(distance); // 输出距离(米) */ getDistance(point1: CameraPosition, point2: CameraPosition): number; /** * 计算两点间的方位角(使用Cesium内置方法) * @param {CameraPosition} point1 - 起始点坐标 * @param {CameraPosition} point2 - 目标点坐标 * @returns {number} 方位角(单位:度,0-360,北为0°,顺时针) * @example * const point1 = { lng: 116.3974, lat: 39.9093, alt: 0 }; * const point2 = { lng: 116.4074, lat: 39.9193, alt: 0 }; * const bearing = calculateDistance.getBearing(point1, point2); * console.log(bearing); // 输出方位角(度) */ getBearing(point1: CameraPosition, point2: CameraPosition): number; }; /** * 相机位置与姿态描述。 * @public */ export declare interface CameraPosition { lat: number; lng: number; alt: number; heading?: number; pitch?: number; roll?: number; } declare class CircleEntity extends mars3d.graphic.CircleEntity { constructor(options: { position: LngLatPoint | Cesium.Cartesian3 | Cesium.PositionProperty | number[] | string; style: CircleEntity_2.StyleOptions | any; attr?: any; availability?: Cesium.TimeIntervalCollection; description?: Cesium.Property | string; viewFrom?: Cesium.Property; parent?: Cesium.Entity; onBeforeCreate?: (...params: any[]) => any; drawShowRadius?: boolean; drawShow?: boolean; hasDrawDelPoint?: boolean; hasEdit?: boolean; hasMoveEdit?: boolean; popup?: string | any[] | ((...params: any[]) => any); popupOptions?: Popup.StyleOptions | any; tooltip?: string | any[] | ((...params: any[]) => any); tooltipOptions?: Tooltip.StyleOptions | any; contextmenuItems?: any; id?: string | number; name?: string; show?: boolean; eventParent?: BaseClass | boolean; allowDrillPick?: boolean | ((...params: any[]) => any); flyTo?: boolean; flyToOptions?: any; }); } declare namespace CircleEntity_2 { /** * 圆、圆柱 支持的样式信息 * @property [radius = 100] - 半径 * @property [height = 0] - 高程,圆相对于椭球面的高度。 * @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。 * @property [diffHeight = 100] - 高度差(圆柱本身的高度),与extrudedHeight二选一。 * @property [extrudedHeight] - 指定椭圆的挤压面相对于椭球面的高度。 * @property [extrudedHeightReference = Cesium.HeightReference.NONE] - 指定挤压高度相对于什么的属性。 * @property [fill = true] - 是否填充 * @property [materialType = "Color"] - 填充类型 ,可选项:{@link MaterialType} * @property [materialOptions] - materialType对应的{@link MaterialType}中材质参数 * @property [material = Cesium.Color.WHITE] - 指定用于填充的材质,指定material后`materialType`和`material材质参数`将被覆盖。 * @property [color = "#3388ff"] - 填充颜色 * @property [opacity = 1.0] - 透明度, 取值范围:0.0-1.0 * @property [outline = false] - 是否边框 * @property [outlineWidth = 1] - 边框宽度 * @property [outlineColor = "#ffffff"] - 边框颜色 * @property [outlineOpacity = 0.6] - 边框透明度 * @property [outlineStyle] - 边框的完整自定义样式,会覆盖outlineWidth、outlineColor等参数。 * @property [rotation = 0] - 旋转角度(弧度值),正北为0,逆时针旋转 * @property [rotationDegree = 0] - 旋转角度(度数值,0-360度),与rotation二选一 * @property [stRotation = 0] - 椭圆纹理的角度(弧度值),正北为0,逆时针旋转 * @property [stRotationDegree = 0] - 椭圆纹理的角度(度数值,0-360度),与stRotation二选一 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_far = 100000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [granularity = Cesium.Math.RADIANS_PER_DEGREE] - 指定椭圆上各点之间的角距离。 * @property [numberOfVerticalLines = 16] - 指定沿轮廓的周长绘制的垂直线的数量。 * @property [hasShadows = false] - 是否投射阴影 * @property [shadows = Cesium.ShadowMode.DISABLED] - 指定椭圆是投射还是接收来自光源的阴影。 * @property [clampToGround = false] - 是否贴地 * @property [classificationType = Cesium.ClassificationType.BOTH] - 指定贴地时的覆盖类型,是只对地形、3dtiles 或 两者同时。 * @property [zIndex = 0] - 层级顺序。用于排序地面几何。只有在椭圆为常量且没有指定height或exturdedHeight时才有效果。 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用 * @property [label] - 支持附带文字的显示 */ type StyleOptions = any | { radius?: number; height?: number; heightReference?: Cesium.HeightReference; diffHeight?: number; extrudedHeight?: number; extrudedHeightReference?: Cesium.HeightReference; fill?: boolean; materialType?: string; materialOptions?: any; material?: Cesium.MaterialProperty | BaseMaterialProperty | Cesium.Color; color?: string | Cesium.Color; opacity?: number; outline?: boolean; outlineWidth?: number; outlineColor?: string | Cesium.Color; outlineOpacity?: number; outlineStyle?: PolylineEntity_2.StyleOptions | any; rotation?: number | Cesium.Property; rotationDegree?: number; stRotation?: number | Cesium.Property; stRotationDegree?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; granularity?: number; numberOfVerticalLines?: number; hasShadows?: boolean; shadows?: Cesium.ShadowMode; clampToGround?: boolean; classificationType?: Cesium.ClassificationType; zIndex?: number; addHeight?: number | string; highlight?: CircleEntity_2.StyleOptions | any; label?: LabelEntity.StyleOptions | any; }; } /** * 颜色工具类(精简版) * 提供常用的颜色转换和生成功能 * @namespace color */ export declare const color: { /** * 十六进制颜色转RGBA格式 * @param {string} hex - 十六进制颜色值(如 "#FF0000") * @param {number} [alpha=1] - 透明度(0-1) * @returns {string} RGBA格式颜色字符串 * @example * const rgba1 = color.hexToRgba("#FF0000"); // "rgba(255, 0, 0, 1)" * const rgba2 = color.hexToRgba("#FF0000", 0.5); // "rgba(255, 0, 0, 0.5)" */ hexToRgba(hex: string, alpha?: number): string; /** * 生成随机十六进制颜色 * @returns {string} 随机十六进制颜色字符串(如 "#A1B2C3") * @example * const randomColor = color.randomColor(); * console.log(randomColor); // "#A1B2C3"(随机颜色) */ randomColor(): string; }; /** * 坐标转换工具类(精简版) * 提供中国特有的坐标系转换 + Cesium原生支持的转换方法 * @namespace convertCoordinates */ export declare const convertCoordinates: { /** * 经纬度转Cesium笛卡尔坐标(使用Cesium内置方法) * @param {number} lng - 经度(度) * @param {number} lat - 纬度(度) * @param {number} [alt=0] - 高度(米) * @returns {any} Cesium.Cartesian3对象 * @example * const cartesian = convertCoordinates.lngLatToCartesian(116.3974, 39.9093, 100); * console.log(cartesian); // Cesium.Cartesian3对象 */ lngLatToCartesian(lng: number, lat: number, alt?: number): any; /** * Cesium笛卡尔坐标转经纬度(使用Cesium内置方法) * @param {any} cartesian - Cesium.Cartesian3对象 * @returns {{ lng: number; lat: number; alt: number }} 经纬度对象 * @example * const cartesian = Cesium.Cartesian3.fromDegrees(116.3974, 39.9093, 100); * const lngLat = convertCoordinates.cartesianToLngLat(cartesian); * console.log(lngLat); // { lng: 116.3974, lat: 39.9093, alt: 100 } */ cartesianToLngLat(cartesian: any): { lng: number; lat: number; alt: number; }; /** * 批量经纬度转Cesium笛卡尔坐标数组(使用Cesium内置方法) * @param {number[]} coordinates - 经纬度数组 [lng1, lat1, lng2, lat2, ...] * @returns {any[]} Cesium.Cartesian3对象数组 * @example * const coords = [116.3974, 39.9093, 116.4074, 39.9193]; * const cartesians = convertCoordinates.lngLatArrayToCartesian(coords); * console.log(cartesians); // [Cartesian3, Cartesian3] */ lngLatArrayToCartesian(coordinates: number[]): any[]; /** * 批量经纬度+高度转Cesium笛卡尔坐标数组(使用Cesium内置方法) * @param {number[]} coordinates - 经纬度高度数组 [lng1, lat1, alt1, lng2, lat2, alt2, ...] * @returns {any[]} Cesium.Cartesian3对象数组 * @example * const coords = [116.3974, 39.9093, 100, 116.4074, 39.9193, 200]; * const cartesians = convertCoordinates.lngLatAltArrayToCartesian(coords); * console.log(cartesians); // [Cartesian3, Cartesian3] */ lngLatAltArrayToCartesian(coordinates: number[]): any[]; /** * WGS84转GCJ02(火星坐标系) * @param {number} lng - 经度(WGS84坐标系) * @param {number} lat - 纬度(WGS84坐标系) * @returns {[number, number]} 转换后的坐标 [经度, 纬度](GCJ02坐标系) * @example * const [gcjLng, gcjLat] = convertCoordinates.wgs84ToGcj02(116.3974, 39.9093); * console.log(gcjLng, gcjLat); // 输出转换后的火星坐标 */ wgs84ToGcj02(lng: number, lat: number): [number, number]; /** * GCJ02转WGS84 * @param {number} lng - 经度(GCJ02坐标系) * @param {number} lat - 纬度(GCJ02坐标系) * @returns {[number, number]} 转换后的坐标 [经度, 纬度](WGS84坐标系) * @example * const [wgsLng, wgsLat] = convertCoordinates.gcj02ToWgs84(116.4034, 39.9143); * console.log(wgsLng, wgsLat); // 输出转换后的WGS84坐标 */ gcj02ToWgs84(lng: number, lat: number): [number, number]; /** * WGS84转BD09(百度坐标系) * @param {number} lng - 经度(WGS84坐标系) * @param {number} lat - 纬度(WGS84坐标系) * @returns {[number, number]} 转换后的坐标 [经度, 纬度](BD09坐标系) * @example * const [bdLng, bdLat] = convertCoordinates.wgs84ToBd09(116.3974, 39.9093); * console.log(bdLng, bdLat); // 输出转换后的百度坐标 */ wgs84ToBd09(lng: number, lat: number): [number, number]; /** * BD09转WGS84 * @param {number} lng - 经度(BD09坐标系) * @param {number} lat - 纬度(BD09坐标系) * @returns {[number, number]} 转换后的坐标 [经度, 纬度](WGS84坐标系) * @example * const [wgsLng, wgsLat] = convertCoordinates.bd09ToWgs84(116.404, 39.915); * console.log(wgsLng, wgsLat); // 输出转换后的WGS84坐标 */ bd09ToWgs84(lng: number, lat: number): [number, number]; /** * GCJ02转BD09 * @param {number} lng - 经度(GCJ02坐标系) * @param {number} lat - 纬度(GCJ02坐标系) * @returns {[number, number]} 转换后的坐标 [经度, 纬度](BD09坐标系) * @example * const [bdLng, bdLat] = convertCoordinates.gcj02ToBd09(116.4034, 39.9143); * console.log(bdLng, bdLat); // 输出转换后的百度坐标 */ gcj02ToBd09(lng: number, lat: number): [number, number]; /** * BD09转GCJ02 * @param {number} lng - 经度(BD09坐标系) * @param {number} lat - 纬度(BD09坐标系) * @returns {[number, number]} 转换后的坐标 [经度, 纬度](GCJ02坐标系) * @example * const [gcjLng, gcjLat] = convertCoordinates.bd09ToGcj02(116.404, 39.915); * console.log(gcjLng, gcjLat); // 输出转换后的火星坐标 */ bd09ToGcj02(lng: number, lat: number): [number, number]; /** * 判断坐标是否在中国境外 * @param {number} lng - 经度 * @param {number} lat - 纬度 * @returns {boolean} 是否在中国境外 * @example * const isOutside = convertCoordinates.isOutOfChina(120.0, 30.0); * console.log(isOutside); // false,在中国境内 */ isOutOfChina(lng: number, lat: number): boolean; /** * 纬度转换(内部方法) * @param {number} lng - 经度偏移量 * @param {number} lat - 纬度偏移量 * @returns {number} 转换后的纬度偏移量 * @private */ transformLat(lng: number, lat: number): number; /** * 经度转换(内部方法) * @param {number} lng - 经度偏移量 * @param {number} lat - 纬度偏移量 * @returns {number} 转换后的经度偏移量 * @private */ transformLng(lng: number, lat: number): number; }; declare const _default: { Map: typeof Map_2; MyLayer: typeof MyLayer; SatelliteLayer: typeof SatelliteLayer; mars3d: typeof mars3d; Cesium: any; utils: UtilityFunctions; loadSpacePlugin: () => Promise; }; export default _default; /** 回调函数类型。 */ export declare interface EventCallback { (event?: any): void; } /** * 几何计算工具类(精简版) * 使用Cesium和Turf进行几何计算,提供更精确的结果 * @namespace geometry */ export declare const geometry: { /** * 将任意位置对象规范化为经纬度(lng, lat) * * 注意:此方法为内部工具,业务侧请直接传入经纬度(WGS84)格式: * - 点:{ lng, lat } 或 [lng, lat] * - 顶点数组:Array<{ lng, lat }> 或 Array<[lng, lat]> * * @param {any} pos - 任意位置对象(数组/对象/Cesium.Cartesian3 等) * @returns {{ lng: number; lat: number } | null} 规范化的经纬度对象,若无法解析则返回 null * @private * @example * const pos1 = [116.3974, 39.9093]; * const pos2 = { lng: 116.3974, lat: 39.9093 }; * const pos3 = { longitude: 116.3974, latitude: 39.9093 }; * const normalized1 = geometry._normalizeToLngLat(pos1); // { lng: 116.3974, lat: 39.9093 } * const normalized2 = geometry._normalizeToLngLat(pos2); // { lng: 116.3974, lat: 39.9093 } * const normalized3 = geometry._normalizeToLngLat(pos3); // { lng: 116.3974, lat: 39.9093 } */ _normalizeToLngLat(pos: any): { lng: number; lat: number; } | null; /** * 判断点是否在多边形内(使用Turf,推荐) * * 输入均使用经纬度(WGS84,单位:度)。 * - 点 `point`: { lng, lat, alt? } * - 多边形 `polygon`: Array<{ lng, lat, alt? }> * * @param {CameraPosition} point - 点坐标(经纬度) * @param {CameraPosition[]} polygon - 多边形顶点数组(经纬度) * @returns {boolean} 是否在多边形内 * @example * const point = { lng: 116.45, lat: 39.85, alt: 0 }; * const polygon = [ * { lng: 116.4, lat: 39.9, alt: 0 }, * { lng: 116.5, lat: 39.9, alt: 0 }, * { lng: 116.5, lat: 39.8, alt: 0 }, * { lng: 116.4, lat: 39.8, alt: 0 }, * ]; * const inside = geometry.isPointInPolygon(point, polygon); * console.log(inside); // true 或 false */ isPointInPolygon(point: CameraPosition, polygon: CameraPosition[]): boolean; /** * 判断点是否在 mars3d 多边形图形内(使用Turf) * * 要求: * - 点 `point`: { lng, lat } * - 多边形实体 `polygonEntity`: mars3d.graphic.PolygonEntity,且其 `positions` 为经纬度数组: * - 形如 Array<{ lng, lat }> 或 Array<[lng, lat]> * * @param {CameraPosition} point - 点坐标(经纬度) * @param {any} polygonEntity - mars3d 多边形图形对象(positions 为经纬度) * @returns {boolean} 是否在多边形内 * @example * const point = { lng: 116.45, lat: 39.85, alt: 0 }; * const polygonEntity = layer.addPolygon([ * { lng: 116.4, lat: 39.9, alt: 0 }, * { lng: 116.5, lat: 39.9, alt: 0 }, * { lng: 116.5, lat: 39.8, alt: 0 }, * { lng: 116.4, lat: 39.8, alt: 0 }, * ]); * const inside = geometry.isPointInPolygonEntity(point, polygonEntity); * console.log(inside); // true 或 false */ isPointInPolygonEntity(point: CameraPosition, polygonEntity: any): boolean; /** * 计算多边形面积(使用Turf,更精确) * @param {CameraPosition[]} polygon - 多边形顶点数组(经纬度) * @returns {number} 多边形面积(单位:平方米) * @example * const polygon = [ * { lng: 116.4, lat: 39.9, alt: 0 }, * { lng: 116.5, lat: 39.9, alt: 0 }, * { lng: 116.5, lat: 39.8, alt: 0 }, * { lng: 116.4, lat: 39.8, alt: 0 }, * ]; * const area = geometry.getPolygonArea(polygon); * console.log(area); // 输出面积(平方米) */ getPolygonArea(polygon: CameraPosition[]): number; /** * 计算多边形中心点(使用Turf,更精确) * @param {CameraPosition[]} polygon - 多边形顶点数组(经纬度) * @returns {CameraPosition} 多边形中心点坐标 * @throws {Error} 当多边形为空时抛出错误 * @example * const polygon = [ * { lng: 116.4, lat: 39.9, alt: 0 }, * { lng: 116.5, lat: 39.9, alt: 0 }, * { lng: 116.5, lat: 39.8, alt: 0 }, * { lng: 116.4, lat: 39.8, alt: 0 }, * ]; * const center = geometry.getPolygonCenter(polygon); * console.log(center); // { lng: 116.45, lat: 39.85, alt: 0 } */ getPolygonCenter(polygon: CameraPosition[]): CameraPosition; }; export declare type GraphicInstance = mars3d.graphic.BaseGraphic; /** * 通用图形创建选项。 * @public */ export declare interface GraphicOptions { id?: string; name?: string; show?: boolean; style?: GraphicStyle; [key: string]: any; } /** * 通用图形样式。 * @public */ export declare interface GraphicStyle { color?: string; opacity?: number; outlineColor?: string; outlineWidth?: number; pixelSize?: number; width?: number; height?: number; text?: string; font_size?: number; [key: string]: any; } declare namespace LabelEntity { /** * 文本点 支持的样式信息 * @property [text = "文字"] - 文本内容,换行可以用换行符'\n'。 * @property [scale = 1.0] - 指定缩放比例。 * @property [horizontalOrigin] - 横向方向的定位 * @property [verticalOrigin] - 垂直方向的定位 * @property [font_family = "楷体"] - 字体 ,可选项:微软雅黑,宋体,楷体,隶书,黑体 等 * @property [font_size = 30] - 字体大小 * @property [font_weight = "normal"] - 是否加粗 ,可选项:bold (解释:是),normal (解释:否), * @property [font_style = "normal"] - 是否斜体 ,可选项:italic (解释:是),normal (解释:否), * @property [font = '30px normal normal 楷体'] - 上叙4个属性的一次性指定CSS字体的属性。 * @property [fill = true] - 是否填充 * @property [color = "#ffffff"] - 文本颜色 * @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0 * @property [outline = false] - 是否衬色 * @property [outlineColor = "#000000"] - 衬色颜色 * @property [outlineOpacity = 0.6] - 衬色透明度 * @property [outlineWidth = 2.0] - 衬色宽度 * @property [background = false] - 是否背景 * @property [backgroundColor = "#000000"] - 背景颜色 * @property [backgroundOpacity = 0.5] - 背景透明度 * @property [backgroundPadding = new Cesium.Cartesian2(7, 5)] - 背景内边距,指定文字与填充边界内容之间的空间(以像素为单位)。 * @property [hasPixelOffset = false] - 是否存在偏移量 * @property [pixelOffsetX = 0] - 横向偏移像素 * @property [pixelOffsetY = 0] - 纵向偏移像素 * @property [pixelOffset = Cartesian2.ZERO] - A {@link Cartesian2} Property specifying the pixel offset. * @property [pixelOffsetScaleByDistance] - A {@link NearFarScalar} Property used to set pixelOffset based on distance from the camera. * @property [eyeOffset = Cartesian3.ZERO] - A {@link Cartesian3} Property specifying the eye offset. * @property [scaleByDistance = false] - 是否按视距缩放 或 设定基于与相机的距离设置比例。 * @property [scaleByDistance_far = 1000000] - 上限 * @property [scaleByDistance_farValue = 0.1] - 比例值 * @property [scaleByDistance_near = 1000] - 下限 * @property [scaleByDistance_nearValue = 1] - 比例值 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_far = 100000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [clampToGround = false] - 是否贴地 * @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。 * @property [visibleDepth = true] - 是否被遮挡 * @property [disableDepthTestDistance] - 指定从相机到禁用深度测试的距离。 * @property [translucencyByDistance] - 用于基于与相机的距离设置半透明度。 * @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 * @property [templateEmptyStr = ""] - 当text存在模版字符串配置时,空值时显示的内容 */ type StyleOptions = any | { text?: string; scale?: number; horizontalOrigin?: Cesium.HorizontalOrigin; verticalOrigin?: Cesium.VerticalOrigin; font_family?: string; font_size?: number; font_weight?: string; font_style?: string; font?: string; fill?: boolean; color?: string | Cesium.Color; opacity?: number; outline?: boolean; outlineColor?: string | Cesium.Color; outlineOpacity?: number; outlineWidth?: number; background?: boolean; backgroundColor?: string | Cesium.Color; backgroundOpacity?: number; backgroundPadding?: number | Cesium.Cartesian2; hasPixelOffset?: boolean; pixelOffsetX?: number; pixelOffsetY?: number; pixelOffset?: Cesium.Cartesian2 | number[]; pixelOffsetScaleByDistance?: Cesium.NearFarScalar; eyeOffset?: Cesium.Cartesian3; scaleByDistance?: boolean | Cesium.NearFarScalar; scaleByDistance_far?: number; scaleByDistance_farValue?: number; scaleByDistance_near?: number; scaleByDistance_nearValue?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; clampToGround?: boolean; heightReference?: Cesium.HeightReference; visibleDepth?: boolean; disableDepthTestDistance?: number; translucencyByDistance?: Cesium.NearFarScalar; setHeight?: number | string; addHeight?: number | string; templateEmptyStr?: string; }; } declare class LabelEntity_2 extends mars3d.graphic.LabelEntity { constructor(options: { position: LngLatPoint | Cesium.Cartesian3 | Cesium.PositionProperty | number[] | string; style: LabelEntity.StyleOptions | any; attr?: any; availability?: Cesium.TimeIntervalCollection; description?: Cesium.Property | string; viewFrom?: Cesium.Property; parent?: Cesium.Entity; onBeforeCreate?: (...params: any[]) => any; drawShow?: boolean; hasEdit?: boolean; popup?: string | any[] | ((...params: any[]) => any); popupOptions?: Popup.StyleOptions | any; tooltip?: string | any[] | ((...params: any[]) => any); tooltipOptions?: Tooltip.StyleOptions | any; contextmenuItems?: any; id?: string | number; name?: string; show?: boolean; eventParent?: BaseClass | boolean; allowDrillPick?: boolean | ((...params: any[]) => any); flyTo?: boolean; flyToOptions?: any; }); } /** * 图层事件类型。 * @public */ export declare type LayerEventType = 'graphicAdded' | 'graphicRemoved' | 'graphicUpdated' | 'visibilityChanged' | 'opacityChanged'; export declare type LayerInstance = MyLayer; /** * 图层初始化选项。 * * @public * @example * ```ts * import { MyLayer } from 'kyd-map3d' * * const layer = new MyLayer({ * id: 'poi-layer', * name: 'POI', * show: true, * opacity: 0.9 * }) * ``` */ export declare interface LayerOptions { /** 图层唯一标识 */ id?: string; /** 图层显示名称 */ name?: string; /** 是否显示图层(默认 true) */ show?: boolean; /** 透明度 [0,1] (默认 1.0) */ opacity?: number; [key: string]: any; } /** * 坐标点类(含经度、纬度、高度) * @param lng - 经度值, -180 至 180 * @param lat - 纬度值, -90 至 90 * @param [alt] - 高度(单位:米) */ declare class LngLatPoint extends mars3d.LngLatPoint { constructor(lng: number | string, lat: number | string, alt?: number | string); } export declare const loadSpacePlugin: () => Promise; /** * 三维地图封装,基于 `mars3d.Map` 扩展。 * * 暴露更友好的 API(初始化检测、视角控制、图层管理、事件系统等)。 * * 使用示例: * ```ts * import { Map } from 'kyd-map3d' * import { mapOptions } from 'kyd-map3d/dist/types' * * // 容器 id * const id = 'mapContainer' * * // 可选:自定义部分地图配置(会与默认 mapOptions 深度合并) * const options = { * scene: { center: { lat: 31.8, lng: 117.2, alt: 15000000 } }, * control: { baseLayerPicker: true } * } * * const map = new Map(id, options) * * map.addEventListener('initialized', () => { * // 设置视角 * map.setViewPosition(31.8, 117.2, 12000, 0, -45) * }) * ``` * * @public */ declare class Map_2 extends mars3d.Map { private _isInitialized; private _eventListeners; /** * 创建 Map 实例。 * * 会深度合并默认配置与传入的 `options`,并在底层地图 `load` 后标记初始化完成。 * * @param {string | any} id 容器元素的 id,或已有的 `Cesium.Viewer` 实例 * @param {MapOptions} [options] 地图配置(将与默认 `mapOptions` 深度合并) * @throws 当未提供 `id` 时抛出错误 * @example * ```ts * import { Map } from 'kyd-map3d' * import { mapOptions } from 'kyd-map3d/dist/types' * * const map = new Map('mapContainer', { * scene: { center: { lat: 30.5, lng: 114.3, alt: 500000 } } * }) * ``` */ constructor(id: string | any, options?: MapOptions); /* Excluded from this release type: deepMerge */ /** * 地图是否已初始化完成。 * @returns {boolean} */ get isInitialized(): boolean; /** * 设置地图视角。 * * @param {number} lat 纬度(度) * @param {number} lng 经度(度) * @param {number} alt 高度(米) * @param {number} [heading=0] 航向角(度) * @param {number} [pitch=-90] 俯仰角(度) * @example * ```ts * map.setViewPosition(31.8, 117.2, 12000, 30, -30) * ``` */ setViewPosition(lat: number, lng: number, alt: number, heading?: number, pitch?: number): void; /** * 飞行到指定位置。 * * @param {number} lat 纬度(度) * @param {number} lng 经度(度) * @param {number} alt 高度(米) * @param {number} [duration=2.0] 飞行时长(秒) * @returns {Promise} 一个在飞行完成时完成的 Promise * @example * ```ts * await map.flyToPosition(31.8, 117.2, 12000, 1.8) * ``` */ flyToPosition(lat: number, lng: number, alt: number, duration?: number): Promise; /** * 添加图层。 * * @param {mars3d.layer.BaseLayer} layer 要添加的图层实例 * @returns {Promise} 添加完成的 Promise * @throws 当地图未初始化时抛出错误 * @example * ```ts * const layer = new mars3d.layer.GraphicLayer() * await map.addCustomLayer(layer) * ``` */ addCustomLayer(layer: mars3d.layer.BaseLayer): Promise; /** * 移除图层。 * * @param {mars3d.layer.BaseLayer | string} layer 图层实例或图层 `id` * @returns {any} 返回当前地图实例(链式调用)或内部移除结果 * @example * ```ts * // 通过实例移除 * map.removeCustomLayer(layer) * // 通过 id 移除 * map.removeCustomLayer('my-layer-id') * ``` */ removeCustomLayer(layer: mars3d.layer.BaseLayer | string): any; /** * 获取所有图层。 * @returns {mars3d.layer.BaseLayer[]} * @example * ```ts * const layers = map.getLayers() * ``` */ getLayers(): mars3d.layer.BaseLayer[]; /** * 根据 ID 查找图层。 * * @param {string} id 图层 id * @returns {mars3d.layer.BaseLayer | undefined} 找到的图层或 `undefined` * @example * ```ts * const layer = map.getLayerById('my-layer-id') * ``` */ getLayerById(id: string): mars3d.layer.BaseLayer | undefined; /** * 清除所有图层。 * @example * ```ts * map.clearLayers() * ``` */ clearLayers(): void; /** * 启用或禁用地图交互(旋转、缩放、平移)。 * * @param {boolean} enabled 是否启用 * @example * ```ts * map.setInteraction(false) * ``` */ setInteraction(enabled: boolean): void; /** * 获取当前相机位置信息。 * * @returns {{ * position: { lat: number; lng: number; alt: number }; * heading: number; * pitch: number; * roll: number; * }} 包含相机经纬高与姿态的对象 * @throws 当地图未初始化时抛出错误 * @example * ```ts * const info = map.getCameraInfo() * console.log(info.position.lat, info.heading) * ``` */ getCameraInfo(): { position: { lat: number; lng: number; alt: number; }; heading: number; pitch: number; roll: number; }; /** * 注册自定义事件监听器。 * * @param {string} event 事件名 * @param {Function} callback 回调函数 * @example * ```ts * const onReady = () => console.log('ready') * map.addEventListener('initialized', onReady) * ``` */ addEventListener(event: string, callback: Function): void; /** * 移除事件监听器。 * * @param {string} event 事件名 * @param {Function} [callback] 可选:不传则移除该事件的所有监听器 * @example * ```ts * map.removeEventListener('initialized', onReady) * ``` */ removeEventListener(event: string, callback?: Function): void; /* Excluded from this release type: emit */ /** * 销毁地图实例并清理资源。 * @example * ```ts * map.destroy() * ``` */ destroy(): void; } export { Map_2 as Map } /** * 地图事件类型。 * @public */ export declare type MapEventType = 'initialized' | 'error' | 'load' | 'click' | 'mousemove' | 'cameraChanged'; export declare type MapInstance = Map_2; /** * 地图配置项。 * 对 `mars3d.Map` 的配置进行了一层类型包装。 * @public */ export declare interface MapOptions { scene?: mars3d.Map.sceneOptions; control?: mars3d.Map.controlOptions; effect?: mars3d.Map.effectOptions; mouse?: mars3d.Map.mouseOptions; terrain?: mars3d.Map.terrainOptions; basemaps?: mars3d.Map.basemapOptions[]; layers?: mars3d.Map.layerOptions[]; chinaCRS?: ChinaCRS; lang?: string; templateValues?: any; token?: mars3d.Map.tokenOptions; } export { mars3d } declare namespace ModelEntity { /** * gltf小模型 支持的样式信息 * @property [url] - glTF模型的URI的字符串或资源属性。 * @property [scale = 1] - 比例 * @property [heading = 0] - 方向角 (度数值,0-360度),优先级高于orientation * @property [pitch = 0] - 俯仰角(度数值,0-360度),优先级高于orientation * @property [roll = 0] - 翻滚角(度数值,0-360度),优先级高于orientation * @property [mergeOrientation = false] - 当存在orientation时(如addDynamicPosition等),设置为true时,是在orientation基础的方式值上加上设置是heading、pitch、roll值,比如用于设置模型不是标准的方向时的纠偏处理 * @property [radius] - 编辑时,半径圆圈的半径,默认自动 * @property [minimumPixelSize = 0.0] - 指定模型的近似最小像素大小,而不考虑缩放。 * @property [maximumScale] - 模型的最大比例尺寸。minimumPixelSize的上限。 * @property [fill = false] - 是否填充,指定与模型渲染颜色混合 * @property [color = "#3388ff"] - 颜色 * @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0 * @property [colorBlendMode = ColorBlendMode.HIGHLIGHT] - 指定颜色如何与模型混合。 * @property [colorBlendAmount = 0.5] - 当colorBlendMode为MIX时指定颜色强度的数字属性。0.0的值表示模型渲染的颜色,1.0的值表示纯色,任何介于两者之间的值表示两者的混合。 * @property [silhouette = false] - 是否轮廓 * @property [silhouetteColor = "#ff0000"] - 轮廓颜色 * @property [silhouetteSize = 2] - 轮廓宽度 * @property [silhouetteAlpha = 0.8] - 轮廓透明度 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [distanceDisplayCondition_far = 100000] - 最大距离 * @property [distanceDisplayPoint] - 当视角距离超过一定距离后(distanceDisplayCondition_far定义的) 后显示为 像素点 对象的样式,仅在distanceDisplayCondition设置时有效。 * @property [distanceDisplayBillboard] - 当视角距离超过一定距离后(distanceDisplayCondition_far定义的) 后显示为 图标 对象的样式,仅在distanceDisplayCondition设置时有效。 * @property [hasShadows = true] - 是否阴影 * @property [shadows = ShadowMode.ENABLED] - 指定模型是投射还是接收来自光源的阴影。 * @property [clampToGround = false] - 是否贴地 * @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。 * @property [incrementallyLoadTextures = true] - 确定模型加载后纹理是否会继续流进来。 * @property [runAnimations = true] - 指定模型中指定的glTF动画是否应该启动。 * @property [clampAnimations = true] - 指定在没有关键帧的情况下,glTF动画是否应该保持最后一个姿势。 * @property [lightColor] - 在为模型着色时指定光的颜色的属性。当undefined场景的浅色被使用代替。 * @property [nodeTransformations] - 一个对象,其中键是节点的名称,值是{@link TranslationRotationScale}属性,描述要应用到该节点的转换。该转换是在节点的现有转换之后(如glTF中指定的那样)应用的,并且不会替换节点的现有转换。 * @property [articulations] - An object, where keys are composed of an articulation name, a single space, and a stage name, and the values are numeric properties. * @property [clippingPlanes] - 用于裁剪模型的Plane平面集合 * @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用 * @property [label] - 支持附带文字的显示 */ type StyleOptions = any | { url?: string | Cesium.Resource; scale?: number; heading?: number; pitch?: number; roll?: number; mergeOrientation?: boolean; radius?: number; minimumPixelSize?: number; maximumScale?: number; fill?: boolean; color?: string | Cesium.Color; opacity?: number; colorBlendMode?: Cesium.ColorBlendMode; colorBlendAmount?: number; silhouette?: boolean; silhouetteColor?: string | Cesium.Color; silhouetteSize?: number; silhouetteAlpha?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_near?: number; distanceDisplayCondition_far?: number; distanceDisplayPoint?: PointEntity_2.StyleOptions | any; distanceDisplayBillboard?: BillboardEntity.StyleOptions | any; hasShadows?: boolean; shadows?: Cesium.ShadowMode; clampToGround?: boolean; heightReference?: Cesium.HeightReference; incrementallyLoadTextures?: boolean; runAnimations?: boolean; clampAnimations?: boolean; lightColor?: Cesium.Color; nodeTransformations?: Cesium.PropertyBag | { [key: string]: Cesium.TranslationRotationScale; }; articulations?: Cesium.PropertyBag | { [key: string]: number; }; clippingPlanes?: Cesium.ClippingPlaneCollection; setHeight?: number | string; addHeight?: number | string; highlight?: ModelEntity.StyleOptions | any; label?: LabelEntity.StyleOptions | any; }; } /** * 图形图层封装,提供便捷的增删改查与高亮等能力。 * * 用法示例: * ```ts * import { Map, MyLayer } from 'kyd-map3d' * * const map = new Map('mapContainer') * const layer = new MyLayer({ id: 'my-layer', name: '业务图层' }) * await map.addCustomLayer(layer) * * // 添加一个点 * layer.addPoint({ lat: 31.8, lng: 117.2, alt: 30 }, { style: { pixelSize: 12 } }) * ``` * * @public */ export declare class MyLayer extends mars3d.layer.GraphicLayer { private _eventListeners; private _isVisible; private _opacity; /** * 创建 MyLayer 实例。 * @param {LayerOptions} [options] 图层选项 * @example * ```ts * const layer = new MyLayer({ id: 'l1', show: true, opacity: 0.8 }) * ``` */ constructor(options?: LayerOptions); /** * 高亮所有图形。 * @param {string} [color="#ff0000"] 高亮颜色 * @example * ```ts * layer.highlightAll('#00ffff') * ``` */ highlightAll(color?: string): void; /** * 取消高亮所有图形。 * @example * ```ts * layer.unhighlightAll() * ``` */ unhighlightAll(): void; /** * 根据条件高亮图形。 * @param {(graphic:any)=>boolean} condition 判定函数,返回 true 的图形会被高亮 * @param {string} [color="#ff0000"] 高亮颜色 * @example * ```ts * layer.highlightByCondition(g => g.attr?.type === 'alert', '#ffa500') * ``` */ highlightByCondition(condition: (graphic: any) => boolean, color?: string): void; /** * 添加点图形。 * @param {{ lat: number; lng: number; alt?: number }} position 点位经纬高 * @param {any} [options] 额外配置,`style` 会与默认样式合并 * @param {boolean | Cesium.NearFarScalar | [number, number, number, number]} [autoScale] 根据视距动态缩放 * - `true` 启用默认缩放: new Cesium.NearFarScalar(100, 1.2, 10000000, 0.6) * - 传 `Cesium.NearFarScalar` 或 `[near, nearValue, far, farValue]` 自定义 * - `false/undefined` 不处理(可从 options.style.scaleByDistance 传入) * @returns {PointEntity} 新增的点实体 * @example * ```ts * // 默认缩放 * const pt1 = layer.addPoint({ lat: 31.8, lng: 117.2, alt: 30 }, { style: { pixelSize: 14 } }, true) * // 自定义缩放(数组) * const pt2 = layer.addPoint({ lat: 31.8, lng: 117.2 }, {}, [100, 1.5, 10000000, 0.5]) * // 使用 options.style.scaleByDistance * const pt3 = layer.addPoint({ lat: 31.8, lng: 117.2 }, { style: { scaleByDistance: new Cesium.NearFarScalar(100, 1.2, 1e7, 0.6) } }) * ``` */ addPoint(position: { lat: number; lng: number; alt?: number; }, options?: any, autoScale?: boolean | Cesium.NearFarScalar | [number, number, number, number]): PointEntity; /** * 添加线图形。 * @param {Array<{ lat: number; lng: number; alt?: number }>} positions 位置数组 * @param {any} [options] 额外配置 * @returns {PolylineEntity} 新增的线实体 * @example * ```ts * const line = layer.addPolyline([ * { lat: 31.8, lng: 117.2 }, * { lat: 31.85, lng: 117.25 } * ], { style: { width: 4, color: '#36d9ec' } }) * ``` */ addPolyline(positions: Array<{ lat: number; lng: number; alt?: number; }>, options?: any): PolylineEntity; /** * 添加多边形图形。 * @param {Array<{ lat: number; lng: number; alt?: number }>} positions 位置数组 * @param {any} [options] 额外配置 * @returns {mars3d.graphic.PolygonEntity} 新增的多边形实体 * @example * ```ts * const poly = layer.addPolygon([ * { lat: 31.8, lng: 117.2 }, * { lat: 31.85, lng: 117.2 }, * { lat: 31.85, lng: 117.25 } * ], { style: { color: '#00ffff', opacity: 0.3 } }) * ``` */ addPolygon(positions: Array<{ lat: number; lng: number; alt?: number; }>, options?: any): mars3d.graphic.PolygonEntity; /** * 添加圆形图形。 * @param {{ lat: number; lng: number; alt?: number }} center 圆心位置 * @param {number} [radius] 半径(米),若不传则使用样式中的 `radius` 或默认 1000 * @param {any} [options] 额外配置 * @returns {CircleEntity} 新增的圆实体 * @example * ```ts * const circle = layer.addCircle({ lat: 31.8, lng: 117.2 }, 500, * { style: { color: '#00ffff', opacity: 0.4 } }) * ``` */ addCircle(center: { lat: number; lng: number; alt?: number; }, radius?: number, options?: any): CircleEntity; /** * 添加标签图形。 * @param {{ lat: number; lng: number; alt?: number }} position 标签位置 * @param {string} text 文本内容 * @param {any} [options] 额外配置 * @returns {LabelEntity} 新增的标签实体 * @example * ```ts * const label = layer.addLabel({ lat: 31.8, lng: 117.2, alt: 50 }, 'Hello', * { style: { background: true } }) * ``` */ addLabel(position: { lat: number; lng: number; alt?: number; }, text: string, options?: any): LabelEntity_2; /** * 根据 ID 查找图形。 * @param {string} id 图形 id * @returns {mars3d.graphic.BaseGraphic | undefined} 找到的图形或 `undefined` * @example * ```ts * const g = layer.getGraphicById('g-1') * ``` */ getGraphicById(id: string): mars3d.graphic.BaseGraphic | undefined; /** * 根据条件查找图形。 * @param {(graphic:any)=>boolean} condition 过滤函数 * @returns {mars3d.graphic.BaseGraphic[]} 匹配到的图形数组 * @example * ```ts * const list = layer.getGraphicsByCondition(g => g.type === 'Point') * ``` */ getGraphicsByCondition(condition: (graphic: any) => boolean): mars3d.graphic.BaseGraphic[]; /** * 移除指定图形。 * @param {mars3d.graphic.BaseGraphic | string} graphic 图形实例或图形 id * @returns {boolean} 是否移除成功 * @example * ```ts * layer.removeCustomGraphic('g-1') * ``` */ removeCustomGraphic(graphic: mars3d.graphic.BaseGraphic | string): boolean; /** * 清除所有图形。 * @example * ```ts * layer.clearGraphics() * ``` */ clearGraphics(): void; /** * 设置图层可见性。 * @param {boolean} visible 是否可见 * @example * ```ts * layer.setVisible(false) * ``` */ setVisible(visible: boolean): void; /** * 获取图层可见性。 * @returns {boolean} */ getVisible(): boolean; /** * 设置图层透明度。 * @param {number} opacity 透明度 [0, 1] * @example * ```ts * layer.setOpacity(0.6) * ``` */ setOpacity(opacity: number): void; /** * 获取图层透明度。 * @returns {number} */ getOpacity(): number; /** * 获取图层统计信息。 * @returns {{ totalGraphics: number; visibleGraphics: number; hiddenGraphics: number }} 统计数据 * @example * ```ts * const stats = layer.getStatistics() * console.log(stats.totalGraphics) * ``` */ getStatistics(): { totalGraphics: number; visibleGraphics: number; hiddenGraphics: number; }; /** * 注册自定义事件监听器。 * @param {string} event 事件名 * @param {Function} callback 回调函数 * @example * ```ts * const onClick = (g:any) => console.log('clicked', g) * layer.addEventListener('click', onClick) * ``` */ addEventListener(event: string, callback: Function): void; /** * 移除事件监听器。 * @param {string} event 事件名 * @param {Function} [callback] 可选,若不传则移除该事件的所有监听器 * @example * ```ts * layer.removeEventListener('click', onClick) * ``` */ removeEventListener(event: string, callback?: Function): void; /* Excluded from this release type: emit */ /** * 销毁图层并清理资源。 * @example * ```ts * layer.destroy() * ``` */ destroy(): void; } /** * 像素点 Entity对象 * @param options - 参数对象,包括以下: * @param options.position - 坐标位置 * @param options.style - 样式信息 * @param [options.attr] - 附件的属性信息,可以任意附加属性,导出geojson或json时会自动处理导出。 * @param [options.availability] - 与该对象关联的可用性(如果有的话)。 * @param [options.description] - 指定此实体的HTML描述的字符串属性(infoBox中展示)。 * @param [options.viewFrom] - 观察这个物体时建议的初始偏移量。 * @param [options.parent] - 要与此实体关联的父实体。 * @param [options.onBeforeCreate] - 在 new Cesium.Entity(addattr) 前的回调方法,可以对addattr做额外个性化处理。 * @param [options.maxCacheCount = 50] - 当使用addDynamicPosition设置为动画轨迹位置时,保留的坐标点数量,传-1时不限制 * @param [options.forwardExtrapolationType = Cesium.ExtrapolationType.HOLD] - 当使用addDynamicPosition设置为动画轨迹位置时,在任何可用坐标之后一次请求值时要执行的推断类型,默认为最后一个坐标位置。 * @param [options.backwardExtrapolationType = Cesium.ExtrapolationType.HOLD] - 当使用addDynamicPosition设置为动画轨迹位置时, 在任何可用坐标之前一次请求值时要执行的推断类型,默认为第一个坐标位置。 * @param [options.clampToTileset] - 当使用addDynamicPosition设置为动画轨迹位置时,是否进行贴模型。 * @param [options.frameRateHeight = 30] - 当使用addDynamicPosition设置为动画轨迹位置时,并clampToTileset:true时,多少帧计算一次贴模型高度 * @param [options.objectsToExclude] - 当使用addDynamicPosition设置为动画轨迹位置时,并clampToTileset:true时,排除的不进行贴模型计算的模型对象,可以是: primitives, entities, 或 3D Tiles features * @param [options.drawShow = true] - 绘制时,是否自动隐藏entity,可避免拾取坐标存在问题。 * @param [options.hasEdit = true] - 是否允许编辑 * @param [options.popup] - 绑定的popup弹窗值,也可以bindPopup方法绑定 * @param [options.popupOptions] - popup弹窗时的配置参数,也支持如pointerEvents等{@link Popup}构造参数 * @param [options.tooltip] - 绑定的tooltip弹窗值,也可以bindTooltip方法绑 * @param [options.tooltipOptions] - tooltip弹窗时的配置参数,也支持如pointerEvents等{@link Tooltip}构造参数 * @param [options.contextmenuItems] - 当矢量数据支持右键菜单时,也可以bindContextMenu方法绑定 * @param [options.model] - 设置附加的 gltf模型 和对应的样式 * @param [options.billboard] - 设置附加的 图标 和对应的样式 * @param [options.circle] - 设置附加的 圆 和对应的样式 * @param [options.path] - 设置附加的 轨迹路线 和对应的样式 * @param [options.id = createGuid()] - 矢量数据id标识 * @param [options.name = ''] - 矢量数据名称 * @param [options.show = true] - 矢量数据是否显示 * @param [options.eventParent] - 指定的事件冒泡对象,默认为所加入的图层对象,false时不冒泡事件 * @param [options.allowDrillPick] - 是否允许鼠标穿透拾取 * @param [options.flyTo] - 加载完成数据后是否自动飞行定位到数据所在的区域。 * @param [options.flyToOptions] - 加载完成数据后是否自动飞行定位到数据所在的区域的对应 {@link BaseGraphic#flyTo}方法参数。 */ declare class PointEntity extends mars3d.graphic.PointEntity { constructor(options: { position: LngLatPoint | Cesium.Cartesian3 | Cesium.PositionProperty | number[] | string; orientation?: Cesium.Property; style: PointEntity_2.StyleOptions | any; attr?: any; availability?: Cesium.TimeIntervalCollection; description?: Cesium.Property | string; viewFrom?: Cesium.Property; parent?: Cesium.Entity; onBeforeCreate?: (...params: any[]) => any; drawShow?: boolean; hasEdit?: boolean; maxCacheCount?: number; forwardExtrapolationType?: Cesium.ExtrapolationType; backwardExtrapolationType?: Cesium.ExtrapolationType; clampToTileset?: boolean; frameRateClamp?: number; objectsToExclude?: any; referenceFrame?: Cesium.ReferenceFrame; numberOfDerivatives?: number; popup?: string | any[] | ((...params: any[]) => any); popupOptions?: Popup.StyleOptions | any; tooltip?: string | any[] | ((...params: any[]) => any); tooltipOptions?: Tooltip.StyleOptions | any; contextmenuItems?: any; id?: string | number; name?: string; show?: boolean; eventParent?: BaseClass | boolean; allowDrillPick?: boolean | ((...params: any[]) => any); flyTo?: boolean; flyToOptions?: any; }); } declare namespace PointEntity_2 { /** * 像素点 支持的样式信息 * @property [pixelSize = 10] - 像素大小 * @property [color = "#3388ff"] - 颜色 * @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0 * @property [outline = false] - 是否边框 * @property [outlineColor = "#ffffff"] - 边框颜色 * @property [outlineOpacity = 0.6] - 边框透明度 * @property [outlineWidth = 2] - 边框宽度 * @property [scaleByDistance = false] - 是否按视距缩放 或 指定用于基于距离缩放点。 * @property [scaleByDistance_far = 1000000] - 上限 * @property [scaleByDistance_farValue = 0.1] - 比例值 * @property [scaleByDistance_near = 1000] - 下限 * @property [scaleByDistance_nearValue = 1] - 比例值 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_far = 10000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [visibleDepth = true] - 是否被遮挡 * @property [disableDepthTestDistance] - 指定从相机到禁用深度测试的距离。 * @property [translucencyByDistance] - 用于基于与相机的距离设置半透明度。 * @property [clampToGround = false] - 是否贴地 * @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。 * @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用 * @property [label] - 支持附带文字的显示 */ type StyleOptions = any | { pixelSize?: number; color?: string | Cesium.Color; opacity?: number; outline?: boolean; outlineColor?: string | Cesium.Color; outlineOpacity?: number; outlineWidth?: number; scaleByDistance?: boolean | Cesium.NearFarScalar; scaleByDistance_far?: number; scaleByDistance_farValue?: number; scaleByDistance_near?: number; scaleByDistance_nearValue?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; visibleDepth?: boolean; disableDepthTestDistance?: number; translucencyByDistance?: Cesium.NearFarScalar; clampToGround?: boolean; heightReference?: Cesium.HeightReference; setHeight?: number | string; addHeight?: number | string; highlight?: PointEntity_2.StyleOptions | any; label?: LabelEntity.StyleOptions | any; }; } /** * 线 Entity矢量数据 * @param options - 参数对象,包括以下: * @param options.positions - 坐标位置 * @param options.style - 样式信息 * @param [options.attr] - 附件的属性信息,可以任意附加属性,导出geojson或json时会自动处理导出。 * @param [options.availability] - 与该对象关联的可用性(如果有的话)。 * @param [options.description] - 指定此实体的HTML描述的字符串属性(infoBox中展示)。 * @param [options.viewFrom] - 观察这个物体时建议的初始偏移量。 * @param [options.parent] - 要与此实体关联的父实体。 * @param [options.onBeforeCreate] - 在 new Cesium.Entity(addattr) 前的回调方法,可以对addattr做额外个性化处理。 * @param [options.minPointNum = 2] - 绘制时,至少需要点的个数 * @param [options.maxPointNum = 9999] - 绘制时,最多允许点的个数 * @param [options.hasDrawDelPoint = true] - 绘制时,是否可以右键删除点 * @param [options.hasEdit = true] - 是否允许编辑 * @param [options.hasMoveEdit = true] - 编辑时,是否可以整体平移 * @param [options.hasHeightEdit = true] - 编辑时,当有diffHeight时,是否可以编辑高度 * @param [options.popup] - 绑定的popup弹窗值,也可以bindPopup方法绑定 * @param [options.popupOptions] - popup弹窗时的配置参数,也支持如pointerEvents等{@link Popup}构造参数 * @param [options.tooltip] - 绑定的tooltip弹窗值,也可以bindTooltip方法绑 * @param [options.tooltipOptions] - tooltip弹窗时的配置参数,也支持如pointerEvents等{@link Tooltip}构造参数 * @param [options.contextmenuItems] - 当矢量数据支持右键菜单时,也可以bindContextMenu方法绑定 * @param [options.id = createGuid()] - 矢量数据id标识 * @param [options.name = ''] - 矢量数据名称 * @param [options.show = true] - 矢量数据是否显示 * @param [options.eventParent] - 指定的事件冒泡对象,默认为所加入的图层对象,false时不冒泡事件 * @param [options.allowDrillPick] - 是否允许鼠标穿透拾取 * @param [options.flyTo] - 加载完成数据后是否自动飞行定位到数据所在的区域。 * @param [options.flyToOptions] - 加载完成数据后是否自动飞行定位到数据所在的区域的对应 {@link BaseGraphic#flyTo}方法参数。 */ declare class PolylineEntity extends mars3d.graphic.PolylineEntity { constructor(options: { positions: LngLatPoint[] | Cesium.Cartesian3[] | any[] | Cesium.PositionProperty | any; style: PolylineEntity_2.StyleOptions | any; attr?: any; availability?: Cesium.TimeIntervalCollection; description?: Cesium.Property | string; viewFrom?: Cesium.Property; parent?: Cesium.Entity; onBeforeCreate?: (...params: any[]) => any; minPointNum?: number; maxPointNum?: number; hasDrawDelPoint?: boolean; hasEdit?: boolean; hasMoveEdit?: boolean; hasHeightEdit?: boolean; popup?: string | any[] | ((...params: any[]) => any); popupOptions?: Popup.StyleOptions | any; tooltip?: string | any[] | ((...params: any[]) => any); tooltipOptions?: Tooltip.StyleOptions | any; contextmenuItems?: any; id?: string | number; name?: string; show?: boolean; eventParent?: BaseClass | boolean; allowDrillPick?: boolean | ((...params: any[]) => any); flyTo?: boolean; flyToOptions?: any; }); } declare namespace PolylineEntity_2 { /** * 线 支持的样式信息 * @property [materialType = "Color"] - 线型 ,可选项:{@link MaterialType} * @property [materialOptions] - materialType对应的{@link MaterialType}中材质参数 * @property [material = Cesium.Color.WHITE] - 指定用于填充的材质,指定material后`materialType`和`materialOptions`将被覆盖。 * @property [width = 4] - 线宽 * @property [color = "#3388ff"] - 颜色 * @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0 * @property [randomColor = false] - 是否随机颜色 * @property [depthFailMaterial] - 指定当折线位于地形之下时用于绘制折线的材质。 * @property [closure = false] - 是否闭合, 在positions是属性机制的回调对象时无效 * @property [outline = false] - 是否衬色 * @property [outlineColor = "#ffffff"] - 衬色颜色 * @property [outlineWidth = 2] - 衬色宽度 * @property [depthFail] - 是否显示遮挡 * @property [depthFailColor] - 遮挡处颜色 * @property [depthFailOpacity] - 遮挡处透明度 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_far = 100000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [arcType = Cesium.ArcType.GEODESIC] - 折线段必须遵循的线的类型。 * @property [granularity = Cesium.Math.RADIANS_PER_DEGREE] - 如果arcType不是arcType.none,则指定每个纬度和经度之间的角距离的数字属性。 * @property [hasShadows = false] - 是否阴影 * @property [shadows = Cesium.ShadowMode.DISABLED] - 指定对象是投射还是接收来自光源的阴影。 * @property [clampToGround = false] - 是否贴地 * @property [classificationType = Cesium.ClassificationType.BOTH] - 指定贴地时的覆盖类型,是只对地形、3dtiles 或 两者同时。 * @property [zIndex = 0] - 层级顺序,指定用于排序地面几何的zIndex。只有当' clampToGround '为真且支持地形上的折线时才会有效果。 * @property [setHeight = 0] - 指定坐标高度值,或数组指定每个点的高度(常用于图层中配置) * @property [addHeight = 0] - 在现有坐标基础上增加的高度值,或数组指定每个点增加的高度(常用于图层中配置) * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用 * @property [label] - 支持附带文字的显示,额外支持:
* // * @property {string} [label.text = "文字"] 文本内容,换行可以用换行符'\n'。 * // * @property {string|LngLatPoint} [label.position] 文字所在位置,默认是矢量对象本身的center属性值。支持配置 'center':围合面的内部中心点坐标,'{xxxx}'配置属性字段, 或者直接指定坐标值。 * // * @property {boolean} [label.showAll] MultiPolygon和MultiLineString时,是否显示所有注记,默认只在最大坐标数的面或线上显示。 */ type StyleOptions = any | { materialType?: string; materialOptions?: any; material?: Cesium.MaterialProperty | BaseMaterialProperty | Cesium.Color; width?: number; color?: string | Cesium.Color; opacity?: number; randomColor?: boolean; depthFailMaterial?: Cesium.MaterialProperty | Cesium.Color; closure?: boolean; outline?: boolean; outlineColor?: string | Cesium.Color; outlineWidth?: number; depthFail?: boolean; depthFailColor?: string; depthFailOpacity?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; arcType?: Cesium.ArcType; granularity?: number; hasShadows?: boolean; shadows?: Cesium.ShadowMode; clampToGround?: boolean; classificationType?: Cesium.ClassificationType; zIndex?: number; setHeight?: number | number[]; addHeight?: number | number[]; highlight?: PolylineEntity_2.StyleOptions | any; label?: LabelEntity.StyleOptions | any | any; }; } declare namespace Popup { /** * Popup对象 支持的配置信息 * @property [html] - Html文本({content}部分,整体展示的DOM由template和html属性共同组成) * @property [template] - 公共部分外框部分html内容,需要加2处: * (1)用于填充html的地方写上{content}标识; * (2)关闭按钮加class样式:closeButton。 * 传空字符串或false时,不用内置模版。 * @property [closeButton = true] - 是否显示关闭按钮 * @property [horizontalOrigin] - 横向方向的定位 * @property [verticalOrigin] - 垂直方向的定位 * @property [offsetX] - 用于非规则div时,横向偏移的px像素值 * @property [offsetY] - 用于非规则div时,垂直方向偏移的px像素值 * @property [className] - 自定义的样式名 * @property [scaleByDistance = false] - 是否按视距缩放 * @property [scaleByDistance_far = 1000000] - 上限 * @property [scaleByDistance_farValue = 0.1] - 比例值 * @property [scaleByDistance_near = 1000] - 下限 * @property [scaleByDistance_nearValue = 1] - 比例值 * @property [distanceDisplayCondition = false] - 是否按视距显示 * @property [distanceDisplayCondition_far = 10000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [clampToGround = false] - 是否贴地 * @property [css_transform_origin = 'left bottom 0'] - DIV的 transform-origin css值 * @property [timeRender] - 是否实时刷新全部HTML,此时需要绑定html需传入回调方法。 * @property [autoCenter] - 当气泡窗口有部分在地图之外时是否自动进行居中 (目前仅俯视时准确定位) * @property [maxWidth = 700] - 弹窗的最大宽度,单位为像素 * @property [minWidth = 50] - 弹窗的最小宽度,单位为像素 * @property [maxHeight = 550] - 如果设置,如果内容超过此高度时,则在弹出窗口中显示滚动条。 * * //以下是构造参数,但也兼容style中传入 * @property [closeOnClick = true] - 是否在单击Map地图时,自动关闭当前弹窗 * @property [autoClose = true] - 在打开弹窗时,是否自动关闭之前的弹窗 * @property [animation = true] - 是否执行打开时的动画效果 * @property [testPoint] - 测试点 的对应样式 ,可以进行用于比较测试div的位置,方便调试CSS。 * @property [pointerEvents = true] - DIV是否可以鼠标交互,为false时可以穿透操作及缩放地图,但无法进行鼠标交互及触发相关事件。 * @property [hasZIndex = false] - 是否自动调整DIV的层级顺序。 * @property [zIndex = "10000000"] - 指定固定的zIndex层级属性(当hasZIndex为true时无效) * @property [depthTest = false] - 是否打开深度判断(true时判断是否在球背面) * @property [hasCache = true] - 是否启用缓存机制,如为true,在视角未变化时不重新渲染。 * @property [checkData] - 在多个Popup时,校验是否相同Popup进行判断关闭 */ type StyleOptions = any | { html?: string; template?: string; closeButton?: boolean; horizontalOrigin?: Cesium.HorizontalOrigin; verticalOrigin?: Cesium.VerticalOrigin; offsetX?: number; offsetY?: number; className?: string; scaleByDistance?: boolean; scaleByDistance_far?: number; scaleByDistance_farValue?: number; scaleByDistance_near?: number; scaleByDistance_nearValue?: number; distanceDisplayCondition?: boolean; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; clampToGround?: boolean; css_transform_origin?: string; timeRender?: boolean; autoCenter?: boolean; maxWidth?: number; minWidth?: number; maxHeight?: number; closeOnClick?: boolean; autoClose?: boolean; animation?: boolean; testPoint?: PointEntity_2.StyleOptions | any; pointerEvents?: boolean; hasZIndex?: boolean; zIndex?: number | string; depthTest?: boolean; hasCache?: boolean; checkData?: (...params: any[]) => any; }; } /** * 卫星综合体 对象类【统一管理卫星模型、轨道、视锥体], * 【需要引入 mars3d-space 插件库】 * @param options - 参数对象,包括以下: * @param [options.tle1] - 卫星两行轨道数(TLE) 的tle1, 示例:'1 39150U 13018A 18309.20646405 .00000034 00000-0 12253-4 0 9993' * @param [options.tle2] - 卫星两行轨道数(TLE) 的tle2, 示例:'2 39150 97.9189 29.2064 0018076 220.9170 139.0692 14.76532215297913' * @param [options.period] - 卫星运行周期(单位:分钟], 未传值时自动在tle2中解析 * @param [options.position] - 当没有tle时,自定义传入动态坐标位置(含时序的点集合) * @param [options.orientation] - 当没有tle时,自定义传入实体方向 * @param [options.attr] - 矢量数据的 属性信息,可以任意附加属性。 * @param [options.model] - 设置是否显示 gltf卫星模型 和对应的样式 * @param [options.label] - 设置是否显示 文本 和对应的样式 * @param [options.billboard] - 设置是否显示 图标点 和对应的样式 * @param [options.point] - 设置是否显示 像素点 和对应的样式 * @param [options.cone] - 设置是否显示 卫星视锥体 和对应的样式 * @param [options.path] - 设置是否显示 卫星轨迹路线 和对应的样式,属性还包含:
* // * @param {boolean} [options.path.closure=false] 是否闭合轨道圆 * @param [options.frameRate = 1] - 多少帧获取一次数据。用于控制效率,如果卡顿就把该数值调大一些。 * @param [options.id = createGuid()] - 矢量数据id标识 * @param [options.name = ''] - 矢量数据名称 * @param [options.show = true] - 矢量数据是否显示 */ declare class Satellite extends mars3d.graphic.Satellite { constructor(options: { tle1?: string; tle2?: string; period?: number; position?: Cesium.SampledPositionProperty; orientation?: Cesium.Property; attr?: Record; model?: ModelEntity.StyleOptions; label?: LabelEntity.StyleOptions; billboard?: BillboardEntity.StyleOptions; point?: PointEntity_2.StyleOptions; cone?: SatelliteSensorStyle.StyleOptions; path?: PolylineEntity_2.StyleOptions; frameRate?: number; id?: string | number; name?: string; show?: boolean; }); } /** * 卫星图标(billboard)配置 * @interface SatelliteBillboardOptions * @param {string} image 图片地址 * @param {number} [scale] 缩放比例 * @param {any} [heightReference] 高度参考 * @param {any} [scaleByDistance] 按距离缩放 * @public */ declare interface SatelliteBillboardOptions { /** 图片地址(URL 或 base64) */ image: string; /** 缩放比例 */ scale?: number; /** 高度参考(依赖 Cesium,类型保持为 any 以兼容运行时) */ heightReference?: any; /** 按距离缩放(依赖 Cesium,类型保持为 any 以兼容运行时) */ scaleByDistance?: any; } /** * 卫星传感器组配置 * @interface SatelliteConeOptions * @param {mars3d.graphic.SatelliteSensor.Type} [sensorType] 传感器类型 * @param {boolean} [rayEllipsoid] 是否射线椭球体 * @param {SatelliteSensorItem[]} list 传感器列表 * @public */ export declare interface SatelliteConeOptions { /** 传感器类型,默认为圆锥形 */ sensorType?: mars3d.graphic.SatelliteSensor.Type; /** 是否射线椭球体,影响传感器显示效果 */ rayEllipsoid?: boolean; /** 传感器列表,可配置多个传感器 */ list: SatelliteSensorItem[]; } export declare type SatelliteGraphic = Satellite; /** * 卫星图形类型别名(core 封装) */ declare type SatelliteGraphic_2 = Satellite; /** * 卫星标签样式配置 * @interface SatelliteLabelOptions * @param {string} [text] 标签文本内容 * @param {string} [font] 字体样式 * @param {string} [fillColor] 填充颜色 * @param {string} [outlineColor] 描边颜色 * @param {number} [outlineWidth] 描边宽度 * @param {{x:number;y:number}} [pixelOffset] 像素偏移量 * @public */ declare interface SatelliteLabelOptions { /** 标签文本内容 */ text?: string; /** 字体样式,例如 '12pt sans-serif' */ font?: string; /** 填充颜色 */ fillColor?: string; /** 描边颜色 */ outlineColor?: string; /** 描边宽度 */ outlineWidth?: number; /** 像素偏移量 */ pixelOffset?: { x: number; y: number; }; } /** * 卫星图层,封装基于 mars3d-space 的卫星加载与轨迹展示 * @class SatelliteLayer * @extends MyLayer * @public * @example * ```typescript * // 创建卫星图层 * const satelliteLayer = new SatelliteLayer(); * * // 添加卫星 * const satellite = satelliteLayer.addSatellite({ * tle: "1 25544U 98067A 12345.67890123 .00012345 00000-0 12345-3 0 1234\n2 25544 51.6400 123.4567 0001234 0.0000 0.0000 15.12345678901234", * showFullTrack: true, * name: "ISS" * }); * ``` */ export declare class SatelliteLayer extends MyLayer { /** * 创建卫星图层实例 * @param {LayerOptions} [options] 图层配置选项 */ constructor(options?: LayerOptions); /** * 解析TLE数据 * @private * @param {string | { tle1: string; tle2: string }} tle TLE数据(字符串或对象) * @returns {{ tle1: string; tle2: string }} 解析后的tle1和tle2 * @throws {Error} 当TLE格式错误时抛出异常 */ private parseTLE; /** * 将简化配置转换为完整的SatelliteOptions * @private * @param {SimpleSatelliteOptions} simpleOptions 简化配置 * @param {string | { tle1: string; tle2: string }} simpleOptions.tle TLE 数据 * @param {boolean} [simpleOptions.showFullTrack] 是否展示全量轨迹 * @param {boolean} [simpleOptions.showBeam] 是否展示波束 * @param {string} [simpleOptions.imageOrModel] 图片或模型地址 * @param {string} [simpleOptions.name] 卫星名称 * @returns {SatelliteOptions} 完整的SatelliteOptions */ private convertSimpleToFullOptions; /** * 添加卫星(仅接收简化配置) * @param {SimpleSatelliteOptions} options 简化卫星配置 * @param {string | { tle1: string; tle2: string }} options.tle TLE 数据 * @param {boolean} [options.showFullTrack] 是否展示全量轨迹 * @param {boolean} [options.showBeam] 是否展示波束 * @param {string} [options.imageOrModel] 图片或模型地址 * @param {string} [options.name] 卫星名称 * @returns {mars3d.graphic.Satellite} 卫星图形实例 * @throws {Error} 当缺少TLE参数时抛出异常 * @example * ```typescript * const satellite = layer.addSatellite({ * tle: "1 25544U 98067A...\n2 25544...", * showFullTrack: true, * name: "ISS" * }); * ``` */ addSatellite(options: SimpleSatelliteOptions): SatelliteGraphic_2; /** * 内部方法:真正创建卫星图形(入参必须为完整配置) * @private * @param {SatelliteOptions} options 完整的卫星配置选项 * @param {string} [options.name] 卫星名称 * @param {string} options.tle1 TLE 第一行 * @param {string} options.tle2 TLE 第二行 * @param {SatelliteModelOptions} [options.model] 模型配置 * @param {SatelliteBillboardOptions} [options.billboard] 图标配置 * @param {SatellitePathOptions} [options.path] 轨迹路径配置 * @param {SatelliteLabelOptions} [options.label] 标签配置 * @param {SatelliteConeOptions} [options.cone] 传感器配置 * @returns {mars3d.graphic.Satellite} 卫星图形实例 * @throws {Error} 当mars3d-space插件未加载或创建失败时抛出异常 */ private _createSatellite; /** * 更新已有卫星的TLE数据 * @param {mars3d.graphic.Satellite} graphic 卫星图形实例 * @param {string} tle1 新的TLE第一行数据 * @param {string} tle2 新的TLE第二行数据 */ updateSatelliteTLE(graphic: SatelliteGraphic_2, tle1: string, tle2: string): void; /** * 开始(播放)卫星姿态/位置更新(如果插件支持) * @param {mars3d.graphic.Satellite} graphic 卫星图形实例 */ start(graphic: SatelliteGraphic_2): void; /** * 暂停卫星动画(如果插件支持) * @param {mars3d.graphic.Satellite} graphic 卫星图形实例 */ pause(graphic: SatelliteGraphic_2): void; /** * 停止卫星动画(如果插件支持) * @param {mars3d.graphic.Satellite} graphic 卫星图形实例 */ stop(graphic: SatelliteGraphic_2): void; /** * 为卫星添加传感器(波束) * @param {mars3d.graphic.Satellite} satelliteGraphic 卫星图形实例 * @param {SatelliteSensorOptions} options 传感器配置选项 * @param {string} [options.name] 传感器名称 * @param {boolean} [options.show] 是否显示 * @param {string} [options.color] 主色(含透明度) * @param {string} [options.outlineColor] 描边颜色 * @param {number} [options.outlineWidth] 描边宽度 * @param {number} [options.halfAngle] 圆锥半角 * @param {number} [options.angle1] 视场张角1 * @param {number} [options.angle2] 视场张角2 * @param {number} [options.near] 近截面距离 * @param {number} [options.far] 远截面距离 * @param {number} [options.pitch] 俯仰角 * @param {number} [options.heading] 偏航角 * @param {number} [options.roll] 翻滚角 * @returns {mars3d.graphic.SatelliteSensor} 传感器图形实例 * @throws {Error} 当未提供卫星图形实例或SatelliteSensor未加载时抛出异常 * @example * ```typescript * const sensor = layer.addSensorToSatellite(satellite, { * name: "主传感器", * color: "rgba(0,255,255,0.25)", * halfAngle: 15 * }); * ``` */ addSensorToSatellite(satelliteGraphic: SatelliteGraphic_2, options: SatelliteSensorOptions): SatelliteSensor; /** * 更新传感器(波束)配置 * @param {mars3d.graphic.SatelliteSensor} sensorGraphic 传感器图形实例 * @param {Partial} options 要更新的传感器配置选项 * @param {string} [options.name] 传感器名称 * @param {boolean} [options.show] 是否显示 * @param {string} [options.color] 主色(含透明度) * @param {string} [options.outlineColor] 描边颜色 * @param {number} [options.outlineWidth] 描边宽度 * @param {number} [options.halfAngle] 圆锥半角 * @param {number} [options.angle1] 视场张角1 * @param {number} [options.angle2] 视场张角2 * @param {number} [options.near] 近截面距离 * @param {number} [options.far] 远截面距离 * @param {number} [options.pitch] 俯仰角 * @param {number} [options.heading] 偏航角 * @param {number} [options.roll] 翻滚角 */ updateSensor(sensorGraphic: SatelliteSensorGraphic_2, options: Partial): void; /** * 便捷方法:创建卫星图形(同时支持完整与简化配置) * @static * @param {SimpleSatelliteOptions} options 卫星配置选项 * @param {string | { tle1: string; tle2: string }} options.tle TLE 数据 * @param {boolean} [options.showFullTrack] 是否展示全量轨迹 * @param {boolean} [options.showBeam] 是否展示波束 * @param {string} [options.imageOrModel] 图片或模型地址 * @param {string} [options.name] 卫星名称 * @returns {mars3d.graphic.Satellite} 卫星图形实例 * @example * ```typescript * // 使用静态方法创建卫星 * const satellite = SatelliteLayer.createSatellite({ * tle: "1 25544U 98067A...\n2 25544...", * showFullTrack: true, * name: "ISS" * }); * ``` */ static createSatellite(options: SimpleSatelliteOptions): SatelliteGraphic_2; } export declare type SatelliteLayerInstance = SatelliteLayer; /** * 卫星模型配置 * @interface SatelliteModelOptions * @param {string} url 模型URL * @param {number} [scale] 模型缩放比例 * @param {number} [minimumPixelSize] 最小像素大小 * @public */ export declare interface SatelliteModelOptions { /** 模型URL,支持 .glb、.gltf、.obj 等格式 */ url: string; /** 模型缩放比例,默认为1 */ scale?: number; /** 最小像素大小,防止模型过小不可见 */ minimumPixelSize?: number; } /** * 卫星配置项(基于 mars3d-space 插件的卫星图形) * @interface SatelliteOptions * @param {string} [name] 卫星名称 * @param {string} tle1 TLE 第一行数据 * @param {string} tle2 TLE 第二行数据 * @param {SatelliteModelOptions} [model] 3D模型配置 * @param {SatellitePathOptions} [path] 轨迹路径配置 * @param {SatelliteConeOptions} [cone] 传感器(波束)配置 * @param {boolean} [showLabel] 是否显示标签 * @param {SatelliteLabelOptions} [label] 标签样式配置 * @param {SatelliteBillboardOptions} [billboard] 图标配置 * @param {SatelliteTimeOptions} [time] 时间控制配置 * @param {string} [modelUrl] 已废弃:使用 model.url * @param {number} [modelScale] 已废弃:使用 model.scale * @param {boolean} [showTrack] 已废弃:使用 path.show * @param {number} [trackWidth] 已废弃:使用 path.width * @param {string} [trackColor] 已废弃:使用 path.color * @extends LayerOptions * @public * @example * ```typescript * const satelliteOptions: SatelliteOptions = { * name: "ISS", * tle1: "1 25544U 98067A 12345.67890123 .00012345 00000-0 12345-3 0 1234", * tle2: "2 25544 51.6400 123.4567 0001234 0.0000 0.0000 15.12345678901234", * model: { * url: "path/to/satellite.glb", * scale: 1.5 * }, * path: { * show: true, * color: "#00ffff", * width: 2 * } * }; * ``` */ export declare interface SatelliteOptions extends LayerOptions { /** 卫星名称,用于标识和标签显示 */ name?: string; /** TLE 第一行数据 */ tle1: string; /** TLE 第二行数据 */ tle2: string; /** 3D模型配置 */ model?: SatelliteModelOptions; /** 轨迹路径配置 */ path?: SatellitePathOptions; /** 传感器(波束)配置 */ cone?: SatelliteConeOptions; /** 是否显示标签,默认true */ showLabel?: boolean; /** 标签样式配置 */ label?: SatelliteLabelOptions; /** 图标配置(当未提供 model 时使用) */ billboard?: SatelliteBillboardOptions; /** 时间控制配置 */ time?: SatelliteTimeOptions; /** @deprecated 使用 model.url 替代 */ modelUrl?: string; /** @deprecated 使用 model.scale 替代 */ modelScale?: number; /** @deprecated 使用 path.show 替代 */ showTrack?: boolean; /** @deprecated 使用 path.width 替代 */ trackWidth?: number; /** @deprecated 使用 path.color 替代 */ trackColor?: string; } /** * 卫星路径配置 * @interface SatellitePathOptions * @param {string} [color] 轨迹颜色 * @param {number} [width] 轨迹宽度 * @param {boolean} [show] 是否显示轨迹 * @param {number} [leadTime] 前导时间(秒) * @param {number} [trailTime] 尾随时间(秒) * @public */ export declare interface SatellitePathOptions { /** 轨迹颜色,支持十六进制、RGB、RGBA格式 */ color?: string; /** 轨迹宽度,单位像素 */ width?: number; /** 是否显示轨迹 */ show?: boolean; /** 前导时间,单位秒,显示未来轨迹 */ leadTime?: number; /** 尾随时间,单位秒,显示历史轨迹 */ trailTime?: number; } /** * 卫星视锥综合体(圆锥或四凌锥),该对象暂不支持鼠标交互和拾取, * 【需要引入 mars3d-space 插件库】 * @param [options] - 参数对象,包括以下: * @param options.position - 坐标位置 * @param [options.orientation] - 指定实体方向的属性。 * @param options.style - 样式信息 * @param [options.attr] - 附件的属性信息,可以任意附加属性,导出geojson或json时会自动处理导出。 * @param [options.lookAt] - 椎体方向追踪的目标(椎体方向跟随变化,位置不变) * @param [options.fixedFrameTransform] - 参考系 * @param [options.reverse = false] - 是否反转朝向 * @param [options.id = createGuid()] - 矢量数据id标识 * @param [options.name = ''] - 矢量数据名称 * @param [options.show = true] - 矢量数据是否显示 */ declare class SatelliteSensor extends mars3d.graphic.SatelliteSensor { constructor(options: { position?: LngLatPoint | Cesium.Cartesian3 | number[]; orientation?: Cesium.Property; style: SatelliteSensorStyle.StyleOptions; attr?: Record; lookAt?: Cesium.Cartesian3 | Cesium.PositionProperty; fixedFrameTransform?: Cesium.Transforms.LocalFrameToFixedFrame; reverse?: boolean; followGraphic?: object; targetGraphic?: object; id?: string | number; name?: string; show?: boolean; }); } export declare type SatelliteSensorGraphic = SatelliteSensor; /** * 卫星传感器图形类型别名(core 封装) */ declare type SatelliteSensorGraphic_2 = SatelliteSensor; /** * 卫星传感器配置项 * @interface SatelliteSensorItem * @param {string} name 传感器名称 * @param {number} angle1 视场张角1(度) * @param {number} angle2 视场张角2(度) * @param {number} pitchOffset 安装偏转角(度) * @param {string} color 传感器颜色 * @param {number} [opacity] 透明度,范围 0-1 * @param {boolean} [show] 是否显示传感器 * @public */ export declare interface SatelliteSensorItem { /** 传感器名称 */ name: string; /** 视场张角1(度) */ angle1: number; /** 视场张角2(度) */ angle2: number; /** 安装偏转角(度) */ pitchOffset: number; /** 传感器颜色 */ color: string; /** 透明度,范围 0-1 */ opacity?: number; /** 是否显示传感器 */ show?: boolean; } /** * 卫星波束(传感器)配置 * @interface SatelliteSensorOptions * @public * @example * ```typescript * const sensorOptions: SatelliteSensorOptions = { * name: "主传感器", * color: "rgba(0,255,255,0.25)", * halfAngle: 15, * near: 0, * far: 1000000 * }; * ``` */ export declare interface SatelliteSensorOptions { /** 传感器名称 */ name?: string; /** 是否显示传感器 */ show?: boolean; /** 主色(含透明度),支持RGBA格式 */ color?: string; /** 描边颜色 */ outlineColor?: string; /** 描边宽度 */ outlineWidth?: number; /** 圆锥半角(度),或使用 angle1/angle2 定义扇形 */ halfAngle?: number; /** 视场张角1(度) */ angle1?: number; /** 视场张角2(度) */ angle2?: number; /** 近截面距离(米) */ near?: number; /** 远截面距离(米) */ far?: number; /** 俯仰角(度) */ pitch?: number; /** 偏航角(度) */ heading?: number; /** 翻滚角(度) */ roll?: number; } declare namespace SatelliteSensorStyle { /** * 卫星视锥体(圆锥或四凌锥) 支持的样式信息 * @property [sensorType = SatelliteSensor.Type.Rect] - 视锥类型 * @property [angle1 = 5] - 圆锥的角度或者四棱锥的第一个角度,半场角度,取值范围 0.1-89.9 * @property [angle2 = 5] - 四棱锥的第二个角度,半场角度,取值范围 0.1-89.9 * @property [angle = 5] - 夹角1和夹角2相同时,可以传入angle一个属性 * @property [length] - 指定的半径长度(米),默认与地球进行相交运算 * @property [heading = 0] - 方向角 (角度值 0-360) * @property [pitch = 0] - 俯仰角(角度值 0-360) * @property [roll = 0] - 翻滚角(角度值 0-360) * @property [color = Cesium.Color.YELLOW] - 颜色 * @property [opacity = 1.0] - 透明度, 取值范围:0.0-1.0 * @property [outline = false] - 是否显示边线 * @property [outlineColor = color] - 边线颜色 * @property [rayEllipsoid = false] - 是否求交地球计算 * @property [flat = true] - 当true时,在片段着色器中使用平面着色,不考虑光照。 * @property [faceForward = false] - 当true时,片段着色器根据需要翻转表面的法线,以确保法线面向查看器以避免黑点。 * @property [translucent = true] - 当true时,几何图形将显示为半透明,因此{@link Cesium.PerInstanceColorAppearance#renderState}将启用alpha混合。 * @property [closed = false] - 当true时,几何图形将被关闭,因此{@link Cesium.PerInstanceColorAppearance#renderState}启用了背面剔除。 */ type StyleOptions = { sensorType?: SatelliteSensorStyle.Type; angle1?: number; angle2?: number; angle?: number; length?: number; heading?: number; pitch?: number; roll?: number; color?: string | Cesium.Color; opacity?: number; outline?: boolean; outlineWidth?: number; outlineColor?: string | Cesium.Color; near?: number; far?: number; rayEllipsoid?: boolean; flat?: boolean; faceForward?: boolean; translucent?: boolean; closed?: boolean; }; /** * 视锥体类型 */ enum Type { Conic = 0, Rect = 1 } } /** * 卫星时间控制配置 * @interface SatelliteTimeOptions * @param {number} [duration] 动画/轨迹持续天数 * @param {any} [clockRange] 时钟范围 * @public */ declare interface SatelliteTimeOptions { /** 动画/轨迹持续天数 */ duration?: number; /** 时钟范围(依赖 Cesium,类型保持为 any 以兼容运行时) */ clockRange?: any; } /** * 简化的卫星配置接口(用户友好的参数) * @interface SimpleSatelliteOptions * @param options {@link SatelliteOptions} 卫星配置选项 * @param {string | { tle1: string; tle2: string }} options.tle TLE数据(可以是字符串或包含tle1、tle2的对象) * @param {boolean} options.showFullTrack 是否展示全量轨迹,默认false * @param {boolean} options.showBeam 是否展示波束(传感器),默认false * @param {string} options.imageOrModel 卫星图片或模型地址,支持图片URL或3D模型文件 * @param {string} options.name 卫星名称,用于标识和标签显示 * @param {any} [options.otherOptions] 其他可选的 SatelliteOptions 参数(已排除 tle1、tle2) * @public * @example * ```typescript * const satellite = new SatelliteLayer().addSatellite({ * tle: "1 25544U 98067A 12345.67890123 .00012345 00000-0 12345-3 0 1234\n2 25544 51.6400 123.4567 0001234 0.0000 0.0000 15.12345678901234", * showFullTrack: true, * showBeam: true, * name: "ISS" * }); * ``` */ export declare interface SimpleSatelliteOptions extends Omit, 'tle1' | 'tle2'> { /** TLE 数据(可以是字符串或包含tle1、tle2的对象) */ tle: string | { tle1: string; tle2: string; }; /** 是否展示全量轨迹,默认false */ showFullTrack?: boolean; /** 是否展示波束(传感器),默认false */ showBeam?: boolean; /** 卫星图片或模型地址,支持图片URL或3D模型文件 */ imageOrModel?: string; /** 卫星名称,用于标识和标签显示 */ name?: string; } declare namespace Tooltip { /** * Tooltip对象 支持的配置信息 * @property [html] - Html文本({content}部分,整体展示的DOM由template和html属性共同组成) * @property [template] - 公共部分外框部分html内容,需要加:用于填充html的地方写上{content}标识。 传空字符串或false时,不用内置模版。 * @property [direction = "top"] - 显示的方向,可选值: top、bottom、center、right、left * @property [horizontalOrigin] - 横向方向的定位 * @property [verticalOrigin] - 垂直方向的定位 * @property [offsetX] - 用于非规则div时,横向偏移的px像素值 * @property [offsetY] - 用于非规则div时,垂直方向偏移的px像素值 * @property [className] - 自定义的样式名 * @property [scaleByDistance = false] - 是否按视距缩放 * @property [scaleByDistance_far = 1000000] - 上限 * @property [scaleByDistance_farValue = 0.1] - 比例值 * @property [scaleByDistance_near = 1000] - 下限 * @property [scaleByDistance_nearValue = 1] - 比例值 * @property [distanceDisplayCondition = false] - 是否按视距显示 * @property [distanceDisplayCondition_far = 10000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [clampToGround = false] - 是否贴地 * @property [css_transform_origin = 'left bottom 0'] - DIV的 transform-origin css值 * @property [timeRender] - 是否实时刷新全部HTML,此时需要绑定html需传入回调方法。 * * //以下是构造参数,但也兼容style中传入 * @property [testPoint] - 测试点 的对应样式 ,可以进行用于比较测试div的位置,方便调试CSS。 * @property [pointerEvents = true] - DIV是否可以鼠标交互,为false时可以穿透操作及缩放地图,但无法进行鼠标交互及触发相关事件。 * @property [hasZIndex = false] - 是否自动调整DIV的层级顺序。 * @property [zIndex = "10000000"] - 指定固定的zIndex层级属性(当hasZIndex为true时无效) * @property [depthTest = false] - 是否打开深度判断(true时判断是否在球背面) * @property [hasCache = true] - 是否启用缓存机制,如为true,在视角未变化时不重新渲染。 */ type StyleOptions = any | { html?: string; template?: string | boolean; direction?: string; horizontalOrigin?: Cesium.HorizontalOrigin; verticalOrigin?: Cesium.VerticalOrigin; offsetX?: number; offsetY?: number; className?: string; scaleByDistance?: boolean; scaleByDistance_far?: number; scaleByDistance_farValue?: number; scaleByDistance_near?: number; scaleByDistance_nearValue?: number; distanceDisplayCondition?: boolean; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; clampToGround?: boolean; css_transform_origin?: string; timeRender?: boolean; testPoint?: PointEntity_2.StyleOptions | any; pointerEvents?: boolean; hasZIndex?: boolean; zIndex?: number | string; depthTest?: boolean; hasCache?: boolean; }; } /** * 工具函数分组类型。 * 精简后的工具函数,使用Cesium和Turf提供更精确的计算 * @public */ export declare interface UtilityFunctions { convertCoordinates: { lngLatToCartesian: (lng: number, lat: number, alt?: number) => any; cartesianToLngLat: (cartesian: any) => { lng: number; lat: number; alt: number; }; lngLatArrayToCartesian: (coordinates: number[]) => any[]; lngLatAltArrayToCartesian: (coordinates: number[]) => any[]; wgs84ToGcj02: (lng: number, lat: number) => [number, number]; gcj02ToWgs84: (lng: number, lat: number) => [number, number]; wgs84ToBd09: (lng: number, lat: number) => [number, number]; bd09ToWgs84: (lng: number, lat: number) => [number, number]; gcj02ToBd09: (lng: number, lat: number) => [number, number]; bd09ToGcj02: (lng: number, lat: number) => [number, number]; isOutOfChina: (lng: number, lat: number) => boolean; }; calculateDistance: { getDistance: (point1: CameraPosition, point2: CameraPosition) => number; getBearing: (point1: CameraPosition, point2: CameraPosition) => number; }; geometry: { isPointInPolygon: (point: CameraPosition, polygon: CameraPosition[]) => boolean; isPointInPolygonEntity: (point: CameraPosition, polygonEntity: any) => boolean; getPolygonArea: (polygon: CameraPosition[]) => number; getPolygonCenter: (polygon: CameraPosition[]) => CameraPosition; }; color: { hexToRgba: (hex: string, alpha?: number) => string; randomColor: () => string; }; } /** * 工具函数集合(精简版) * * 包含Cesium原生转换方法、中国坐标系转换、距离计算、几何计算、颜色处理等工具函数 * * @namespace utils * @property {Object} convertCoordinates - 坐标转换工具(Cesium原生 + 中国特有) * @property {Object} calculateDistance - 距离计算工具(使用Cesium) * @property {Object} geometry - 几何计算工具(使用Turf) * @property {Object} color - 颜色处理工具(精简版) * * @example * import { utils } from './utils'; * * // Cesium原生坐标转换 * const cartesian = utils.convertCoordinates.lngLatToCartesian(116.3974, 39.9093, 100); * const lngLat = utils.convertCoordinates.cartesianToLngLat(cartesian); * * // 中国坐标系转换 * const [gcjLng, gcjLat] = utils.convertCoordinates.wgs84ToGcj02(116.3974, 39.9093); * * // 距离计算(使用Cesium) * const distance = utils.calculateDistance.getDistance(point1, point2); * * // 几何计算(使用Turf) * const inside = utils.geometry.isPointInPolygon(point, polygon); * * // 颜色处理 * const rgba = utils.color.hexToRgba("#FF0000", 0.5); */ export declare const utils: UtilityFunctions; export { } export declare namespace LabelEntity { /** * 文本点 支持的样式信息 * @property [text = "文字"] - 文本内容,换行可以用换行符'\n'。 * @property [scale = 1.0] - 指定缩放比例。 * @property [horizontalOrigin] - 横向方向的定位 * @property [verticalOrigin] - 垂直方向的定位 * @property [font_family = "楷体"] - 字体 ,可选项:微软雅黑,宋体,楷体,隶书,黑体 等 * @property [font_size = 30] - 字体大小 * @property [font_weight = "normal"] - 是否加粗 ,可选项:bold (解释:是),normal (解释:否), * @property [font_style = "normal"] - 是否斜体 ,可选项:italic (解释:是),normal (解释:否), * @property [font = '30px normal normal 楷体'] - 上叙4个属性的一次性指定CSS字体的属性。 * @property [fill = true] - 是否填充 * @property [color = "#ffffff"] - 文本颜色 * @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0 * @property [outline = false] - 是否衬色 * @property [outlineColor = "#000000"] - 衬色颜色 * @property [outlineOpacity = 0.6] - 衬色透明度 * @property [outlineWidth = 2.0] - 衬色宽度 * @property [background = false] - 是否背景 * @property [backgroundColor = "#000000"] - 背景颜色 * @property [backgroundOpacity = 0.5] - 背景透明度 * @property [backgroundPadding = new Cesium.Cartesian2(7, 5)] - 背景内边距,指定文字与填充边界内容之间的空间(以像素为单位)。 * @property [hasPixelOffset = false] - 是否存在偏移量 * @property [pixelOffsetX = 0] - 横向偏移像素 * @property [pixelOffsetY = 0] - 纵向偏移像素 * @property [pixelOffset = Cartesian2.ZERO] - A {@link Cartesian2} Property specifying the pixel offset. * @property [pixelOffsetScaleByDistance] - A {@link NearFarScalar} Property used to set pixelOffset based on distance from the camera. * @property [eyeOffset = Cartesian3.ZERO] - A {@link Cartesian3} Property specifying the eye offset. * @property [scaleByDistance = false] - 是否按视距缩放 或 设定基于与相机的距离设置比例。 * @property [scaleByDistance_far = 1000000] - 上限 * @property [scaleByDistance_farValue = 0.1] - 比例值 * @property [scaleByDistance_near = 1000] - 下限 * @property [scaleByDistance_nearValue = 1] - 比例值 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_far = 100000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [clampToGround = false] - 是否贴地 * @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。 * @property [visibleDepth = true] - 是否被遮挡 * @property [disableDepthTestDistance] - 指定从相机到禁用深度测试的距离。 * @property [translucencyByDistance] - 用于基于与相机的距离设置半透明度。 * @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 * @property [templateEmptyStr = ""] - 当text存在模版字符串配置时,空值时显示的内容 */ type StyleOptions = any | { text?: string; scale?: number; horizontalOrigin?: Cesium.HorizontalOrigin; verticalOrigin?: Cesium.VerticalOrigin; font_family?: string; font_size?: number; font_weight?: string; font_style?: string; font?: string; fill?: boolean; color?: string | Cesium.Color; opacity?: number; outline?: boolean; outlineColor?: string | Cesium.Color; outlineOpacity?: number; outlineWidth?: number; background?: boolean; backgroundColor?: string | Cesium.Color; backgroundOpacity?: number; backgroundPadding?: number | Cesium.Cartesian2; hasPixelOffset?: boolean; pixelOffsetX?: number; pixelOffsetY?: number; pixelOffset?: Cesium.Cartesian2 | number[]; pixelOffsetScaleByDistance?: Cesium.NearFarScalar; eyeOffset?: Cesium.Cartesian3; scaleByDistance?: boolean | Cesium.NearFarScalar; scaleByDistance_far?: number; scaleByDistance_farValue?: number; scaleByDistance_near?: number; scaleByDistance_nearValue?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; clampToGround?: boolean; heightReference?: Cesium.HeightReference; visibleDepth?: boolean; disableDepthTestDistance?: number; translucencyByDistance?: Cesium.NearFarScalar; setHeight?: number | string; addHeight?: number | string; templateEmptyStr?: string; }; } export declare namespace BillboardEntity { /** * 图标点 支持的样式信息 * @property [image] - 用于矢量对象的 图像、URI或Canvas * @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0 * @property [scale = 1] - 图像大小的比例 * @property [rotation = 0] - 旋转角度(弧度值),正北为0,逆时针旋转 * @property [rotationDegree = 0] - 旋转角度(度数值,0-360度),与rotation二选一 * @property [horizontalOrigin] - 横向方向的定位 * @property [verticalOrigin] - 垂直方向的定位 * @property [width] - 指定广告牌的宽度(以像素为单位),覆盖图片本身大小。 * @property [height] - 指定广告牌的高度(以像素为单位),覆盖图片本身大小。 * @property [hasPixelOffset = false] - 是否存在偏移量 * @property [pixelOffsetX = 0] - 横向偏移像素 * @property [pixelOffsetY = 0] - 纵向偏移像素 * @property [pixelOffset = Cartesian2.ZERO] - 指定像素偏移量。 * @property [scaleByDistance = false] - 是否按视距缩放 或 设置基于与相机的距离缩放点 * @property [scaleByDistance_far = 1000000] - 上限 * @property [scaleByDistance_farValue = 0.1] - 比例值 * @property [scaleByDistance_near = 1000] - 下限 * @property [scaleByDistance_nearValue = 1] - 比例值 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定该广告牌将显示在与摄像机的多大距离 * @property [distanceDisplayCondition_far = 10000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [clampToGround = false] - 是否贴地 * @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。 * @property [visibleDepth = true] - 是否被遮挡 * @property [disableDepthTestDistance] - 指定从相机到禁用深度测试的距离。 * @property [color = Color.WHITE] - 附加的颜色 * @property [eyeOffset = Cartesian3.ZERO] - 眼偏移量 * @property [alignedAxis = Cartesian3.ZERO] - 指定单位旋转向量轴。 * @property [sizeInMeters] - 指定该广告牌的大小是否应该以米来度量。 * @property [translucencyByDistance] - 用于基于与相机的距离设置半透明度。 * @property [pixelOffsetScaleByDistance] - 用于基于与相机的距离设置pixelOffset。 * @property [imageSubRegion] - 定义用于广告牌的图像的子区域,而不是从左下角开始以像素为单位的整个图像。 * @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用 * @property [label] - 支持附带文字的显示 */ type StyleOptions = any | { image?: string | HTMLCanvasElement; opacity?: number; scale?: number; rotation?: number; rotationDegree?: number; horizontalOrigin?: Cesium.HorizontalOrigin; verticalOrigin?: Cesium.VerticalOrigin; width?: number; height?: number; hasPixelOffset?: boolean; pixelOffsetX?: number; pixelOffsetY?: number; pixelOffset?: Cesium.Cartesian2 | number[]; scaleByDistance?: boolean | Cesium.NearFarScalar; scaleByDistance_far?: number; scaleByDistance_farValue?: number; scaleByDistance_near?: number; scaleByDistance_nearValue?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; clampToGround?: boolean; heightReference?: Cesium.HeightReference; visibleDepth?: boolean; disableDepthTestDistance?: number; color?: Cesium.Color; eyeOffset?: Cesium.Cartesian3; alignedAxis?: Cesium.Cartesian3; sizeInMeters?: boolean; translucencyByDistance?: Cesium.NearFarScalar; pixelOffsetScaleByDistance?: Cesium.NearFarScalar; imageSubRegion?: Cesium.BoundingRectangle; setHeight?: number | string; addHeight?: number | string; highlight?: any; label?: LabelEntity.StyleOptions | any; }; } export declare namespace PolylineEntity { /** * 线 支持的样式信息 * @property [materialType = "Color"] - 线型 ,可选项:{@link MaterialType} * @property [materialOptions] - materialType对应的{@link MaterialType}中材质参数 * @property [material = Cesium.Color.WHITE] - 指定用于填充的材质,指定material后`materialType`和`materialOptions`将被覆盖。 * @property [width = 4] - 线宽 * @property [color = "#3388ff"] - 颜色 * @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0 * @property [randomColor = false] - 是否随机颜色 * @property [depthFailMaterial] - 指定当折线位于地形之下时用于绘制折线的材质。 * @property [closure = false] - 是否闭合, 在positions是属性机制的回调对象时无效 * @property [outline = false] - 是否衬色 * @property [outlineColor = "#ffffff"] - 衬色颜色 * @property [outlineWidth = 2] - 衬色宽度 * @property [depthFail] - 是否显示遮挡 * @property [depthFailColor] - 遮挡处颜色 * @property [depthFailOpacity] - 遮挡处透明度 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_far = 100000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [arcType = Cesium.ArcType.GEODESIC] - 折线段必须遵循的线的类型。 * @property [granularity = Cesium.Math.RADIANS_PER_DEGREE] - 如果arcType不是arcType.none,则指定每个纬度和经度之间的角距离的数字属性。 * @property [hasShadows = false] - 是否阴影 * @property [shadows = Cesium.ShadowMode.DISABLED] - 指定对象是投射还是接收来自光源的阴影。 * @property [clampToGround = false] - 是否贴地 * @property [classificationType = Cesium.ClassificationType.BOTH] - 指定贴地时的覆盖类型,是只对地形、3dtiles 或 两者同时。 * @property [zIndex = 0] - 层级顺序,指定用于排序地面几何的zIndex。只有当' clampToGround '为真且支持地形上的折线时才会有效果。 * @property [setHeight = 0] - 指定坐标高度值,或数组指定每个点的高度(常用于图层中配置) * @property [addHeight = 0] - 在现有坐标基础上增加的高度值,或数组指定每个点增加的高度(常用于图层中配置) * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用 * @property [label] - 支持附带文字的显示,额外支持:
* // * @property {string} [label.text = "文字"] 文本内容,换行可以用换行符'\n'。 * // * @property {string|LngLatPoint} [label.position] 文字所在位置,默认是矢量对象本身的center属性值。支持配置 'center':围合面的内部中心点坐标,'{xxxx}'配置属性字段, 或者直接指定坐标值。 * // * @property {boolean} [label.showAll] MultiPolygon和MultiLineString时,是否显示所有注记,默认只在最大坐标数的面或线上显示。 */ type StyleOptions = any | { materialType?: string; materialOptions?: any; material?: Cesium.MaterialProperty | BaseMaterialProperty | Cesium.Color; width?: number; color?: string | Cesium.Color; opacity?: number; randomColor?: boolean; depthFailMaterial?: Cesium.MaterialProperty | Cesium.Color; closure?: boolean; outline?: boolean; outlineColor?: string | Cesium.Color; outlineWidth?: number; depthFail?: boolean; depthFailColor?: string; depthFailOpacity?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; arcType?: Cesium.ArcType; granularity?: number; hasShadows?: boolean; shadows?: Cesium.ShadowMode; clampToGround?: boolean; classificationType?: Cesium.ClassificationType; zIndex?: number; setHeight?: number | number[]; addHeight?: number | number[]; highlight?: PolylineEntity.StyleOptions | any; label?: LabelEntity.StyleOptions | any | any; }; } export declare namespace CircleEntity { /** * 圆、圆柱 支持的样式信息 * @property [radius = 100] - 半径 * @property [height = 0] - 高程,圆相对于椭球面的高度。 * @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。 * @property [diffHeight = 100] - 高度差(圆柱本身的高度),与extrudedHeight二选一。 * @property [extrudedHeight] - 指定椭圆的挤压面相对于椭球面的高度。 * @property [extrudedHeightReference = Cesium.HeightReference.NONE] - 指定挤压高度相对于什么的属性。 * @property [fill = true] - 是否填充 * @property [materialType = "Color"] - 填充类型 ,可选项:{@link MaterialType} * @property [materialOptions] - materialType对应的{@link MaterialType}中材质参数 * @property [material = Cesium.Color.WHITE] - 指定用于填充的材质,指定material后`materialType`和`material材质参数`将被覆盖。 * @property [color = "#3388ff"] - 填充颜色 * @property [opacity = 1.0] - 透明度, 取值范围:0.0-1.0 * @property [outline = false] - 是否边框 * @property [outlineWidth = 1] - 边框宽度 * @property [outlineColor = "#ffffff"] - 边框颜色 * @property [outlineOpacity = 0.6] - 边框透明度 * @property [outlineStyle] - 边框的完整自定义样式,会覆盖outlineWidth、outlineColor等参数。 * @property [rotation = 0] - 旋转角度(弧度值),正北为0,逆时针旋转 * @property [rotationDegree = 0] - 旋转角度(度数值,0-360度),与rotation二选一 * @property [stRotation = 0] - 椭圆纹理的角度(弧度值),正北为0,逆时针旋转 * @property [stRotationDegree = 0] - 椭圆纹理的角度(度数值,0-360度),与stRotation二选一 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_far = 100000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [granularity = Cesium.Math.RADIANS_PER_DEGREE] - 指定椭圆上各点之间的角距离。 * @property [numberOfVerticalLines = 16] - 指定沿轮廓的周长绘制的垂直线的数量。 * @property [hasShadows = false] - 是否投射阴影 * @property [shadows = Cesium.ShadowMode.DISABLED] - 指定椭圆是投射还是接收来自光源的阴影。 * @property [clampToGround = false] - 是否贴地 * @property [classificationType = Cesium.ClassificationType.BOTH] - 指定贴地时的覆盖类型,是只对地形、3dtiles 或 两者同时。 * @property [zIndex = 0] - 层级顺序。用于排序地面几何。只有在椭圆为常量且没有指定height或exturdedHeight时才有效果。 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用 * @property [label] - 支持附带文字的显示 */ type StyleOptions = any | { radius?: number; height?: number; heightReference?: Cesium.HeightReference; diffHeight?: number; extrudedHeight?: number; extrudedHeightReference?: Cesium.HeightReference; fill?: boolean; materialType?: string; materialOptions?: any; material?: Cesium.MaterialProperty | BaseMaterialProperty | Cesium.Color; color?: string | Cesium.Color; opacity?: number; outline?: boolean; outlineWidth?: number; outlineColor?: string | Cesium.Color; outlineOpacity?: number; outlineStyle?: PolylineEntity.StyleOptions | any; rotation?: number | Cesium.Property; rotationDegree?: number; stRotation?: number | Cesium.Property; stRotationDegree?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; granularity?: number; numberOfVerticalLines?: number; hasShadows?: boolean; shadows?: Cesium.ShadowMode; clampToGround?: boolean; classificationType?: Cesium.ClassificationType; zIndex?: number; addHeight?: number | string; highlight?: CircleEntity.StyleOptions | any; label?: LabelEntity.StyleOptions | any; }; } export declare namespace CylinderEntity { /** * 圆锥 支持的样式信息 * @property [topRadius = 0] - 顶部半径,指定圆柱体顶部的半径,当为0时即为圆锥。 * @property [bottomRadius = 100] - 底部半径,指定圆柱体底部半径。 * @property [length = 100] - 高度,柱面长度。 * @property [heading = 0] - 方向角 (度数值,0-360度) * @property [pitch = 0] - 俯仰角(度数值,0-360度) * @property [roll = 0] - 翻滚角(度数值,0-360度) * @property [fill = true] - 是否填充 * @property [materialType = "Color"] - 填充类型 ,可选项:{@link MaterialType} * @property [materialOptions] - materialType对应的{@link MaterialType}中材质参数 * @property [material = Cesium.Color.WHITE] - 指定用于填充的材质,指定material后`materialType`和`materialOptions`将被覆盖。 * @property [color = "#00FF00"] - 填充颜色 * @property [opacity = 1.0] - 透明度, 取值范围:0.0-1.0 * @property [outline = false] - 是否边框 * @property [outlineWidth = 1] - 边框宽度,outlineWidth只适用于非Windows系统,如Android、iOS、Linux和OS X。这是由于WebGL是如何在Windows上的所有三个主要浏览器引擎中实现所限制的,目前只能显示1px。 * @property [outlineColor = "#ffffff"] - 边框颜色 * @property [outlineOpacity = 0.6] - 边框透明度 * @property [numberOfVerticalLines = 16] - 指定沿轮廓的周长绘制的垂直线的数量。 * @property [slices = 128] - 圆柱体周长周围的边数。 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_far = 100000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [hasShadows = false] - 是否阴影 * @property [shadows = Cesium.ShadowMode.DISABLED] - 指定圆柱是投射还是接收来自光源的阴影。 * @property [heightReference = Cesium.HeightReference.NONE] - 指定从实体位置到它的相对高度。 * @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用 * @property [label] - 支持附带文字的显示 */ type StyleOptions = any | { topRadius?: number; bottomRadius?: number; length?: number; heading?: number; pitch?: number; roll?: number; fill?: boolean; materialType?: string; materialOptions?: any; material?: Cesium.MaterialProperty | BaseMaterialProperty | Cesium.Color; color?: string | Cesium.Color; opacity?: number; outline?: boolean; outlineWidth?: number; outlineColor?: string | Cesium.Color; outlineOpacity?: number; numberOfVerticalLines?: number; slices?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; hasShadows?: boolean; shadows?: Cesium.ShadowMode; heightReference?: Cesium.HeightReference; setHeight?: number | string; addHeight?: number | string; highlight?: any; label?: LabelEntity.StyleOptions | any; }; } export declare namespace ConeTrack { /** * 圆锥追踪体 支持的样式信息 * @property [angle] - 圆锥追踪体张角(角度值,取值范围 0.01-89.99) * @property [bottomRadius = 100] - 不指定angle时,也可以直接指定圆锥底部半径(单位:米) * @property [length = 100] - 圆锥追踪体长度值(单位:米),没有指定targetPosition时有效 * @property [heading = 0] - 方向角 (度数值,0-360度),没有指定targetPosition时有效 * @property [pitch = 0] - 俯仰角(度数值,0-360度),没有指定targetPosition时有效 * @property [roll = 0] - 翻滚角(度数值,0-360度),没有指定targetPosition时有效 * @property [fill = true] - 是否填充 * @property [materialType = "Color"] - 填充类型 ,可选项:{@link MaterialType} * @property [materialOptions] - materialType对应的{@link MaterialType}中材质参数 * @property [material = Cesium.Color.WHITE] - 指定用于填充的材质,指定material后`materialType`和`materialOptions`将被覆盖。 * @property [color = "#00FF00"] - 填充颜色 * @property [opacity = 1.0] - 透明度, 取值范围:0.0-1.0 * @property [outline = false] - 是否边框 * @property [outlineWidth = 1] - 边框宽度,outlineWidth只适用于非Windows系统,如Android、iOS、Linux和OS X。这是由于WebGL是如何在Windows上的所有三个主要浏览器引擎中实现所限制的,目前只能显示1px。 * @property [outlineColor = "#ffffff"] - 边框颜色 * @property [outlineOpacity = 0.6] - 边框透明度 * @property [numberOfVerticalLines = 16] - 指定沿轮廓的周长绘制的垂直线的数量。 * @property [slices = 128] - 圆柱体周长周围的边数。 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_far = 100000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [hasShadows = false] - 是否阴影 * @property [shadows = Cesium.ShadowMode.DISABLED] - 指定圆柱是投射还是接收来自光源的阴影。 * @property [heightReference = Cesium.HeightReference.NONE] - 指定从实体位置到它的相对高度。 * @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用 * @property [label] - 支持附带文字的显示 */ type StyleOptions = any | { angle?: number; bottomRadius?: number; length?: number; heading?: number; pitch?: number; roll?: number; fill?: boolean; materialType?: string; materialOptions?: any; material?: Cesium.MaterialProperty | BaseMaterialProperty | Cesium.Color; color?: string | Cesium.Color; opacity?: number; outline?: boolean; outlineWidth?: number; outlineColor?: string | Cesium.Color; outlineOpacity?: number; numberOfVerticalLines?: number; slices?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; hasShadows?: boolean; shadows?: Cesium.ShadowMode; heightReference?: Cesium.HeightReference; setHeight?: number | string; addHeight?: number | string; highlight?: CylinderEntity.StyleOptions | any; label?: LabelEntity.StyleOptions | any; }; } export declare namespace PointEntity { /** * 像素点 支持的样式信息 * @property [pixelSize = 10] - 像素大小 * @property [color = "#3388ff"] - 颜色 * @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0 * @property [outline = false] - 是否边框 * @property [outlineColor = "#ffffff"] - 边框颜色 * @property [outlineOpacity = 0.6] - 边框透明度 * @property [outlineWidth = 2] - 边框宽度 * @property [scaleByDistance = false] - 是否按视距缩放 或 指定用于基于距离缩放点。 * @property [scaleByDistance_far = 1000000] - 上限 * @property [scaleByDistance_farValue = 0.1] - 比例值 * @property [scaleByDistance_near = 1000] - 下限 * @property [scaleByDistance_nearValue = 1] - 比例值 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_far = 10000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [visibleDepth = true] - 是否被遮挡 * @property [disableDepthTestDistance] - 指定从相机到禁用深度测试的距离。 * @property [translucencyByDistance] - 用于基于与相机的距离设置半透明度。 * @property [clampToGround = false] - 是否贴地 * @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。 * @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用 * @property [label] - 支持附带文字的显示 */ type StyleOptions = any | { pixelSize?: number; color?: string | Cesium.Color; opacity?: number; outline?: boolean; outlineColor?: string | Cesium.Color; outlineOpacity?: number; outlineWidth?: number; scaleByDistance?: boolean | Cesium.NearFarScalar; scaleByDistance_far?: number; scaleByDistance_farValue?: number; scaleByDistance_near?: number; scaleByDistance_nearValue?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; visibleDepth?: boolean; disableDepthTestDistance?: number; translucencyByDistance?: Cesium.NearFarScalar; clampToGround?: boolean; heightReference?: Cesium.HeightReference; setHeight?: number | string; addHeight?: number | string; highlight?: PointEntity.StyleOptions | any; label?: LabelEntity.StyleOptions | any; }; } export declare namespace ModelEntity { /** * gltf小模型 支持的样式信息 * @property [url] - glTF模型的URI的字符串或资源属性。 * @property [scale = 1] - 比例 * @property [heading = 0] - 方向角 (度数值,0-360度),优先级高于orientation * @property [pitch = 0] - 俯仰角(度数值,0-360度),优先级高于orientation * @property [roll = 0] - 翻滚角(度数值,0-360度),优先级高于orientation * @property [mergeOrientation = false] - 当存在orientation时(如addDynamicPosition等),设置为true时,是在orientation基础的方式值上加上设置是heading、pitch、roll值,比如用于设置模型不是标准的方向时的纠偏处理 * @property [radius] - 编辑时,半径圆圈的半径,默认自动 * @property [minimumPixelSize = 0.0] - 指定模型的近似最小像素大小,而不考虑缩放。 * @property [maximumScale] - 模型的最大比例尺寸。minimumPixelSize的上限。 * @property [fill = false] - 是否填充,指定与模型渲染颜色混合 * @property [color = "#3388ff"] - 颜色 * @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0 * @property [colorBlendMode = ColorBlendMode.HIGHLIGHT] - 指定颜色如何与模型混合。 * @property [colorBlendAmount = 0.5] - 当colorBlendMode为MIX时指定颜色强度的数字属性。0.0的值表示模型渲染的颜色,1.0的值表示纯色,任何介于两者之间的值表示两者的混合。 * @property [silhouette = false] - 是否轮廓 * @property [silhouetteColor = "#ff0000"] - 轮廓颜色 * @property [silhouetteSize = 2] - 轮廓宽度 * @property [silhouetteAlpha = 0.8] - 轮廓透明度 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [distanceDisplayCondition_far = 100000] - 最大距离 * @property [distanceDisplayPoint] - 当视角距离超过一定距离后(distanceDisplayCondition_far定义的) 后显示为 像素点 对象的样式,仅在distanceDisplayCondition设置时有效。 * @property [distanceDisplayBillboard] - 当视角距离超过一定距离后(distanceDisplayCondition_far定义的) 后显示为 图标 对象的样式,仅在distanceDisplayCondition设置时有效。 * @property [hasShadows = true] - 是否阴影 * @property [shadows = ShadowMode.ENABLED] - 指定模型是投射还是接收来自光源的阴影。 * @property [clampToGround = false] - 是否贴地 * @property [heightReference = Cesium.HeightReference.NONE] - 指定高度相对于什么的属性。 * @property [incrementallyLoadTextures = true] - 确定模型加载后纹理是否会继续流进来。 * @property [runAnimations = true] - 指定模型中指定的glTF动画是否应该启动。 * @property [clampAnimations = true] - 指定在没有关键帧的情况下,glTF动画是否应该保持最后一个姿势。 * @property [lightColor] - 在为模型着色时指定光的颜色的属性。当undefined场景的浅色被使用代替。 * @property [nodeTransformations] - 一个对象,其中键是节点的名称,值是{@link TranslationRotationScale}属性,描述要应用到该节点的转换。该转换是在节点的现有转换之后(如glTF中指定的那样)应用的,并且不会替换节点的现有转换。 * @property [articulations] - An object, where keys are composed of an articulation name, a single space, and a stage name, and the values are numeric properties. * @property [clippingPlanes] - 用于裁剪模型的Plane平面集合 * @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用 * @property [label] - 支持附带文字的显示 */ type StyleOptions = any | { url?: string | Cesium.Resource; scale?: number; heading?: number; pitch?: number; roll?: number; mergeOrientation?: boolean; radius?: number; minimumPixelSize?: number; maximumScale?: number; fill?: boolean; color?: string | Cesium.Color; opacity?: number; colorBlendMode?: Cesium.ColorBlendMode; colorBlendAmount?: number; silhouette?: boolean; silhouetteColor?: string | Cesium.Color; silhouetteSize?: number; silhouetteAlpha?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_near?: number; distanceDisplayCondition_far?: number; distanceDisplayPoint?: PointEntity.StyleOptions | any; distanceDisplayBillboard?: BillboardEntity.StyleOptions | any; hasShadows?: boolean; shadows?: Cesium.ShadowMode; clampToGround?: boolean; heightReference?: Cesium.HeightReference; incrementallyLoadTextures?: boolean; runAnimations?: boolean; clampAnimations?: boolean; lightColor?: Cesium.Color; nodeTransformations?: Cesium.PropertyBag | { [key: string]: Cesium.TranslationRotationScale; }; articulations?: Cesium.PropertyBag | { [key: string]: number; }; clippingPlanes?: Cesium.ClippingPlaneCollection; setHeight?: number | string; addHeight?: number | string; highlight?: ModelEntity.StyleOptions | any; label?: LabelEntity.StyleOptions | any; }; } export declare namespace PathEntity { /** * path路径 支持的样式信息 * @property [width = 1.0] - 以像素为单位指定宽度的数字属性。 * @property [color = "#FFFF00"] - 颜色 * @property [opacity = 1.0] - 透明度,取值范围:0.0-1.0 * @property [material = Cesium.Color.WHITE] - 指定用于填充的材质,指定material后fillType和color属性将被覆盖。 * @property [leadTime] - 提前显示轨迹的时间长度(单位:秒),比如不显示前方路线,可以设置为0 * @property [trailTime] - 保留历史轨迹的时间长度(单位:秒) * @property [resolution = 60] - 指定在对位置进行采样时步进的最大秒数。 * @property [distanceDisplayCondition = false] - 是否按视距显示 或 指定此框将显示在与摄像机的多大距离。 * @property [distanceDisplayCondition_far = 100000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [setHeight] - 指定坐标高度值(常用于图层中配置),也支持字符串模版配置 * @property [addHeight] - 在现有坐标基础上增加的高度值(常用于图层中配置),也支持字符串模版配置 */ type StyleOptions = any | { width?: number; color?: string | Cesium.Color; opacity?: number; material?: Cesium.MaterialProperty | BaseMaterialProperty | Cesium.Color; leadTime?: number; trailTime?: number; resolution?: number; distanceDisplayCondition?: boolean | Cesium.DistanceDisplayCondition; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; setHeight?: number | string; addHeight?: number | string; }; } export declare namespace Popup { /** * Popup对象 支持的配置信息 * @property [html] - Html文本({content}部分,整体展示的DOM由template和html属性共同组成) * @property [template] - 公共部分外框部分html内容,需要加2处: * (1)用于填充html的地方写上{content}标识; * (2)关闭按钮加class样式:closeButton。 * 传空字符串或false时,不用内置模版。 * @property [closeButton = true] - 是否显示关闭按钮 * @property [horizontalOrigin] - 横向方向的定位 * @property [verticalOrigin] - 垂直方向的定位 * @property [offsetX] - 用于非规则div时,横向偏移的px像素值 * @property [offsetY] - 用于非规则div时,垂直方向偏移的px像素值 * @property [className] - 自定义的样式名 * @property [scaleByDistance = false] - 是否按视距缩放 * @property [scaleByDistance_far = 1000000] - 上限 * @property [scaleByDistance_farValue = 0.1] - 比例值 * @property [scaleByDistance_near = 1000] - 下限 * @property [scaleByDistance_nearValue = 1] - 比例值 * @property [distanceDisplayCondition = false] - 是否按视距显示 * @property [distanceDisplayCondition_far = 10000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [clampToGround = false] - 是否贴地 * @property [css_transform_origin = 'left bottom 0'] - DIV的 transform-origin css值 * @property [timeRender] - 是否实时刷新全部HTML,此时需要绑定html需传入回调方法。 * @property [autoCenter] - 当气泡窗口有部分在地图之外时是否自动进行居中 (目前仅俯视时准确定位) * @property [maxWidth = 700] - 弹窗的最大宽度,单位为像素 * @property [minWidth = 50] - 弹窗的最小宽度,单位为像素 * @property [maxHeight = 550] - 如果设置,如果内容超过此高度时,则在弹出窗口中显示滚动条。 * * //以下是构造参数,但也兼容style中传入 * @property [closeOnClick = true] - 是否在单击Map地图时,自动关闭当前弹窗 * @property [autoClose = true] - 在打开弹窗时,是否自动关闭之前的弹窗 * @property [animation = true] - 是否执行打开时的动画效果 * @property [testPoint] - 测试点 的对应样式 ,可以进行用于比较测试div的位置,方便调试CSS。 * @property [pointerEvents = true] - DIV是否可以鼠标交互,为false时可以穿透操作及缩放地图,但无法进行鼠标交互及触发相关事件。 * @property [hasZIndex = false] - 是否自动调整DIV的层级顺序。 * @property [zIndex = "10000000"] - 指定固定的zIndex层级属性(当hasZIndex为true时无效) * @property [depthTest = false] - 是否打开深度判断(true时判断是否在球背面) * @property [hasCache = true] - 是否启用缓存机制,如为true,在视角未变化时不重新渲染。 * @property [checkData] - 在多个Popup时,校验是否相同Popup进行判断关闭 */ type StyleOptions = any | { html?: string; template?: string; closeButton?: boolean; horizontalOrigin?: Cesium.HorizontalOrigin; verticalOrigin?: Cesium.VerticalOrigin; offsetX?: number; offsetY?: number; className?: string; scaleByDistance?: boolean; scaleByDistance_far?: number; scaleByDistance_farValue?: number; scaleByDistance_near?: number; scaleByDistance_nearValue?: number; distanceDisplayCondition?: boolean; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; clampToGround?: boolean; css_transform_origin?: string; timeRender?: boolean; autoCenter?: boolean; maxWidth?: number; minWidth?: number; maxHeight?: number; closeOnClick?: boolean; autoClose?: boolean; animation?: boolean; testPoint?: PointEntity.StyleOptions | any; pointerEvents?: boolean; hasZIndex?: boolean; zIndex?: number | string; depthTest?: boolean; hasCache?: boolean; checkData?: (...params: any[]) => any; }; } export declare namespace Tooltip { /** * Tooltip对象 支持的配置信息 * @property [html] - Html文本({content}部分,整体展示的DOM由template和html属性共同组成) * @property [template] - 公共部分外框部分html内容,需要加:用于填充html的地方写上{content}标识。 传空字符串或false时,不用内置模版。 * @property [direction = "top"] - 显示的方向,可选值: top、bottom、center、right、left * @property [horizontalOrigin] - 横向方向的定位 * @property [verticalOrigin] - 垂直方向的定位 * @property [offsetX] - 用于非规则div时,横向偏移的px像素值 * @property [offsetY] - 用于非规则div时,垂直方向偏移的px像素值 * @property [className] - 自定义的样式名 * @property [scaleByDistance = false] - 是否按视距缩放 * @property [scaleByDistance_far = 1000000] - 上限 * @property [scaleByDistance_farValue = 0.1] - 比例值 * @property [scaleByDistance_near = 1000] - 下限 * @property [scaleByDistance_nearValue = 1] - 比例值 * @property [distanceDisplayCondition = false] - 是否按视距显示 * @property [distanceDisplayCondition_far = 10000] - 最大距离 * @property [distanceDisplayCondition_near = 0] - 最小距离 * @property [clampToGround = false] - 是否贴地 * @property [css_transform_origin = 'left bottom 0'] - DIV的 transform-origin css值 * @property [timeRender] - 是否实时刷新全部HTML,此时需要绑定html需传入回调方法。 * * //以下是构造参数,但也兼容style中传入 * @property [testPoint] - 测试点 的对应样式 ,可以进行用于比较测试div的位置,方便调试CSS。 * @property [pointerEvents = true] - DIV是否可以鼠标交互,为false时可以穿透操作及缩放地图,但无法进行鼠标交互及触发相关事件。 * @property [hasZIndex = false] - 是否自动调整DIV的层级顺序。 * @property [zIndex = "10000000"] - 指定固定的zIndex层级属性(当hasZIndex为true时无效) * @property [depthTest = false] - 是否打开深度判断(true时判断是否在球背面) * @property [hasCache = true] - 是否启用缓存机制,如为true,在视角未变化时不重新渲染。 */ type StyleOptions = any | { html?: string; template?: string | boolean; direction?: string; horizontalOrigin?: Cesium.HorizontalOrigin; verticalOrigin?: Cesium.VerticalOrigin; offsetX?: number; offsetY?: number; className?: string; scaleByDistance?: boolean; scaleByDistance_far?: number; scaleByDistance_farValue?: number; scaleByDistance_near?: number; scaleByDistance_nearValue?: number; distanceDisplayCondition?: boolean; distanceDisplayCondition_far?: number; distanceDisplayCondition_near?: number; clampToGround?: boolean; css_transform_origin?: string; timeRender?: boolean; testPoint?: PointEntity.StyleOptions | any; pointerEvents?: boolean; hasZIndex?: boolean; zIndex?: number | string; depthTest?: boolean; hasCache?: boolean; }; } export declare namespace SatelliteSensorStyle { /** * 卫星视锥体(圆锥或四凌锥) 支持的样式信息 * @property [sensorType = SatelliteSensor.Type.Rect] - 视锥类型 * @property [angle1 = 5] - 圆锥的角度或者四棱锥的第一个角度,半场角度,取值范围 0.1-89.9 * @property [angle2 = 5] - 四棱锥的第二个角度,半场角度,取值范围 0.1-89.9 * @property [angle = 5] - 夹角1和夹角2相同时,可以传入angle一个属性 * @property [length] - 指定的半径长度(米),默认与地球进行相交运算 * @property [heading = 0] - 方向角 (角度值 0-360) * @property [pitch = 0] - 俯仰角(角度值 0-360) * @property [roll = 0] - 翻滚角(角度值 0-360) * @property [color = Cesium.Color.YELLOW] - 颜色 * @property [opacity = 1.0] - 透明度, 取值范围:0.0-1.0 * @property [outline = false] - 是否显示边线 * @property [outlineColor = color] - 边线颜色 * @property [rayEllipsoid = false] - 是否求交地球计算 * @property [flat = true] - 当true时,在片段着色器中使用平面着色,不考虑光照。 * @property [faceForward = false] - 当true时,片段着色器根据需要翻转表面的法线,以确保法线面向查看器以避免黑点。 * @property [translucent = true] - 当true时,几何图形将显示为半透明,因此{@link Cesium.PerInstanceColorAppearance#renderState}将启用alpha混合。 * @property [closed = false] - 当true时,几何图形将被关闭,因此{@link Cesium.PerInstanceColorAppearance#renderState}启用了背面剔除。 */ type StyleOptions = { sensorType?: SatelliteSensorStyle.Type; angle1?: number; angle2?: number; angle?: number; length?: number; heading?: number; pitch?: number; roll?: number; color?: string | Cesium.Color; opacity?: number; outline?: boolean; outlineWidth?: number; outlineColor?: string | Cesium.Color; near?: number; far?: number; rayEllipsoid?: boolean; flat?: boolean; faceForward?: boolean; translucent?: boolean; closed?: boolean; }; /** * 视锥体类型 */ enum Type { Conic = 0, Rect = 1 } }