UNPKG

bcgis-type

Version:

The SDK is based on Cesium for secondary development of 2, 3D all-in-one WebGis application framework, the framework optimizes the use of Cesium and add some additional features, designed for developers to quickly build WebGis applications.

68 lines (67 loc) 2.19 kB
import Overlay from "../Overlay"; import { T_Position } from "../../common/type"; /** * 圆 * @noInheritDoc * @example * ```ts * let position = new BC.Position(120, 20) * let point = new BC.Point(position) * point.setStyle({ * pixelSize: 10, * }) * ``` */ declare class Point extends Overlay { private _position; /** * * @param position 坐标 */ constructor(position: T_Position); get type(): any; set position(position: T_Position); get position(): T_Position; _mountedHook(): void; /** * Set style * @param style * @returns {Point} * @example * ```json * // 样式参数(可选) * { * "pixelSize": 1, //像素大小 * "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。 * "color": BC.Color.WHITE, //颜色 * "outlineColor": BC.Color.WHITE, //边框颜色 * "outlineWidth": 0, //边框大小, * "scaleByDistance": { * "near": 0, //最近距离 * "nearValue": 0, //最近距离值 * "far": 1, //最远距离值 * "farValue": 0 //最远距离值 * }, //根据距离设置比例 * "translucencyByDistance": { * "near": 0, //最近距离 * "nearValue": 0, //最近距离值 * "far": 1, //最远距离值 * "farValue": 0 //最远距离值 * }, //根据距离设置透明度 * "distanceDisplayCondition": { * "near": 0, //最近距离 * "far": Number.MAX_VALUE //最远距离 * }, //根据距离设置可见 * "disableDepthTestDistance": 0 // 深度检测距离,用于防止剪切地形,设置为零时,将始终应用深度测试。设置为Number.POSITIVE_INFINITY时,永远不会应用深度测试。 * } * ``` */ setStyle(style: any): this; /** * Entity 转换为 Overlay * @param entity * @returns {Point} */ static fromEntity(entity: Cesium.Entity): Point | undefined; } export default Point;