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.
93 lines (92 loc) • 2.69 kB
TypeScript
import Overlay from "../Overlay";
import { T_Position } from "../../common/type";
/**
* 图标
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let billboard = new BC.Billboard(position, "*.png")
* billboard.size = [20, 20]
* ```
*/
declare class Billboard extends Overlay {
/**
* @hidden
*/
private _position;
/**
* @hidden
*/
private _icon;
/**
* @hidden
*/
private _size;
/**
*
* @param position 位置
* @param icon 图标
*/
constructor(position: T_Position, icon: Cesium.Property | string | HTMLCanvasElement);
get type(): any;
set position(position: T_Position);
/**
* 坐标位置
*/
get position(): T_Position;
set icon(icon: string | HTMLCanvasElement | Cesium.Property);
/**
* 图标
*/
get icon(): string | HTMLCanvasElement | Cesium.Property;
set size(size: number[]);
/**
* 尺寸
*/
get size(): number[];
/**
* @hidden
*/
_mountedHook(): void;
/**
*
* @param style
* @returns {Billboard}
* @example
* ```json
* // 样式参数(可选)
* {
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "scale": 1, //比例
* "pixelOffset": { "x": 0, "y": 0 }, //偏移像素
* "rotation": 0, //旋转角度
* "translucencyByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置透明度
* "scaleByDistance": {
* "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 {Billboard}
*/
static fromEntity(entity: Cesium.Entity): Billboard | undefined;
}
export default Billboard;