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.
83 lines (82 loc) • 2.04 kB
TypeScript
import Overlay from "../Overlay";
import { T_Position } from "../../common/type";
import { Layer } from "../../layer";
/**
* DivIcon
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let divIcon = new BC.DivIcon(position, '<div></div>')
* ```
*/
declare class DivIcon extends Overlay {
private _position;
/**
*
* @param position 坐标
* @param content 内容
*/
constructor(position: T_Position, content: any);
get type(): any;
set show(show: boolean);
get show(): boolean;
set position(position: T_Position);
get position(): T_Position;
set content(content: any);
get content(): any;
/**
* Updates style
* @param windowCoord
* @param distance
* @param isFront
* @private
*/
_updateStyle(windowCoord: any, distance: any, isFront: any): void;
/**
*
* @param layer
* @private
*/
_onAdd(layer: Layer): void;
/**
*
* @private
*/
_onRemove(): void;
/**
* Sets text
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @example
* ```json
* // 样式参数(可选)
* {
* "className": "test", //样式名
* "scaleByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置比例
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* } //根据距离设置可见
* }
* ```
*/
setStyle(style: any): this;
/**
* entity转换为overlay
* @param entity
* @param content
*/
static fromEntity(entity: Cesium.Entity, content: any): any;
}
export default DivIcon;