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.

142 lines (141 loc) 3.71 kB
import { TrackEvent } from "../event"; import Position from "../position/Position"; declare const DEF_OPTS: { clampToGround: boolean; clampToTileset: boolean; interpolationType: string; interpolationDegree: number; endDelayTime: number; headingOffset: number; }; /** * 轨迹 * @example * ```ts * let tc = new BC.TrackController(viewer) * let track = new BC.Track('120.121,32.1213;121.132,32.1213', 20) * tc.addTrack(track) * ``` */ declare class Track { private _id; private _bid; private _positions; private _duration; private _callback; private _options; private _controller; private _sampledPosition; private _velocityOrientation; private _viewed; private _delegate; private _pathPositions; private _path; private _positionIndex; private _timeLine; private _startTime; private _endTime; private _trackEvent; private _state; /** * @param positions 坐标串 * @param duration 间隔时间,单位:秒 * @param callback 每一个点位到达回调函数,参数有:position(位置信息),isLast(是否为最后的点位) * @param options 配置参数 */ constructor(positions: string | Array<Position | number | string | Object>, duration: number, callback: (position: Position, isLast: boolean) => void, options: typeof DEF_OPTS); /** * 唯一标识 */ get trackId(): string; /** * 业务唯一标识 */ set id(id: any); get id(): any; /** * 坐标串 */ set positions(postions: any); get positions(): any; /** * 间隔时间,单位:秒 */ set duration(duration: any); get duration(): any; /** * 开始时间,设置后会独立于控制器的开始时间 */ set startTime(startTime: any); get startTime(): any; set viewed(viewed: boolean); get viewed(): boolean; get trackEvent(): TrackEvent; /** * 状态 */ get state(): string; /** * add to entities * @param controller */ private _onAdd; /** * remove from entities */ private _onRemove; /** * * @param viewer * @param viewOption */ private _onPostRender; /** * Sets camera position * @param viewer * @param viewOption */ private _setCameraView; /** * * @param params * @returns {boolean} */ private _resetTimeLine; /** * 添加点位 * @param position 点位 * @param duration 间隔,单位:秒 * @returns 当前轨迹 */ addPosition(position: Position | string, duration: number): this; /** * 设置模型 * @param modelPath 模型路径 * @param style 样式,详情参考:{@link overlay.Model} * @returns 当前轨迹 */ setModel(modelPath: string, style: Object): this; /** * 设置图标 * @param icon 图标路径 * @param style 样式,参考:{@link overlay.Billboard} * @returns 当前轨迹 */ setBillboard(icon: string, style: Object): this; /** * 设置文本 * @param text 文本 * @param style 样式,参考:{@link overlay.Label} * @returns 当前轨迹 */ setLabel(text: string, style: Object): this; /** * 设置路径 * @param visible 是否可见 * @param style 样式,参考:{@link overlay.Polyline} * @returns 当前轨迹 */ setPath(visible: boolean, style?: Object): this; } export default Track;