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.

79 lines (78 loc) 2.4 kB
import Overlay from "../Overlay"; import { T_Position } from "../../common/type"; /** * 管道 * @noInheritDoc * @example * ```ts * function computeCircle(radius) { * var positions = [] * for (var i = 0; i < 360; i++) { * var radians = BC.Math.toRadians(i) * positions.push({ * x: radius * Math.cos(radians), * y: radius * Math.sin(radians), * }) * } * return positions * } * * let polylineVolume = new BC.PolylineVolume( * '-90.0,32.0,0.0;-90.0,36.0,100000.0;-94.0,36.0,0.0;', * computeCircle(60000) * ) * ``` */ declare class PolylineVolume extends Overlay { private _positions; private _shape; /** * * @param positions 坐标串 * @param shape 形状 */ constructor(positions: string | T_Position[], shape: Cesium.Property | Array<Cesium.Cartesian2>); get type(): any; set positions(positions: string | T_Position[]); get positions(): string | T_Position[]; set shape(shape: Cesium.Property | Array<Cesium.Cartesian2>); get shape(): Cesium.Property | Array<Cesium.Cartesian2>; _mountedHook(): void; /** * * @param text * @param textStyle */ setLabel(text: string, textStyle: any): this; /** * 设置风格 * @param style * @returns {PolylineVolume} * @example * ```json * // 样式参数(可选) * { * "cornerType": 0, //转角类别,0:圆角、1:直角、2:斜角 * "fill": true, //是否用提供的材料填充多边形。 * "material": BC.Color.WHITE, //材质 * "outline": false, //是否显示边框 * "outlineColor": BC.Color.BLACK, //边框颜色 * "outlineWidth": 0, //边框宽度 * "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受 * "distanceDisplayCondition": { * "near": 0, //最近距离 * "far": Number.MAX_VALUE //最远距离 * } //根据距离设置可见 * } * ``` */ setStyle(style: any): this; /** * Parses from entity * @param entity * @param shape * @returns {PolylineVolume|any} */ static fromEntity(entity: Cesium.Entity, shape: Cesium.Property | Array<Cesium.Cartesian2>): PolylineVolume | undefined; } export default PolylineVolume;