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.

52 lines (51 loc) 1.5 kB
import Overlay from "../Overlay"; import Position from "../../position/Position"; import { T_Position } from "../../common/type"; /** * 线图元 * @noInheritDoc * @example * ```ts * let polyline = new BC.PolylinePrimitive('120,20;120,30') * polyline.setStyle({ * width: 10, * }) * ``` */ declare class PolylinePrimitive extends Overlay { private _positions; /** * * @param positions 坐标串 */ constructor(positions: T_Position[]); get type(): any; set positions(positions: T_Position[]); get positions(): T_Position[]; get center(): Position; get distance(): number; _mountedHook(): void; /** * 设置风格 * @param style * @returns {PolylinePrimitive} * @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; } export default PolylinePrimitive;