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.
65 lines (64 loc) • 1.82 kB
TypeScript
import Overlay from "../Overlay";
import Position from "../../position/Position";
import { T_Position } from "../../common/type";
/**
* 线
* @noInheritDoc
* @example
* ```ts
* let polyline = new BC.Polyline('120,20;120,30')
* polyline.setStyle({
* width: 10,
* })
* ```
*/
declare class Polyline extends Overlay {
private _positions;
/**
*
* @param positions 坐标串
*/
constructor(positions: string | T_Position[]);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
get center(): Position;
get distance(): number;
_mountedHook(): void;
/**
* Sets Text
* @param text
* @param textStyle
* @returns {Polyline}
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @returns {Polyline}
* @example
* ```json
* // 样式参数(可选)
* {
* "width": 1, //线宽
* "material": BC.Color.WHITE, //材质
* "clampToGround": false, //是否贴地
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* "zIndex": 0 //层级
* }
* ```
*/
setStyle(style: any): this;
/**
* Entity 转换为 Overlay
* @param entity
* @returns {Polyline}
*/
static fromEntity(entity: Cesium.Entity): Polyline | undefined;
}
export default Polyline;