25661 lines
659 KiB
TypeScript
25661 lines
659 KiB
TypeScript
declare module GV { class Subject<T> {}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 空降选址分析
|
||
* @see <a href='../../../examples/gallery/editor.html#airborneAnalysis'>空降选址分析</a>
|
||
*/
|
||
class AirborneAnalysis {
|
||
private viewer;
|
||
private polygon;
|
||
private labelArr;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* polygonColor 面颜色
|
||
* textColor 文字颜色
|
||
* depthTest 地球深度检测
|
||
*/
|
||
open(data: any, polygonColor?: string, textColor?: string, depthTest?: boolean): void;
|
||
/**
|
||
* 关闭分析
|
||
*/
|
||
close(): void;
|
||
/**
|
||
* 获取空降选址个数
|
||
*/
|
||
getAirBorne(): number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 用于在特定情况下进行分析的工具
|
||
*/
|
||
class Analysis {
|
||
private _viewer;
|
||
private _layerSplit;
|
||
private _viewshedAnalyze;
|
||
private _heightAnalyze;
|
||
private _groundClip;
|
||
private _floodAnalysis;
|
||
private _profileAnalysis;
|
||
private _measureDistance;
|
||
private _measureArea;
|
||
private _hideAnalysis;
|
||
private _intervisibilityAnalysis;
|
||
private _pathAnalysis;
|
||
private _polygonVisiableAnalysis;
|
||
private _slopeAnalysis;
|
||
private _skylineAnalyze;
|
||
private _bufferAnalysis;
|
||
private _headFloodAnalysis;
|
||
private _shadowAnalysis;
|
||
private _watchHouseAnalysis;
|
||
private _contourAnalysis;
|
||
private _directAimAnalysis;
|
||
private _inDirectAimAnalysis;
|
||
private _airborneAnalysis;
|
||
private _groundClippingAnalysis;
|
||
private _nuclearProtectionAnalysis;
|
||
private _morphologicAnalysis;
|
||
constructor(viewer: GeoCanvas);
|
||
private _init;
|
||
/**
|
||
* 卷帘工具
|
||
*/
|
||
readonly layerSplit: LayerSplit;
|
||
/**
|
||
* @see <a href='../../../examples/gallery/editor.html#intervisibilityAnalysis'>通视分析工具</a>
|
||
*/
|
||
readonly viewshedAnalyze: ViewshedAnalyze;
|
||
/**
|
||
* 通视分析工具
|
||
*/
|
||
readonly heightAnalyze: HeightAnalyze;
|
||
readonly groundClip: GroundClipping;
|
||
/**
|
||
* 淹没分析
|
||
*/
|
||
readonly floodAnalysis: FloodAnalysis;
|
||
/**
|
||
* 剖面分析
|
||
*/
|
||
readonly profileAnalysis: ProfileAnalysis;
|
||
/**
|
||
* 测距
|
||
*/
|
||
readonly measureDistance: MeasureDistance;
|
||
/**
|
||
* 测面
|
||
*/
|
||
readonly measureArea: MeasureArea;
|
||
/**
|
||
* 遮蔽分析
|
||
*/
|
||
readonly hideAnalysis: HideAnalysis;
|
||
/**
|
||
* 点点通视
|
||
*/
|
||
readonly intervisibilityAnalysis: IntervisibilityAnalysis;
|
||
/**
|
||
* 路径分析
|
||
*/
|
||
readonly pathAnalysis: PathAnalysis;
|
||
/**
|
||
* 点面通视
|
||
*/
|
||
readonly polygonVisiableAnalysis: PolygonVisiableAnalysis;
|
||
/**
|
||
* 坡度坡向分析
|
||
*/
|
||
readonly slopeAnalysis: SlopeAnalysis;
|
||
/**
|
||
* 天际线分析
|
||
*/
|
||
readonly SkylineAnalyze: SkylineAnalyze;
|
||
/**
|
||
* 缓冲区分析
|
||
*/
|
||
readonly bufferAnalysis: BufferAnalysis;
|
||
/**
|
||
* 淹没分析(服务端计算)
|
||
*/
|
||
readonly headFloodAnalysis: HeadFloodAnalysis;
|
||
/**
|
||
* 阴影分析
|
||
*/
|
||
readonly shadowAnalysis: ShadowAnalysis;
|
||
/**
|
||
* 观察所分析
|
||
* @readonly
|
||
*/
|
||
readonly watchHouseAnalysis: WatchHouseAnalysis;
|
||
/**
|
||
* 等高线提取
|
||
*/
|
||
readonly contourAnalysis: ContourAnalysis;
|
||
/**
|
||
* 直瞄分析
|
||
*/
|
||
readonly directAimAnalysis: DirectAimAnalysis;
|
||
/**
|
||
* 间瞄分析
|
||
*/
|
||
readonly inDirectAimAnalysis: InDirectAimAnalysis;
|
||
/**
|
||
* 空降选址分析
|
||
*/
|
||
readonly airborneAnalysis: AirborneAnalysis;
|
||
/**
|
||
* 挖填方分析
|
||
*/
|
||
readonly groundClippingAnalysis: GroundClippingAnalysis;
|
||
/**
|
||
* 核防护
|
||
*/
|
||
readonly nuclearProtectionAnalysis: NuclearProtectionAnalysis;
|
||
/**
|
||
* 地貌分析类型
|
||
*/
|
||
readonly morphologicAnalysis: MorphologicAnalysis;
|
||
}
|
||
|
||
class AnalysisUtil {
|
||
/**
|
||
* 创建纹理
|
||
* @param width
|
||
* @param height
|
||
* @param color
|
||
*/
|
||
static createImage(width: number, height: number, color: Array<number>): string;
|
||
static createPolyline(data: Array<Array<GeoPoint>>, lineWidth?: number, color?: string): any;
|
||
static createPolygon(data: Array<Array<GeoPoint>>, color?: string, imageSrc?: string): Cesium.GroundPrimitive;
|
||
static createTextPoint(pos: GeoPoint, text: string, textColor?: string): Cesium.Entity;
|
||
static createRectangle(rect: Cesium.Rectangle, src: string): Cesium.Entity;
|
||
static createPoint(pos: GeoPoint, color?: string): Cesium.Entity;
|
||
static createLine(posArr: Array<GeoPoint>, color?: string, lineWidth?: number): Cesium.Entity;
|
||
static createEllipse(dis: number, position: GeoPoint, src: string): Cesium.Entity;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 缓冲区分析
|
||
* @see <a href='../../../examples/gallery/editor.html#bufferAnalysis'>缓冲区分析</a>
|
||
*/
|
||
class BufferAnalysis {
|
||
private viewer;
|
||
private dataSource;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* depthTest 地形深度检测
|
||
* color 颜色
|
||
*/
|
||
open(data: any, depthTest?: boolean, color?: string): void;
|
||
/**
|
||
* 关闭分析
|
||
*/
|
||
close(): void;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 等高线提取
|
||
* @see <a href='../../../examples/gallery/editor.html#contourAnalysis'>等高线提取</a>
|
||
*/
|
||
class ContourAnalysis {
|
||
private viewer;
|
||
private primitive;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* color 线颜色
|
||
* lineWidth 线宽
|
||
*/
|
||
open(data: any, color?: string, lineWidth?: number): void;
|
||
/**
|
||
* 关闭分析
|
||
*/
|
||
close(): void;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 直瞄分析
|
||
* @see <a href='../../../examples/gallery/editor.html#directAimAnalysis'>直瞄分析</a>
|
||
*/
|
||
class DirectAimAnalysis {
|
||
private viewer;
|
||
private rectangle;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* rangeOutColor 射程外代表色
|
||
* invisibleColor 不通视代表色
|
||
* unbeatColor 通视,不可打击
|
||
* beatColor 可打击代表色
|
||
* depthTest 地球深度检测
|
||
*/
|
||
open(data: any, rangeOutColor?: string, invisibleColor?: string, unbeatColor?: string, beatColor?: string, depthTest?: boolean): void;
|
||
/**
|
||
* 关闭分析
|
||
*/
|
||
close(): void;
|
||
}
|
||
|
||
/**
|
||
* @类型 内部使用类
|
||
* @描述 洪水分析,为 Analysis 分析类所调用
|
||
* @see <a href='../../../examples/gallery/editor.html#floodAnalysisFont'>淹没分析</a>
|
||
*/
|
||
class FloodAnalysis {
|
||
private _viewer;
|
||
private _handler;
|
||
private _polygon;
|
||
private _flag;
|
||
private _point;
|
||
private _label;
|
||
private _rect;
|
||
private _clampToGround;
|
||
private _area;
|
||
private _labelItem;
|
||
constructor(viewer: any);
|
||
/**
|
||
* 开启淹没分析
|
||
* @param unit 量算单元
|
||
* @param color 量算颜色
|
||
*/
|
||
open(opt: FloodAnalysisOpt): void;
|
||
/**
|
||
* 淹没基准点选取
|
||
* @param data
|
||
* @param color
|
||
*/
|
||
private _selectBsaePoint;
|
||
private _calcDistance;
|
||
/**
|
||
* 关闭淹没分析
|
||
*/
|
||
close(): void;
|
||
}
|
||
/**
|
||
* 洪水分析参数规范
|
||
*/
|
||
class FloodAnalysisOpt {
|
||
/**
|
||
* 是否贴地
|
||
*/
|
||
clampToGround: true;
|
||
/**
|
||
* 线型颜色
|
||
*/
|
||
color: ColorStyle;
|
||
/**
|
||
* 量算单元
|
||
*/
|
||
unit: string;
|
||
/**
|
||
* 线型宽度
|
||
*/
|
||
width: number;
|
||
/**
|
||
* 文字对象参数
|
||
*/
|
||
labelGraphicOpt?: LabelGraphicOpt;
|
||
/**
|
||
* 回调函数
|
||
*/
|
||
finshCallback?: Function;
|
||
}
|
||
|
||
/**
|
||
* 挖地
|
||
*/
|
||
class GroundClipping {
|
||
/**
|
||
* 地理画布
|
||
*/
|
||
viewer: GeoCanvas;
|
||
/**
|
||
* 挖坑对象
|
||
*/
|
||
private terrainClipPlan;
|
||
private _path;
|
||
/**
|
||
* 挖地路径(经纬高)
|
||
*/
|
||
path: Array<GeoPoint>;
|
||
private _height;
|
||
/**
|
||
* 高度
|
||
*/
|
||
height: number;
|
||
/**
|
||
* 构造函数
|
||
* @param viewer 地理画布
|
||
*/
|
||
constructor(viewer: any);
|
||
/**
|
||
* 初始化挖地
|
||
* @param path 路径数据
|
||
* @param height 挖坑深度
|
||
* @param wallImg 坑壁图片
|
||
* @param bottomImg 坑底图片
|
||
*/
|
||
add(path: Array<GeoPoint>, height?: number): void;
|
||
/**
|
||
* 获取挖坑路径数据
|
||
* @param path 挖坑路径
|
||
*/
|
||
private getPositionsData;
|
||
/**
|
||
* 每次设置属性之后需要刷新
|
||
*/
|
||
private updateData;
|
||
/**
|
||
* 清除
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 填挖方分析
|
||
* @see <a href='../../../examples/gallery/editor.html#groundClippingAnalysis'>填挖方分析</a>
|
||
*/
|
||
class GroundClippingAnalysis {
|
||
private viewer;
|
||
private entityArr;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* wafangLevel 高度
|
||
* pointList 矩形区域左上,右下两点
|
||
*/
|
||
open(data: any, wafangLevel: number, pointList: Array<GeoPoint>): void;
|
||
/**
|
||
* 删除
|
||
*/
|
||
close(): void;
|
||
/**
|
||
* 计算两点间距离
|
||
*/
|
||
private getFlatternDistance;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 淹没分析
|
||
* @see <a href='../../../examples/gallery/editor.html#headFloodAnalysis'>缓冲区分析</a>
|
||
*/
|
||
class HeadFloodAnalysis {
|
||
private viewer;
|
||
private rectangle;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* depthTest 地形深度检测
|
||
* floodColor 淹没颜色
|
||
* noFloodColor 未淹没颜色
|
||
*/
|
||
open(data: any, depthTest?: boolean, floodColor?: string, noFloodColor?: string): void;
|
||
/**
|
||
* 关闭分析
|
||
*/
|
||
close(): void;
|
||
private createMap;
|
||
}
|
||
|
||
/**
|
||
* @类型 内部使用类
|
||
* @描述 控高分析,为 Analysis 分析类所调用
|
||
* @see <a href='../../../examples/gallery/editor.html#heightAnalyze'>控高分析</a>
|
||
*/
|
||
class HeightAnalyze {
|
||
viewer: any;
|
||
config: any;
|
||
_layer: any;
|
||
_points: any[];
|
||
/**
|
||
* 通视分析构造函数
|
||
* @method constructor
|
||
* @param viewer Cesium.Viewer 对象
|
||
*
|
||
*/
|
||
constructor(viewer: any);
|
||
color: any;
|
||
/**
|
||
* @method height
|
||
* 高度值
|
||
*
|
||
* 示例代码
|
||
* ```
|
||
* var heightAnalyze = viewer.analysis.heightAnalyze;
|
||
* heightAnalyze.height = 400;
|
||
* heightAnalyze.open();
|
||
* ```
|
||
*
|
||
*/
|
||
height: number;
|
||
/**
|
||
* 坐标点
|
||
* @method setPolygon
|
||
* @param points 经纬度点坐标,格式:[经度,纬度,高度]
|
||
* 示例代码
|
||
* ```
|
||
* var heightAnalyze = viewer.analysis.heightAnalyze;
|
||
* heightAnalyze.height = 400;
|
||
* heightAnalyze.setPolygon([
|
||
* 109.0349381448271,34.31717633782572,386.9231637517154,109.03900961665003,
|
||
* 34.321847375754345,397.67154065059685,
|
||
* 109.03346632153671,34.326639657406226,395.4792360496345,
|
||
* 109.03144059631933,34.32489928901451,390.96019381390937,
|
||
* 109.0311066948082,34.323485025163286,388.67673695624234,
|
||
* 109.03229719685534,34.31991103654269,385.82666822350035,
|
||
* 109.03358048811168,34.31842706237503,386.4791369856086,
|
||
* 109.03433018158603,34.31771892610954,387.5863231772101
|
||
* ]);
|
||
* heightAnalyze.open();
|
||
* ```
|
||
*
|
||
*/
|
||
setPolygon(points: Array<Number>): void;
|
||
/**
|
||
* 开始分析
|
||
* @method open
|
||
* @return
|
||
*/
|
||
open(): void;
|
||
/**
|
||
* 结束视域分析
|
||
* @method close
|
||
*/
|
||
close(): void;
|
||
private updateLayer;
|
||
private creategeometry;
|
||
}
|
||
|
||
/**
|
||
* 遮蔽分析
|
||
*/
|
||
class HideAnalysis {
|
||
private viewer;
|
||
private entity;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* center 位置
|
||
* dis 距离
|
||
* depthTest 地形深度检测
|
||
* hideColor 遮蔽颜色
|
||
* noHideColor 不遮蔽颜色
|
||
*/
|
||
open(data: any, center: GeoPoint, dis: number, depthTest?: boolean, hideColor?: string, noHideColor?: string): void;
|
||
/**
|
||
* 删除
|
||
*/
|
||
close(): void;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 间瞄分析
|
||
* @see <a href='../../../examples/gallery/editor.html#indirectAimAnalysis'>间瞄分析</a>
|
||
*/
|
||
class InDirectAimAnalysis {
|
||
private viewer;
|
||
private rectangle;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* unbeatColor 不可打击颜色
|
||
* beatColor 可打击颜色
|
||
* depthTest 地球深度检测
|
||
*/
|
||
open(data: any, unbeatColor?: string, beatColor?: string, depthTest?: boolean): void;
|
||
/**
|
||
* 关闭分析
|
||
*/
|
||
close(): void;
|
||
}
|
||
|
||
/**
|
||
* 点点通视
|
||
*/
|
||
class IntervisibilityAnalysis {
|
||
private viewer;
|
||
private lineGreen;
|
||
private lineRed;
|
||
private dirLine;
|
||
private point;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* posArr [起点,终点]
|
||
* lineWidth 线宽
|
||
* depthTest 地形深度检测
|
||
* visableColor 通视线颜色
|
||
* invisableColor 不通视颜色
|
||
* obstructPointColor 障碍点颜色
|
||
*/
|
||
open(data: any, posArr: Array<GeoPoint>, depthTest?: boolean, lineWidth?: number, visableColor?: string, invisableColor?: string, obstructPointColor?: string): void;
|
||
/**
|
||
* 存在障碍点
|
||
*/
|
||
private createObstructPrimitive;
|
||
/**
|
||
* 通视情况
|
||
*/
|
||
private createDirPrimitive;
|
||
/**
|
||
* 关闭分析
|
||
*/
|
||
close(): void;
|
||
}
|
||
|
||
/**
|
||
* 卷帘功能
|
||
*/
|
||
class LayerSplit {
|
||
private _layer;
|
||
private _viewer;
|
||
private _type;
|
||
private _handler;
|
||
/**
|
||
* 构造函数
|
||
* @param viewer 卷帘视口
|
||
* @param layer 卷帘图层
|
||
* @param type 卷帘方式
|
||
* @param style 卷帘样式
|
||
*/
|
||
constructor(viewer: GeoCanvas);
|
||
private _getType;
|
||
private _formatCss;
|
||
private _main;
|
||
/**
|
||
* 开启卷帘
|
||
* @param {Cesium.ImageryLayer} layer
|
||
* @param {string} type 卷帘类型['left','right','up','bottom']
|
||
* @param {string} barColor 卷帘条带颜色
|
||
* @param {number} barWidth 卷帘条带宽度
|
||
*/
|
||
open(layer: Cesium.ImageryLayer, type?: string, barColor?: string, barWidth?: number): void;
|
||
/**
|
||
* 关闭卷帘
|
||
*/
|
||
close(): void;
|
||
}
|
||
|
||
/**
|
||
* 侧面
|
||
*/
|
||
class MeasureArea {
|
||
private _viewer;
|
||
private _area;
|
||
private _clampToGround;
|
||
private _ploygon;
|
||
private _labelItem;
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**
|
||
* 开启测面
|
||
* @param clampToGround 是否计算贴地
|
||
* @param unit 量算单位 meter kilometer
|
||
* @param color 量算面颜色
|
||
* @param labelGraphicOpt 文字对象参数
|
||
* @param finshCallback 回调函数
|
||
*/
|
||
open(areaOpt: MeasureAreaOpt): void;
|
||
private _calcDistance;
|
||
/**
|
||
* 关闭测面
|
||
*/
|
||
close(): void;
|
||
}
|
||
class MeasureAreaOpt {
|
||
/**
|
||
* 是否计算贴地
|
||
*/
|
||
clampToGround: boolean;
|
||
/**
|
||
* 线是否贴地
|
||
*/
|
||
polygonClamp: boolean;
|
||
/**
|
||
* 量算单位 meter kilometer
|
||
*/
|
||
unit: string;
|
||
/**
|
||
* 量算线颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 文字对象参数
|
||
*/
|
||
labelGraphicOpt?: LabelGraphicOpt;
|
||
/**
|
||
* 回调函数
|
||
*/
|
||
finshCallback?: Function;
|
||
}
|
||
|
||
/**
|
||
* 测距
|
||
*/
|
||
class MeasureDistance {
|
||
private _viewer;
|
||
private _distance;
|
||
private _clampToGround;
|
||
private _polyline;
|
||
private _labelItem;
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**
|
||
* 开启测距
|
||
* @param disopt 测距参数
|
||
*/
|
||
open(disopt: MeasureDistanceOpt): void;
|
||
private _calcDistance;
|
||
/**
|
||
* 关闭测距
|
||
*/
|
||
close(): void;
|
||
}
|
||
class MeasureDistanceOpt {
|
||
/**
|
||
* 是否计算贴地
|
||
*/
|
||
clampToGround: boolean;
|
||
/**
|
||
* 线是否贴地
|
||
*/
|
||
lineClamp: boolean;
|
||
/**
|
||
* 量算单位 meter kilometer
|
||
*/
|
||
unit: string;
|
||
/**
|
||
* 量算线颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 文字对象参数
|
||
*/
|
||
labelGraphicOpt?: LabelGraphicOpt;
|
||
/**
|
||
* 回调函数
|
||
*/
|
||
finshCallback?: Function;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 地貌分析
|
||
* @see <a href='../../../examples/gallery/editor.html#morphologicAnalysis'>地貌分析</a>
|
||
*/
|
||
class MorphologicAnalysis {
|
||
private viewer;
|
||
private entitiyArr;
|
||
private primitiveArr;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 开始分析
|
||
* @param data 后端返回数据 即response.data
|
||
* @param radioModel 分析模式
|
||
* @param position 分析范围
|
||
* @param lineColor 线颜色
|
||
* @param textColor 文字颜色
|
||
* @param depthTest 深度检测
|
||
*/
|
||
open(data: any, radioModel: MorphologicModelEnum, position?: Array<GeoPoint>, lineColor?: string, textColor?: string, depthTest?: boolean): void;
|
||
/**
|
||
* 关闭分析
|
||
*/
|
||
close(): void;
|
||
}
|
||
/**
|
||
* 分析类型
|
||
*/
|
||
enum MorphologicModelEnum {
|
||
/**山顶点 */
|
||
'MountainTop' = 1,
|
||
/**鞍部点 */
|
||
'Saddlepoint' = 2,
|
||
/**山脚线 */
|
||
'Bottomline' = 3,
|
||
/**山谷线 */
|
||
'Valleyline' = 4,
|
||
/**山脊线 */
|
||
'Ridgeline' = 5,
|
||
/**地貌类型 */
|
||
'TerrainType' = 6
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 核防护分析
|
||
* @see <a href='../../../examples/gallery/editor.html#nuclearProtectionAnalysis'>核防护分析</a>
|
||
*/
|
||
class NuclearProtectionAnalysis {
|
||
private viewer;
|
||
private entity;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* depthTest 地形深度检测
|
||
*/
|
||
open(data: any, depthTest?: boolean): void;
|
||
/**
|
||
* 删除
|
||
*/
|
||
close(): void;
|
||
}
|
||
|
||
/**
|
||
* 路径分析
|
||
*/
|
||
class PathAnalysis {
|
||
/**
|
||
* 视图对象
|
||
*/
|
||
private viewer;
|
||
private pathArr;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* depthTest 地形深度检测
|
||
* lineWidth 线宽
|
||
* color 线颜色
|
||
*/
|
||
open(data: any, depthTest?: boolean, lineWidth?: number, color?: string): void;
|
||
/**
|
||
* 结束分析
|
||
*/
|
||
close(): void;
|
||
}
|
||
|
||
/**
|
||
* 点面通视
|
||
*/
|
||
class PolygonVisiableAnalysis {
|
||
private viewer;
|
||
private entity;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* depthTest 地形深度检测
|
||
* visiableColor 可视颜色
|
||
* invisibleColor 不可视颜色
|
||
*/
|
||
open(data: any, depthTest?: boolean, visiableColor?: string, invisibleColor?: string): void;
|
||
/**
|
||
* 删除
|
||
*/
|
||
close(): void;
|
||
}
|
||
|
||
/**
|
||
* 剖面分析
|
||
*/
|
||
class ProfileAnalysis {
|
||
private _viewer;
|
||
private _measureDistance;
|
||
constructor(viewer: any);
|
||
/**
|
||
* 开启剖面分析
|
||
* @param callback 回调函数
|
||
*/
|
||
open(callback: Function): void;
|
||
/**
|
||
* 关闭剖面分析
|
||
*/
|
||
close(): void;
|
||
}
|
||
|
||
/**
|
||
* @author zhuwz
|
||
* @desc 3DTiles 选择工具
|
||
*/
|
||
class SelectionTool {
|
||
private _tileet;
|
||
private _selectionColor;
|
||
constructor(tileet: Cesium.Cesium3DTileset);
|
||
/**
|
||
* 选中对象颜色设置
|
||
*/
|
||
selectionColor: Cesium.Color;
|
||
/**
|
||
* 选择对象
|
||
* @param propertyName 属性字段
|
||
* @param propertyValus 属性值
|
||
*/
|
||
select(propertyName: string, propertyValus: Array<string>): void;
|
||
/**
|
||
* 清空选择集
|
||
*
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 阴影分析
|
||
* @see <a href='../../../examples/gallery/editor.html#shadowAnalysis'>阴影分析</a>
|
||
*/
|
||
class ShadowAnalysis {
|
||
private viewer;
|
||
private rectangle;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 关闭分析
|
||
*/
|
||
close(): void;
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* depthTest 地球深度检测
|
||
*/
|
||
open(data: any, depthTest?: boolean): void;
|
||
private createMap;
|
||
}
|
||
|
||
/**
|
||
* @类型 内部使用类
|
||
* @描述 天际线,为 Analysis 分析类所调用
|
||
* @see <a href='../../../examples/gallery/editor.html#skylineAnay'>天际线</a>
|
||
*/
|
||
class SkylineAnalyze {
|
||
private _skylinePostProcess;
|
||
private _viewer;
|
||
private _psLayer;
|
||
constructor(viewer: any);
|
||
/**
|
||
* 开启天际线分析
|
||
* @param opt 天际线分析设置
|
||
*/
|
||
open(opt: SkylineOption): void;
|
||
/**
|
||
* 关闭天际线分析
|
||
*/
|
||
close(): void;
|
||
}
|
||
class SkylineOption {
|
||
/**
|
||
* 线型宽度
|
||
*/
|
||
width: number;
|
||
strokeType: Cesium.Cartesian3;
|
||
bjColor: Cesium.Color;
|
||
color: Cesium.Color;
|
||
strokeDistance: number;
|
||
}
|
||
class SkylinePostProcess extends Cesium.PostProcessStage {
|
||
constructor(camera: Cesium.Camera, opts: SkylineOption);
|
||
}
|
||
|
||
/**
|
||
* 坡度坡向分析
|
||
* 说明:根据数据分为9级,颜色设置如下:
|
||
* level_1:rgba(45,136,4,1.0),
|
||
* level_2:rgba(75,153,4,1.0),
|
||
* level_3:rgba(111,169,4,1.0),
|
||
* level_4:rgba(154,188,4,1.0),
|
||
* level_5:rgba(204,206,4,1.0),
|
||
* level_6:rgba(204,155,4,1.0),
|
||
* level_7:rgba(204,104,4,1.0),
|
||
* level_8:rgba(204,53,4,1.0),
|
||
* level_9:rgba(204,2,4,1.0)
|
||
*/
|
||
class SlopeAnalysis {
|
||
private viewer;
|
||
private rectangle;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 数据返回成功后开始分析
|
||
* data 后端返回数据 即response.data
|
||
* depthTest 地球深度检测
|
||
*/
|
||
open(data: any, depthTest?: boolean): void;
|
||
/**
|
||
* 创建UV
|
||
* @param res
|
||
*/
|
||
private createMap;
|
||
/**
|
||
* 结束分析
|
||
*/
|
||
close(): void;
|
||
}
|
||
|
||
class TerrainClipPlane {
|
||
viewer: GeoCanvas;
|
||
bottomSurface: any;
|
||
wellWall: any;
|
||
private options;
|
||
private _positions;
|
||
private _height;
|
||
height: number;
|
||
wallImg: String;
|
||
bottomImg: String;
|
||
private splitNum;
|
||
private excavateMinHeight;
|
||
private wellData;
|
||
private _show;
|
||
show: any;
|
||
constructor(t: any, i: any);
|
||
updateData(e: any): void;
|
||
private _prepareWell;
|
||
private _createWell;
|
||
private _getMinHeight;
|
||
private _ellipsoidToLonLat;
|
||
private _createWellWall;
|
||
private _createBottomSurface;
|
||
private _switchExcavate;
|
||
private _updateExcavateDepth;
|
||
/**
|
||
* 清除
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
* 通视分析
|
||
*/
|
||
class ViewshedAnalyze {
|
||
viewer: any;
|
||
config: any;
|
||
defaultOption: any;
|
||
/**
|
||
* 通视分析构造函数
|
||
* @method constructor
|
||
* @param viewer Cesium.Viewer 对象
|
||
*
|
||
*/
|
||
constructor(viewer: Cesium.Viewer);
|
||
VisibleColor: any;
|
||
InVisibleColor: any;
|
||
/**
|
||
* 是否显示视距
|
||
*
|
||
*/
|
||
showDistance: any;
|
||
/**
|
||
* 开始视域分析
|
||
* @method start
|
||
*
|
||
*/
|
||
open(): void;
|
||
/**
|
||
* 结束视域分析
|
||
* @method stop
|
||
*
|
||
*/
|
||
close(): void;
|
||
_initialiseHandlers(): void;
|
||
_addEntity(pos: any): void;
|
||
_calculatePose(pickingPos: any): void;
|
||
_createViewShad(pos: any): void;
|
||
_getUIShader(self: any, fs: any, shadowMap: any, castShadows: any, isTerrain: any, hasTerrainNormal: any): any;
|
||
_updateLightDirection(): void;
|
||
_creatFrustum(): void;
|
||
_pickPosition(winPosition: any): any;
|
||
_getViewShadGeometry(frustumGeometry: any): any;
|
||
}
|
||
|
||
class ViewShedPrimitive {
|
||
viewer: any;
|
||
cameraPosition: any;
|
||
_horizontalAngle: any;
|
||
viewPosition: any;
|
||
_verticalAngle: any;
|
||
_visibleAreaColor: any;
|
||
_hiddenAreaColor: any;
|
||
_alpha: any;
|
||
_distance: any;
|
||
_frustum: any;
|
||
calback: any;
|
||
frustumQuaternion: any;
|
||
_handler: any;
|
||
radar: any;
|
||
viewShadowMap: any;
|
||
pCamera: any;
|
||
postProcess: any;
|
||
constructor(viewer: any, option: any);
|
||
readonly config: {
|
||
cameraPosition: any;
|
||
viewPosition: any;
|
||
horizontalAngle: number;
|
||
verticalAngle: number;
|
||
visibleAreaColor: Cesium.Color;
|
||
hiddenAreaColor: Cesium.Color;
|
||
alpha: number;
|
||
distance: number;
|
||
frustum: boolean;
|
||
};
|
||
getCurrentMousePosition(e: any, t: any, testParms: any): any;
|
||
validate(e: any, t: any): boolean;
|
||
_bindMourseEvent(): void;
|
||
_unbindMourseEvent(): void;
|
||
_addToScene(): void;
|
||
_createShadowMap(cPosition: any, vPosition: any): void;
|
||
getFrustumQuaternion(position: any, viewPosition: any): Cesium.HeadingPitchRoll;
|
||
_addPostProcess(): void;
|
||
removeRadar(): void;
|
||
resetRadar(): void;
|
||
addRadar(position: any, hpr: any): void;
|
||
update(e: any): void;
|
||
destroy(): void;
|
||
horizontalAngle: any;
|
||
verticalAngle: any;
|
||
distance: any;
|
||
visibleAreaColor: any;
|
||
hiddenAreaColor: any;
|
||
alpha: any;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 观察所分析
|
||
* @see <a href='../../../examples/gallery/editor.html#WatchHouseAnalysis'>观察所分析</a>
|
||
*/
|
||
class WatchHouseAnalysis {
|
||
private viewer;
|
||
private rectangle;
|
||
private watchEntity;
|
||
private iconEntityArr;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 开始分析
|
||
* @param data 后端返回数据 即response.data
|
||
*/
|
||
open(data: any): void;
|
||
/**
|
||
* 关闭分析
|
||
*/
|
||
close(): void;
|
||
/**
|
||
* 显示观察所范围
|
||
* @param data 后端返回数据 即response.data
|
||
*/
|
||
openVisiblity(data: any): Promise<void>;
|
||
}
|
||
|
||
/**
|
||
* @类型 需要创建的虚拟类一般由内部类继承
|
||
* @描述 事件分发类可以实现事件的注册监、注销监听、事件激活等方法
|
||
*/
|
||
class Event {
|
||
protected _events: any;
|
||
protected _firingCount: any;
|
||
/**
|
||
* 添加对象的事件监听方法(事件对象基础方法)
|
||
* @param type 监听事件类型
|
||
* @param fn 监听回调函数
|
||
* @param context 上下文
|
||
* ```
|
||
* 示例代码:
|
||
* const fun = function(info) {
|
||
* console.log('监听事件');
|
||
* console.log(info);
|
||
* }
|
||
* event.on('add', fun); //监听添加事件
|
||
* ```
|
||
*/
|
||
on(type: string, fn: Function, context?: any): this;
|
||
/**
|
||
* 监听
|
||
* @param type
|
||
* @param fn
|
||
* @param context
|
||
*/
|
||
private _on;
|
||
/**
|
||
* 移除对象的事件监听方法(事件对象基础方法)
|
||
* @param type 要删除的监听事件类型
|
||
* @param fn 要删除的监听回调函数,为空时清空所有回调函数
|
||
* @param context 上下文
|
||
* @return
|
||
* ```
|
||
* 代码示例:
|
||
* event.off('add',fun);
|
||
* ```
|
||
*/
|
||
off(type: string, fn: Function, context?: any): void;
|
||
/**
|
||
* 事件移除
|
||
* @param type
|
||
* @param fn
|
||
* @param context
|
||
*/
|
||
private _off;
|
||
/**
|
||
* 激活对象的某个监听事件,可以附件数据,并可以传递给父对象(事件对象基础方法)
|
||
* @method fire
|
||
* @param type 事件名称
|
||
* @param data 监听时(on)收到的数据
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* const info = {} //监听时(on)收到的数据
|
||
* event.fire('add',info);
|
||
* ```
|
||
*/
|
||
fire(type: string, data: any): this;
|
||
/**
|
||
* 查询是否有指定类型的监听器(事件对象基础方法)
|
||
* @param type 事件类型
|
||
* @returns
|
||
* ```
|
||
* 示例代码:
|
||
* const hasListens = event.listens('add');
|
||
* ```
|
||
*/
|
||
listens(type: string): boolean;
|
||
}
|
||
|
||
class Item {
|
||
protected _name: string;
|
||
protected _id: any;
|
||
/**
|
||
* 对象名称不需要修改
|
||
* ```
|
||
* 示例代码
|
||
* item.name = 'itemName'
|
||
* ```
|
||
*/
|
||
name: string;
|
||
/**
|
||
* 对象id不允许用修改全局唯一初始化传入或自动生成
|
||
* ```
|
||
* 示例代码:
|
||
* let id = item.id;
|
||
* ```
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 解析json对象
|
||
*/
|
||
parseJson(json: object): void;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
initItem(options: any): any;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行remove方法添加时被调用
|
||
*/
|
||
destroyItem(): void;
|
||
}
|
||
|
||
class Layer extends Event {
|
||
protected _itemList: Array<Item>;
|
||
constructor();
|
||
/**
|
||
* 添加对象
|
||
* @param item
|
||
*/
|
||
add(item: Item): Item;
|
||
/**
|
||
* 删除对象
|
||
* @param
|
||
*/
|
||
remove(itemid: string): Item;
|
||
/**
|
||
* 根据id获得对象
|
||
* @param itemid 对象id
|
||
*/
|
||
getItemById(itemid: string): Item;
|
||
/**
|
||
* 根据name获得对象
|
||
* @param itemName 对象名称
|
||
*/
|
||
getItemByName(itemName: string): Item;
|
||
toJson(): any[];
|
||
/**
|
||
* 解析json
|
||
* @param json 解析
|
||
*/
|
||
parseJson(json: any): void;
|
||
getItemList(): Item[];
|
||
}
|
||
|
||
class Register {
|
||
_registerList: Map<ItemBaseTypeE, Map<string, any>>;
|
||
constructor();
|
||
/**
|
||
* 注册Item
|
||
* @param type 注册类型
|
||
* @param itemConstructor 注册对象
|
||
*/
|
||
REGISTER(type: ItemBaseTypeE, itemConstructor: any): void;
|
||
/**
|
||
* 根据类型获取构造器
|
||
* @param type 类别
|
||
* @param itemType item类型
|
||
*/
|
||
GET_CONSTRUCTOR(type: ItemBaseTypeE, itemType: string): any;
|
||
GET_REGISTER_LIST(): Map<ItemBaseTypeE, Map<string, any>>;
|
||
}
|
||
enum ItemBaseTypeE {
|
||
/**
|
||
* 影像基类
|
||
*/
|
||
ImageItem = "ImageItem",
|
||
/**
|
||
* 矢量基类
|
||
*/
|
||
vectorItem = "vectorItem",
|
||
/**
|
||
* 三维模型基类
|
||
*/
|
||
modelItem = "modelItem",
|
||
/**
|
||
* 几何体基类
|
||
*/
|
||
GraphicItem = "GraphicItem",
|
||
/**
|
||
* 高效绘制基类
|
||
*/
|
||
EfficentItem = "EfficentItem",
|
||
/**
|
||
* 瓦片基类
|
||
*/
|
||
TileItem = "TileItem",
|
||
/**
|
||
* 动作基类
|
||
*/
|
||
ActionItem = "ActionItem"
|
||
}
|
||
const gRegister: Register;
|
||
|
||
class ArrayHelper {
|
||
static Remove<T>(array: T[], t: T): void;
|
||
static moveItem<T>(array: T[], index1: any, index2: any): T[];
|
||
}
|
||
|
||
class DeComItemBase {
|
||
name: string;
|
||
comType: DeComType;
|
||
data: any;
|
||
param: any;
|
||
customElement: any;
|
||
instance: any;
|
||
option: any;
|
||
editable: boolean;
|
||
private _visible;
|
||
visible: boolean;
|
||
close(): void;
|
||
hide(): void;
|
||
onclosed: Subject<any>;
|
||
onloaded: Subject<any>;
|
||
}
|
||
class DeCustomItem extends DeComItemBase {
|
||
/**
|
||
* @param {string} customElementName
|
||
*/
|
||
constructor(element: any, option?: DeWindowOption, editable?: boolean);
|
||
}
|
||
enum DeComType {
|
||
angular = 0,
|
||
customWindowElement = 1,
|
||
customElement = 2
|
||
}
|
||
class DeWindowOption {
|
||
isFullScreen?: boolean;
|
||
width?: string;
|
||
height?: string;
|
||
left?: string;
|
||
top?: string;
|
||
right?: string;
|
||
bottom?: string;
|
||
headerVisible?: boolean;
|
||
title?: string;
|
||
zIndex?: number;
|
||
iconClass?: string;
|
||
}
|
||
|
||
abstract class DePluginBase {
|
||
/**
|
||
* 搜索,搜索插件内部数据,用于系统综合搜索功能
|
||
* @param {string} name 关键字
|
||
* @returns Promise
|
||
*/
|
||
search?(name: string): Promise<any[]>;
|
||
/**
|
||
* 初始化
|
||
* @param {} viewer 框架传入的 球对象
|
||
*/
|
||
abstract init(viewer: any): any;
|
||
/**
|
||
* 显示插件,包括界面和球上元素
|
||
* @param {} data?
|
||
*/
|
||
abstract show(data?: any): any;
|
||
/**
|
||
* 隐藏插件页面,保留球上元素
|
||
*/
|
||
abstract hide(): any;
|
||
/**
|
||
* 关闭插件,同时删除插件关联的球上元素
|
||
*/
|
||
abstract close(): any;
|
||
/**
|
||
* 销毁插件
|
||
*/
|
||
abstract dispose(): any;
|
||
/**
|
||
* 获取当前展示数据的序列化对象,用于系统快照
|
||
*/
|
||
abstract getDisplayCondition(): any;
|
||
/**
|
||
* 设置显示数据序列化,用于快照
|
||
* @param {any} param 数据
|
||
* @param {boolean} onlyName 用于 综合搜索,综合搜索对插件数据的关键字进行搜索,从综合搜索结果跳转到插件时使用此参数清空其他筛选条件
|
||
*/
|
||
abstract setDisplayCondition(param: any, onlyName: boolean): any;
|
||
onViewerMouseInput(mousevent: any, eventtype: any): void;
|
||
}
|
||
|
||
/**
|
||
* 插件属性
|
||
*/
|
||
class DePluginAttribute {
|
||
constructor(name: string, pluginConstructor: Function, icon?: string, isSearch?: boolean, iconFont?: any, position?: any);
|
||
/**
|
||
* 名称
|
||
*/
|
||
name: string;
|
||
/**
|
||
* 图标
|
||
*/
|
||
icon: string;
|
||
/**
|
||
*
|
||
*/
|
||
iconFont: string;
|
||
pluginConstructor: any;
|
||
instance?: DePluginBase;
|
||
state?: PluginState;
|
||
isSearch: boolean;
|
||
position: string;
|
||
geovisEntry?: string;
|
||
}
|
||
enum PluginState {
|
||
show = 0,
|
||
hide = 1,
|
||
close = 2
|
||
}
|
||
|
||
/**
|
||
* 插件管理类
|
||
* 对继承自{@link Tool} 与 {@link Widget}的类进行管理
|
||
*/
|
||
class DePluginManager extends Event {
|
||
_viewer: any;
|
||
Tools: DePluginAttribute[];
|
||
Widgets: DePluginAttribute[];
|
||
CurrentTool: DePluginAttribute;
|
||
leftTools: DePluginAttribute[];
|
||
rightWidgets: DePluginAttribute[];
|
||
bottomTools: DePluginAttribute[];
|
||
bottomWidgets: DePluginAttribute[];
|
||
constructor(viewer: any);
|
||
registerTool(plugin: DePluginAttribute): void;
|
||
registerWidget(plugin: DePluginAttribute): void;
|
||
showTool(tool: DePluginAttribute): void;
|
||
changeTool(tool: DePluginAttribute): void;
|
||
closeTool(tool: DePluginAttribute | DePluginBase): void;
|
||
hideTool(tool: DePluginAttribute | DePluginBase): void;
|
||
createInstance(attribute: DePluginAttribute): void;
|
||
showWidget(widget: DePluginAttribute): void;
|
||
closeWidget(widget: DePluginAttribute | DePluginBase): boolean;
|
||
closeToolWidget(plugin: DePluginAttribute | DePluginBase): void;
|
||
private getPluginAttribute;
|
||
}
|
||
|
||
class DePluginViewManager {
|
||
static instance: DePluginViewManager;
|
||
comArray: DeComItemBase[];
|
||
constructor(viewer: any, toolContainer: any, onCanvasChange: any);
|
||
private _originCanvas;
|
||
private _viewer;
|
||
private _toolContainer;
|
||
private _onCanvasChange;
|
||
resetMouseBaseElement(): void;
|
||
setMouseBaseElement(element: any): void;
|
||
private customElementShow;
|
||
microAppShow(url: any, option: DeWindowOption, param: any, editable?: boolean): DeCustomItem;
|
||
iframeElementShow(url: any, option: DeWindowOption, editable?: boolean, id?: string): DeComItemBase;
|
||
iframeWindowElementShow(url: any, option: DeWindowOption, editable?: boolean, id?: string): DeComItemBase;
|
||
createIframeWindow(url: string, option: DeWindowOption, id?: string): {
|
||
element: HTMLDivElement;
|
||
iframe: HTMLIFrameElement;
|
||
closeElement: HTMLElement;
|
||
};
|
||
createIframe(url: string, name?: string): HTMLIFrameElement;
|
||
close(item: DeComItemBase): void;
|
||
}
|
||
|
||
class SinlgleDePlugin extends DePluginBase {
|
||
private viewer;
|
||
private view;
|
||
constructor(entry: string);
|
||
init(viewer: any): void;
|
||
show(data?: any): void;
|
||
hide(): void;
|
||
close(): void;
|
||
dispose(): void;
|
||
getDisplayCondition(): void;
|
||
setDisplayCondition(param: any, onlyName: boolean): void;
|
||
geovisEntry: string;
|
||
}
|
||
|
||
/**
|
||
* 建筑物效果
|
||
*/
|
||
class BuildingMesh {
|
||
private appearance;
|
||
/**基准高度 */
|
||
private standardHeight;
|
||
private viewer;
|
||
/**水平高度 */
|
||
private minHeight;
|
||
private color;
|
||
/**
|
||
* 初始化
|
||
* @param viewer
|
||
* @param data 多边形数据
|
||
* @param standardHeight 基准高度
|
||
* @param color 基本颜色
|
||
*/
|
||
constructor(viewer: Cesium.Viewer, data: Array<Array<Cesium.Cartesian3>>, standardHeight?: number, color?: string);
|
||
/**
|
||
* 创建多边形几何体集合
|
||
* @param polygonList
|
||
*/
|
||
private createGeometry;
|
||
private createAppearance;
|
||
private getMS;
|
||
private getVs;
|
||
private getFs;
|
||
}
|
||
|
||
class CustomTilesetShader {
|
||
private vertex;
|
||
private fragment;
|
||
constructor(tileset: any, options?: any);
|
||
static SCAN: {
|
||
fragmentShader: string;
|
||
vertexShader: string;
|
||
};
|
||
static cached: Map<any, any>;
|
||
}
|
||
|
||
/**
|
||
* 圆柱几何体
|
||
*/
|
||
class CylinderGeometry {
|
||
topRadius: number;
|
||
bottomRadius: number;
|
||
position: GeoPoint;
|
||
height: number;
|
||
slice: number;
|
||
constructor(options: any);
|
||
createGeometry(): Cesium.Geometry;
|
||
getModelMatrix(): Cesium.Matrix4;
|
||
private createVertex;
|
||
/**
|
||
* 创建attribute
|
||
* @param topPosArr 顶面顶点数据
|
||
* @param bottomPosArr 底面顶点数据
|
||
*/
|
||
private createGeometeryAttribute;
|
||
/**
|
||
* 创建网格体
|
||
* @param postionsTemp 顶点数据
|
||
* @param stsTemp 纹理数据
|
||
*/
|
||
private createGrometry;
|
||
}
|
||
|
||
/**
|
||
* 防御罩效果
|
||
*/
|
||
class DefenseEllipsoid {
|
||
private color;
|
||
private radius;
|
||
private position;
|
||
private viewer;
|
||
private appearance;
|
||
private primitive;
|
||
private time;
|
||
constructor(viewer: Cesium.Viewer, position: GeoPoint, radius?: number, color?: string);
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
private createPrimitive;
|
||
private ellipsoidMs;
|
||
private getVs;
|
||
private getFs;
|
||
}
|
||
|
||
/**
|
||
* 圆形警示波
|
||
*/
|
||
class DiffusionCircles {
|
||
private geometry;
|
||
private appearance;
|
||
private primitive;
|
||
private _viewer;
|
||
private _position;
|
||
private _radius;
|
||
private _height;
|
||
private _color;
|
||
private _inner;
|
||
/**
|
||
* 初始化
|
||
* @param viewer
|
||
* @param position 位置
|
||
* @param radius 半径
|
||
* @param height 离地面高度
|
||
* @param color 颜色
|
||
* @param inner 是否为内部圆形
|
||
*/
|
||
constructor(viewer: Cesium.Viewer, position?: GeoPoint, radius?: number, height?: number, color?: string, inner?: boolean);
|
||
/**
|
||
* 添加动画
|
||
*/
|
||
private startAnimate;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 创建几何体
|
||
*/
|
||
private createGeometry;
|
||
/**
|
||
* 创建材质
|
||
*/
|
||
private createAppearance;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 内部圆形波着色器代码段
|
||
*/
|
||
private getInnerSource;
|
||
/**
|
||
* 外部圆形波着色器代码段
|
||
*/
|
||
private getOuterSource;
|
||
/**
|
||
* 移除
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
class FlowLine {
|
||
private viewer;
|
||
lineAppearance: Cesium.PolylineMaterialAppearance;
|
||
constructor(viewer: Cesium.Viewer, options: FlowLineOpt);
|
||
private create;
|
||
private createLineAppearance;
|
||
private getFlowLineSource;
|
||
private createInstance;
|
||
/**
|
||
* 计算贝塞尔曲线点信息
|
||
*/
|
||
private generateCurve;
|
||
}
|
||
class FlowLineOpt {
|
||
startPoint: any;
|
||
endPoints: Array<any>;
|
||
}
|
||
|
||
/**
|
||
* 管道
|
||
*/
|
||
class FlowTube {
|
||
private viewer;
|
||
private appearance;
|
||
private options;
|
||
constructor(viewer: Cesium.Viewer, options: FlowTubeOpt);
|
||
private createPrimitive;
|
||
private createGeometry;
|
||
/**
|
||
* 创建材质
|
||
*/
|
||
private createAppearance;
|
||
private getSource;
|
||
}
|
||
/**
|
||
* 流动管道参数类
|
||
*/
|
||
class FlowTubeOpt {
|
||
/**路径 */
|
||
path: Array<GeoPoint>;
|
||
/**管道分段数 */
|
||
tubularSegments: number;
|
||
/**管道半径 */
|
||
radius: number;
|
||
/** 管道横截面分段数目*/
|
||
radialSegments: number;
|
||
}
|
||
|
||
/**
|
||
* 平面雾
|
||
*/
|
||
class FogPlane {
|
||
private viewer;
|
||
private posArr;
|
||
private clampToGroud;
|
||
private primitive;
|
||
/**
|
||
* 初始化
|
||
* @param viewer 地球容器
|
||
* @param posArr 位置数组
|
||
* @param clampToGroud 是否贴地
|
||
*/
|
||
constructor(viewer: GeoCanvas, posArr: Array<GeoPoint>, clampToGroud?: boolean);
|
||
private createPrimitive;
|
||
private createApperance;
|
||
private getMs;
|
||
/**
|
||
* 删除
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
* 动态标记点
|
||
*/
|
||
class MarkPoint {
|
||
private _radius;
|
||
private _height;
|
||
private viewer;
|
||
_position: GeoPoint;
|
||
_color: string;
|
||
private partTwoMaterial;
|
||
private partFourMaterial;
|
||
private partTwoScale;
|
||
private partTwoMesh;
|
||
private primitiveCollection;
|
||
constructor(opt: MarkPointOpt);
|
||
/**
|
||
* 帧回调监听方法
|
||
*/
|
||
private listenerFun;
|
||
/**
|
||
* 创建第一部分
|
||
*/
|
||
private createPartOne;
|
||
private createPartOneImage;
|
||
private getPartOneMs;
|
||
/**
|
||
* 创建第二部分
|
||
*/
|
||
private createPartTwo;
|
||
private createPartTwoImage;
|
||
private getPartTwoMs;
|
||
/**
|
||
* 添加第三部分
|
||
*/
|
||
private createPartThree;
|
||
private getPartThreeMs;
|
||
private createPartFour;
|
||
private getPartFourMs;
|
||
/**
|
||
* 清除
|
||
*/
|
||
clear(): void;
|
||
}
|
||
/**
|
||
* 动态标记点参数类
|
||
*/
|
||
class MarkPointOpt {
|
||
/**
|
||
* 场景
|
||
*/
|
||
viewer: Cesium.Viewer;
|
||
/**
|
||
* 位置
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 半径
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 高度
|
||
*/
|
||
height: number;
|
||
}
|
||
|
||
/**
|
||
* A 3D model based on glTF, the runtime asset format for WebGL, OpenGL ES, and OpenGL.
|
||
* <p>
|
||
* Cesium includes support for geometry and materials, glTF animations, and glTF skinning.
|
||
* In addition, individual glTF nodes are pickable with {@link Scene#pick} and animatable
|
||
* with {@link Model#getNode}. glTF cameras and lights are not currently supported.
|
||
* </p>
|
||
* <p>
|
||
* An external glTF asset is created with {@link (Model as any).fromGltf}. glTF JSON can also be
|
||
* created at runtime and passed to this constructor function. In either case, the
|
||
* {@link Model#readyPromise} is resolved when the model is ready to render, i.e.,
|
||
* when the external binary, image, and shader files are downloaded and the WebGL
|
||
* resources are created.
|
||
* </p>
|
||
* <p>
|
||
* Cesium supports glTF assets with the following extensions:
|
||
* <ul>
|
||
* <li>
|
||
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_binary_glTF/README.md|KHR_binary_glTF (glTF 1.0)}
|
||
* </li><li>
|
||
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common (glTF 1.0)}
|
||
* </li><li>
|
||
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes (glTF 1.0)}
|
||
* </li><li>
|
||
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
|
||
* </li><li>
|
||
* {@link https://github.com/KhronosGroup/glTF/pull/1302|KHR_blend (draft)}
|
||
* </li><li>
|
||
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
|
||
* </li><li>
|
||
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness/README.md|KHR_materials_pbrSpecularGlossiness}
|
||
* </li><li>
|
||
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
|
||
* </li><li>
|
||
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
|
||
* </li><li>
|
||
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
|
||
* </li>
|
||
* </ul>
|
||
* </p>
|
||
* <p>
|
||
* For high-precision rendering, Cesium supports the {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md|CESIUM_RTC} extension, which introduces the
|
||
* CESIUM_RTC_MODELVIEW parameter semantic that says the node is in WGS84 coordinates translated
|
||
* relative to a local origin.
|
||
* </p>
|
||
*
|
||
* @alias Model
|
||
* @constructor
|
||
*
|
||
* @param {Object} [options] Object with the following properties:
|
||
* @param {Object|ArrayBuffer|Uint8Array} [options.gltf] A glTF JSON object, or a binary glTF buffer.
|
||
* @param {Resource|String} [options.basePath=''] The base path that paths in the glTF JSON are relative to.
|
||
* @param {Boolean} [options.show=true] Determines if the model primitive will be shown.
|
||
* @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the model from model to world coordinates.
|
||
* @param {Number} [options.scale=1.0] A uniform scale applied to this model.
|
||
* @param {Number} [options.minimumPixelSize=0.0] The approximate minimum pixel size of the model regardless of zoom.
|
||
* @param {Number} [options.maximumScale] The maximum scale size of a model. An upper limit for minimumPixelSize.
|
||
* @param {Object} [options.id] A user-defined object to return when the model is picked with {@link Scene#pick}.
|
||
* @param {Boolean} [options.allowPicking=true] When <code>true</code>, each glTF mesh and primitive is pickable with {@link Scene#pick}.
|
||
* @param {Boolean} [options.incrementallyLoadTextures=true] Determine if textures may continue to stream in after the model is loaded.
|
||
* @param {Boolean} [options.asynchronous=true] Determines if model WebGL resource creation will be spread out over several frames or block until completion once all glTF files are loaded.
|
||
* @param {Boolean} [options.clampAnimations=true] Determines if the model's animations should hold a pose over frames where no keyframes are specified.
|
||
* @param {ShadowMode} [options.shadows=ShadowMode.ENABLED] Determines whether the model casts or receives shadows from light sources.
|
||
* @param {Boolean} [options.debugShowBoundingVolume=false] For debugging only. Draws the bounding sphere for each draw command in the model.
|
||
* @param {Boolean} [options.debugWireframe=false] For debugging only. Draws the model in wireframe.
|
||
* @param {HeightReference} [options.heightReference=HeightReference.NONE] Determines how the model is drawn relative to terrain.
|
||
* @param {Scene} [options.scene] Must be passed in for models that use the height reference property.
|
||
* @param {DistanceDisplayCondition} [options.distanceDisplayCondition] The condition specifying at what distance from the camera that this model will be displayed.
|
||
* @param {Color} [options.color=Color.WHITE] A color that blends with the model's rendered color.
|
||
* @param {ColorBlendMode} [options.colorBlendMode=ColorBlendMode.HIGHLIGHT] Defines how the color blends with the model.
|
||
* @param {Number} [options.colorBlendAmount=0.5] Value used to determine the color strength when the <code>colorBlendMode</code> is <code>MIX</code>. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two.
|
||
* @param {Color} [options.silhouetteColor=Color.RED] The silhouette color. If more than 256 models have silhouettes enabled, there is a small chance that overlapping models will have minor artifacts.
|
||
* @param {Number} [options.silhouetteSize=0.0] The size of the silhouette in pixels.
|
||
* @param {ClippingPlaneCollection} [options.clippingPlanes] The {@link ClippingPlaneCollection} used to selectively disable rendering the model.
|
||
* @param {Boolean} [options.dequantizeInShader=true] Determines if a {@link https://github.com/google/draco|Draco} encoded model is dequantized on the GPU. This decreases total memory usage for encoded models.
|
||
* @param {Cartesian2} [options.imageBasedLightingFactor=Cartesian2(1.0, 1.0)] Scales diffuse and specular image-based lighting from the earth, sky, atmosphere and star skybox.
|
||
* @param {Cartesian3} [options.lightColor] The light color when shading the model. When <code>undefined</code> the scene's light color is used instead.
|
||
* @param {Number} [options.luminanceAtZenith=0.2] The sun's luminance at the zenith in kilo candela per meter squared to use for this model's procedural environment map.
|
||
* @param {Cartesian3[]} [options.sphericalHarmonicCoefficients] The third order spherical harmonic coefficients used for the diffuse color of image-based lighting.
|
||
* @param {String} [options.specularEnvironmentMaps] A URL to a KTX file that contains a cube map of the specular lighting and the convoluted specular mipmaps.
|
||
* @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
|
||
* @param {Boolean} [options.backFaceCulling=true] Whether to cull back-facing geometry. When true, back face culling is determined by the material's doubleSided property; when false, back face culling is disabled. Back faces are not culled if {@link Model#color} is translucent or {@link Model#silhouetteSize} is greater than 0.0.
|
||
*
|
||
* @see (Model as any).fromGltf
|
||
*
|
||
* @demo {@link https://sandcastle.cesium.com/index.html?src=3D%20Models.html|Cesium Sandcastle Models Demo}
|
||
*/
|
||
function Model(options: any): void;
|
||
|
||
/**
|
||
* OD线
|
||
*/
|
||
class ODLine {
|
||
viewer: Cesium.Viewer;
|
||
lineAppearance: Cesium.PolylineMaterialAppearance;
|
||
width: number;
|
||
/**
|
||
* 初始化
|
||
* @param viewer
|
||
* @param data 线数据
|
||
* @param width 线宽
|
||
*/
|
||
constructor(viewer: Cesium.Viewer, data: Array<Array<Cesium.Cartesian3>>, width?: number);
|
||
private createLineGeometry;
|
||
private createLineAppearance;
|
||
private getPolylineMs;
|
||
}
|
||
|
||
/**
|
||
* 圆柱几何体
|
||
*/
|
||
class ParticleCylinderGeometry {
|
||
topRadius: number;
|
||
bottomRadius: number;
|
||
position: GeoPoint;
|
||
height: number;
|
||
slice: number;
|
||
constructor(options: any);
|
||
createGeometry(): Cesium.Geometry;
|
||
getModelMatrix(): Cesium.Matrix4;
|
||
private createVertex;
|
||
/**
|
||
* 创建attribute
|
||
* @param topPosArr 顶面顶点数据
|
||
* @param bottomPosArr 底面顶点数据
|
||
*/
|
||
private createGeometeryAttribute;
|
||
/**
|
||
* 创建网格体
|
||
* @param postionsTemp 顶点数据
|
||
* @param stsTemp 纹理数据
|
||
*/
|
||
private createGrometry;
|
||
}
|
||
|
||
/**
|
||
* 底座效果2
|
||
* 底部圆环+截圆锥体粒子效果
|
||
*/
|
||
interface ParticleOrbitingConeCircle {
|
||
radius: number;
|
||
height: number;
|
||
}
|
||
interface ParticleOrbitingConeParticle {
|
||
topRadius: number;
|
||
bottomRadius: number;
|
||
height: number;
|
||
}
|
||
class ParticleOrbitingCone {
|
||
position: GeoPoint;
|
||
color: string;
|
||
circles: Array<ParticleOrbitingConeCircle>;
|
||
particleOpt: ParticleOrbitingConeParticle;
|
||
private viewer;
|
||
private particleAppearance;
|
||
constructor(viewer: Cesium.Viewer, options: ParticleOrbitingConeOpt);
|
||
/**创建底部圆环 */
|
||
private addCircles;
|
||
private createCirclesImage;
|
||
/**创建椎体 */
|
||
private createCone;
|
||
/**绘制椎体图片 */
|
||
private createConeImage;
|
||
/**
|
||
* 添加粒子特效
|
||
*/
|
||
private addParticleEffect;
|
||
/**粒子特效着色器片段 */
|
||
private getParticleSource;
|
||
}
|
||
class ParticleOrbitingConeOpt {
|
||
position: GeoPoint;
|
||
color: string;
|
||
circles: Array<ParticleOrbitingConeCircle>;
|
||
particle: ParticleOrbitingConeParticle;
|
||
}
|
||
|
||
/**
|
||
* 旋转四棱锥
|
||
*/
|
||
class Pentahedron {
|
||
private appearance;
|
||
private primitive;
|
||
private _viewer;
|
||
private _position;
|
||
private _topRadius;
|
||
private _bottomRadius;
|
||
private _height;
|
||
private _color;
|
||
private _slice;
|
||
private _speed;
|
||
private _angle;
|
||
/**
|
||
* 初始化
|
||
* @param _viewer
|
||
* @param position 位置
|
||
* @param topRadius 顶面半径
|
||
* @param bottomRadius 地面半径
|
||
* @param height 离地面高度
|
||
* @param color 颜色
|
||
* @param slice 切割份数
|
||
* @param speed 旋转速度
|
||
*/
|
||
constructor(_viewer: Cesium.Viewer, position?: GeoPoint, topRadius?: number, bottomRadius?: number, height?: number, color?: string, slice?: number, speed?: number);
|
||
/**
|
||
* 帧回调
|
||
*/
|
||
listenerFun: () => void;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
private init;
|
||
/**
|
||
* 创建材质
|
||
*/
|
||
private createAppearance;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 创建几何体
|
||
*/
|
||
private createGeometry;
|
||
/**
|
||
* 设置 modelMatrix
|
||
*/
|
||
private createMatrix;
|
||
/**着色器代码段 */
|
||
private getSource;
|
||
/**
|
||
* 移除
|
||
*/
|
||
clear(): void;
|
||
/**
|
||
* 获取颜色
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置颜色
|
||
* @param value 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 获取位置信息
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置位置信息
|
||
* @param value 位置
|
||
*/
|
||
position: GeoPoint;
|
||
}
|
||
|
||
class RotatingPentahedron {
|
||
private options;
|
||
private boxLength;
|
||
private angle;
|
||
private viewer;
|
||
private appearance;
|
||
private primitive;
|
||
constructor(viewer: Cesium.Viewer, options: RotatingPentahedronOpt);
|
||
/**
|
||
* 创建四棱锥并添加进场景
|
||
*/
|
||
private createPrimitive;
|
||
private createGeometry;
|
||
/**
|
||
* 四棱锥定点信息&纹理
|
||
*/
|
||
private createAttributes;
|
||
private createMatrix;
|
||
private createAppearance;
|
||
private listenerFunc;
|
||
}
|
||
class RotatingPentahedronOpt {
|
||
position: GeoPoint;
|
||
color: string;
|
||
}
|
||
|
||
/**
|
||
* 动态光柱
|
||
*/
|
||
class SpreadCylinder {
|
||
private dataItem;
|
||
private appearance;
|
||
private viewer;
|
||
private updateAttribute;
|
||
private primitive;
|
||
constructor(viewer: Cesium.Viewer, dataItem: SpreadCylinderOpt);
|
||
/**
|
||
* 创建圆柱并添加进场景
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 创建贴图
|
||
*/
|
||
private createImage;
|
||
/**
|
||
* 创建着色器代码段
|
||
*/
|
||
private getCylinderMS;
|
||
private listenerFun;
|
||
}
|
||
/**
|
||
* 动态圆柱参数类
|
||
*/
|
||
class SpreadCylinderOpt {
|
||
/**顶面半径 */
|
||
topRadius: number;
|
||
/**底面半径 */
|
||
bottomRadius: number;
|
||
/**圆柱位置 以底面圆心为中心 */
|
||
position: GeoPoint;
|
||
/**圆柱高度 */
|
||
height: number;
|
||
/**切分份数 */
|
||
slice: number;
|
||
/**圆柱颜色 */
|
||
color: string;
|
||
}
|
||
|
||
/**
|
||
* 扩散线
|
||
*/
|
||
class SpreadLine {
|
||
private polygonAppearance;
|
||
private polygonGeometry;
|
||
private polygonPrimitive;
|
||
private _viewer;
|
||
private _color;
|
||
private _position;
|
||
private _radius;
|
||
/**
|
||
* 初始化
|
||
* @param viewer
|
||
* @param radius 半径
|
||
* @param color 颜色
|
||
* @param position 位置
|
||
*/
|
||
constructor(viewer: Cesium.Viewer, position?: GeoPoint, radius?: number, color?: string);
|
||
/**
|
||
* 帧回调
|
||
*/
|
||
private listenerFun;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
private init;
|
||
/**
|
||
* 创建网格体
|
||
*/
|
||
private createGeometry;
|
||
/**
|
||
* 创建材质
|
||
*/
|
||
private createAppearence;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 片源着色器方法
|
||
*/
|
||
private getSource;
|
||
/**
|
||
* 移除
|
||
*/
|
||
clear(): void;
|
||
/**
|
||
* 获取颜色
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置颜色
|
||
* @param value 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 获取位置信息
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置位置信息
|
||
* @param value 位置
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 获取半径
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置半径
|
||
* @param value 半径
|
||
*/
|
||
radius: number;
|
||
}
|
||
|
||
/**
|
||
* 截圆锥体(Truncated cone) + 旋转底座圆环
|
||
*/
|
||
class TruncatedCone {
|
||
private viewer;
|
||
private options;
|
||
private partTowAppearance;
|
||
constructor(viewer: Cesium.Viewer, options: TruncatedConeOpt);
|
||
private createPartOne;
|
||
private createPartOneImage;
|
||
private createPartTwo;
|
||
private createPartTwoImage;
|
||
private createPartThree;
|
||
private createPartThreeImage;
|
||
private getPartThreeSource;
|
||
}
|
||
/**
|
||
* 旋转底座参数类
|
||
*/
|
||
class TruncatedConeOpt {
|
||
/**底部圆环中心坐标 */
|
||
circleCenter: GeoPoint;
|
||
/**主体颜色 */
|
||
color: string;
|
||
/**底部双圆环半径 */
|
||
circleRadius: number;
|
||
/**底部虚线圆半径 */
|
||
dottedCircleRadius: number;
|
||
/**外截圆锥体顶部半径 */
|
||
outerTopRadius: number;
|
||
/**外截圆锥体底部半径 */
|
||
outerBottomRadius: number;
|
||
/**外截圆锥体高度 */
|
||
outerHeight: number;
|
||
/**内截圆锥体顶部半径 */
|
||
innerTopRadius: number;
|
||
/**内截圆锥体底部半径 */
|
||
innerBottomRadius: number;
|
||
/**内截圆锥体高度 */
|
||
innerHeight: number;
|
||
}
|
||
|
||
class BaseCreator extends Event {
|
||
protected _viewer: Cesium.Viewer;
|
||
protected _father: CreatorManager;
|
||
private _handler;
|
||
private _controlPointSet;
|
||
constructor(viewer: Cesium.Viewer, father: CreatorManager);
|
||
/** handler单例 */
|
||
protected getHandler(): Cesium.ScreenSpaceEventHandler;
|
||
create(itemOpt: any, group: GraphicGroup, finishCallback?: any): GraphicItem;
|
||
protected setCtrPoint(point: GeoPoint, text?: string): void;
|
||
protected addCtrPoint(point: GeoPoint, text?: string): void;
|
||
protected clearCtrPint(): void;
|
||
protected createFinish(item: GraphicItem): void;
|
||
protected createItem(item: GraphicItem): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class CircularCreator extends BaseCreator {
|
||
constructor(viewer: Cesium.Viewer, father: CreatorManager);
|
||
create(itemOpt: any, group: GraphicGroup, finishCallback?: any): GraphicItem;
|
||
}
|
||
|
||
class CreatorManager extends Event {
|
||
private _viewer;
|
||
private _creatorList;
|
||
private _currentCreator;
|
||
private _controlPointSet;
|
||
private _graphicLayer;
|
||
constructor(viewer: Cesium.Viewer, graphicLayer: GraphicLayer);
|
||
/**
|
||
* 获取控制点集对象
|
||
*/
|
||
readonly controlPointSet: ControlPointSet;
|
||
/**
|
||
* 根据类型获取创建器
|
||
*/
|
||
private _getCreatorByType;
|
||
setCursor(cursor: any): void;
|
||
/**
|
||
* 开启创建
|
||
* @param itemOpt 对象属性
|
||
* @param group 要添加的组
|
||
* @param finishCallback 创建结束回调函数
|
||
*/
|
||
create(itemOpt: any, group: GraphicGroup, finishCallback: any): GraphicItem;
|
||
/**
|
||
* 终止创建
|
||
*/
|
||
stopCreate(): void;
|
||
}
|
||
|
||
class CylinderDynamicCreator extends BaseCreator {
|
||
constructor(viewer: Cesium.Viewer, father: CreatorManager);
|
||
create(itemOpt: any, group: GraphicGroup, finishCallback?: any): CylinderDynamicGraphic;
|
||
}
|
||
|
||
class EllipseCreator extends BaseCreator {
|
||
constructor(viewer: Cesium.Viewer, father: CreatorManager);
|
||
create(itemOpt: any, group: GraphicGroup, finishCallback?: any): GraphicItem;
|
||
}
|
||
|
||
class LabelBillboardCreator extends BaseCreator {
|
||
constructor(viewer: Cesium.Viewer, father: CreatorManager);
|
||
create(itemOpt: any, group: GraphicGroup, finishCallback?: any): GraphicItem;
|
||
}
|
||
|
||
class LabelRectCreator extends BaseCreator {
|
||
constructor(viewer: Cesium.Viewer, father: CreatorManager);
|
||
create(itemOpt: any, group: GraphicGroup, finishCallback?: any): GraphicItem;
|
||
}
|
||
|
||
class PointCreator extends BaseCreator {
|
||
constructor(viewer: Cesium.Viewer, father: CreatorManager);
|
||
create(itemOpt: any, group: GraphicGroup, finishCallback?: any): GraphicItem;
|
||
}
|
||
|
||
class PolylineCreator extends BaseCreator {
|
||
constructor(viewer: Cesium.Viewer, father: CreatorManager);
|
||
create(itemOpt: any, group: GraphicGroup, finishCallback?: any): GraphicItem;
|
||
}
|
||
|
||
class RectangleCreator extends BaseCreator {
|
||
constructor(viewer: Cesium.Viewer, father: CreatorManager);
|
||
create(itemOpt: any, group: GraphicGroup, finishCallback?: any): GraphicItem;
|
||
}
|
||
|
||
class RectangleLineCreator extends BaseCreator {
|
||
constructor(viewer: Cesium.Viewer, father: CreatorManager);
|
||
create(itemOpt: any, group: GraphicGroup, finishCallback?: any): GraphicItem;
|
||
private getCoordinates;
|
||
}
|
||
|
||
class ScreenTextCreator extends BaseCreator {
|
||
constructor(viewer: Cesium.Viewer, father: CreatorManager);
|
||
create(itemOpt: any, group: GraphicGroup, finishCallback?: any): GraphicItem;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class BaseEditor extends Event {
|
||
protected _viewer: Cesium.Viewer;
|
||
protected _father: EditorManager;
|
||
protected _editItem: GraphicItem;
|
||
private _handler;
|
||
protected _controlPointSet: ControlPointSet;
|
||
protected _screenEditor: ScreenEditor;
|
||
constructor(viewer: Cesium.Viewer, father: EditorManager);
|
||
setEditorOwnerElement(element: Element): void;
|
||
/** handler单例 */
|
||
protected getHandler(): Cesium.ScreenSpaceEventHandler;
|
||
/**
|
||
* 设置编辑对象由子类实现
|
||
* @param item
|
||
*/
|
||
setEditItem(item: GraphicItem): void;
|
||
protected clearCtrPint(): void;
|
||
protected addCtrPoint(position: GeoPoint): void;
|
||
protected createItem(item: GraphicItem): void;
|
||
protected setCtrlActive(item: GraphicItem, val: boolean): void;
|
||
clear(): void;
|
||
getPositions(): Array<GeoPoint>;
|
||
/**
|
||
* 设置根据坐标获取活动id
|
||
* @param x
|
||
* @param y
|
||
*/
|
||
getActiveIndex(x: any, y: any): any;
|
||
private _screenPixel;
|
||
protected _getLengthByMouse(diff: any, heightCoeficient?: number): number;
|
||
/**
|
||
* 取消活动控制点选择
|
||
*/
|
||
cancelActive(index: any): void;
|
||
/**
|
||
* 获取被编辑对象是否贴地
|
||
* @param item
|
||
*/
|
||
isClamp(item: GraphicItem): boolean;
|
||
updateCtrlPts(editItem: GraphicItem): void;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class CircularEditor extends BaseEditor {
|
||
private _geoPoints;
|
||
/**
|
||
* 计算圆半径控制点
|
||
* @param center 圆心坐标
|
||
* @param r 圆半径
|
||
*/
|
||
private getRadiusCtrlPoint;
|
||
private build;
|
||
setEditItem(item: GraphicItem): void;
|
||
updateCtrlPts(editItem: GraphicItem): void;
|
||
getPositions(): GeoPoint[];
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class CylinderDynamicEditor extends BaseEditor {
|
||
setEditItem(item: CylinderDynamicGraphic): void;
|
||
getPositions(): any[];
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class EditorManager extends Event {
|
||
private _isCreating;
|
||
private _isEditting;
|
||
private _viewer;
|
||
private _editItem;
|
||
private _controlPointSet;
|
||
private _currentEditor;
|
||
private _itemChangeListenerFun;
|
||
private _editorClickListenerFun;
|
||
private _editorMouseLeftUpFun;
|
||
private _editorOwnerElement;
|
||
private _wholeEditor;
|
||
private _handler;
|
||
_graphicLayer: GraphicLayer;
|
||
constructor(viewer: Cesium.Viewer, graphicLayer: GraphicLayer);
|
||
/**
|
||
* 是否是创建状态
|
||
*/
|
||
isCreating: boolean;
|
||
readonly isEditting: boolean;
|
||
/**
|
||
* 事件句柄
|
||
*/
|
||
getHandler(): Cesium.ScreenSpaceEventHandler;
|
||
/**
|
||
* 编辑开启
|
||
*/
|
||
open(): void;
|
||
/**
|
||
* 编辑关闭
|
||
*/
|
||
close(): void;
|
||
/**
|
||
* 获取控制点集对象
|
||
*/
|
||
readonly controlPointSet: ControlPointSet;
|
||
private getEditorByType;
|
||
setCursor(cursor: any): void;
|
||
/**
|
||
* 设置编辑对象
|
||
*/
|
||
setEditItem(item: GraphicItem): void;
|
||
/**
|
||
* 设置编辑器按钮所在的dom
|
||
*/
|
||
setEditorOwnerElement(element: Element): void;
|
||
/**
|
||
* 图形修改监听器
|
||
*/
|
||
setItemRealTimeChangeListener(fun: Function): void;
|
||
/**
|
||
* 删除图形修改监听器
|
||
*/
|
||
removeItemRealTimeChangeListener(): void;
|
||
/**
|
||
* 设置点击监听器
|
||
*/
|
||
setEditorClickListener(fun: any): void;
|
||
/**
|
||
* 删除点击监听器
|
||
*/
|
||
removeEditorClickListener(): void;
|
||
/**
|
||
* 设置鼠标左键弹起时的监听器
|
||
*/
|
||
setEditorMouseLeftUpListener(fun: Function): void;
|
||
/**
|
||
* 删除鼠标左键弹起时的监听器
|
||
*/
|
||
removeEditorMouseLeftUpListener(): void;
|
||
/**
|
||
* 获取编辑对象
|
||
*/
|
||
getEditItem(): GraphicItem;
|
||
/**
|
||
* @description: 打开屏幕文本框的编辑状态
|
||
* @param {ScreenTextGraphic} graphic
|
||
* @return {*}
|
||
*/
|
||
openScreenTextEdit(graphic: ScreenTextGraphic): void;
|
||
private _openScreenTextsEdit;
|
||
private _closeScreenTextEdit;
|
||
private _openScreenTextEdit;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class EllipseEditor extends BaseEditor {
|
||
private _geoPoints;
|
||
/**
|
||
* 计算圆半径控制点
|
||
* @param center 圆心坐标
|
||
* @param r 圆半径
|
||
* @param angle 角度值(0度为正北方向,90度为正东方向,180度为正南方向,270度为正西方向)
|
||
*/
|
||
private getRadiusCtrlPoint;
|
||
private build;
|
||
setEditItem(item: GraphicItem): void;
|
||
updateCtrlPts(editItem: GraphicItem): void;
|
||
getPositions(): GeoPoint[];
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class FlagEditor extends BaseEditor {
|
||
constructor(viewer: Cesium.Viewer, father: EditorManager);
|
||
initScreenEditor(): void;
|
||
setEditItem(item: GraphicItem): void;
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class LabelBillboardEditor extends BaseEditor {
|
||
private startMove;
|
||
constructor(viewer: Cesium.Viewer, father: EditorManager);
|
||
initScreenEditor(): void;
|
||
setEditItem(item: GraphicItem): void;
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class LabelRectEditor extends BaseEditor {
|
||
constructor(viewer: Cesium.Viewer, father: EditorManager);
|
||
initScreenEditor(): void;
|
||
setEditItem(item: GraphicItem): void;
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class LineEditor extends BaseEditor {
|
||
protected _picker: Picking;
|
||
constructor(viewer: Cesium.Viewer, father: EditorManager);
|
||
/**
|
||
* 获取插入顶点的位置
|
||
* @param p0
|
||
* @param editItem
|
||
*/
|
||
private getInsertIndex;
|
||
setEditItem(editItem: GraphicItem): void;
|
||
clear(): void;
|
||
getPositions(): any;
|
||
updateCtrlPts(editItem: GraphicItem): void;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class ObliqueEditor extends BaseEditor {
|
||
constructor(viewer: Cesium.Viewer, father: EditorManager);
|
||
initScreenEditor(): void;
|
||
setEditItem(item: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class PointEditor extends BaseEditor {
|
||
setEditItem(editItem: GraphicItem): void;
|
||
getPositions(): Array<GeoPoint>;
|
||
updateCtrlPts(editItem: GraphicItem): void;
|
||
}
|
||
|
||
class PolygonEditor extends LineEditor {
|
||
setEditItem(editItem: GraphicItem): void;
|
||
getPositions(): any;
|
||
private getHeightEditVisible;
|
||
updateCtrlPts(editItem: GraphicItem): void;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class RectangleEditor extends BaseEditor {
|
||
setEditItem(item: GraphicItem): void;
|
||
updateCtrlPts(editItem: GraphicItem): void;
|
||
getPositions(): any;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class ScreenEditor {
|
||
private _operatorContainer;
|
||
private _viewer;
|
||
private _operators;
|
||
private _isOpen;
|
||
private _divContainer;
|
||
getCenterCallback: any;
|
||
ctrlPtsUpdateCallback: any;
|
||
moveDivContainer: () => void;
|
||
mousemove: (event: any) => void;
|
||
mouseup: (event: any) => void;
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**获取地理画布(即按钮容器div的父容器) */
|
||
private getOwnerElement;
|
||
setOwnerElement(element: Element): void;
|
||
/**
|
||
* 设置按钮属性
|
||
*/
|
||
setOperators(operators: Array<Operator>): void;
|
||
/**
|
||
* 设置回调函数(函数作用:获取标绘中心点,屏幕坐标)
|
||
*/
|
||
centerCallback: Function;
|
||
/**
|
||
* 设置回调函数(函数作用:更新所有的控制点)
|
||
*/
|
||
updateCtrlPtsCallback: Function;
|
||
/**
|
||
* 开启操作
|
||
*/
|
||
open(): void;
|
||
/**
|
||
* 关闭操作
|
||
*/
|
||
close(): void;
|
||
/**
|
||
* 清除
|
||
*/
|
||
_clear(): void;
|
||
/**
|
||
* 初始化面板
|
||
*/
|
||
private _createOperators;
|
||
}
|
||
class Operator {
|
||
Image: string;
|
||
ToolTip: string;
|
||
Operator: Function;
|
||
CanOperator?: Function;
|
||
htmlElement?: HTMLElement;
|
||
}
|
||
|
||
class ScreenTextEditor extends BaseEditor {
|
||
setEditItem(editItem: GraphicItem): void;
|
||
clear(): void;
|
||
protected getHandler(): any;
|
||
protected clearCtrPint(): void;
|
||
protected addCtrPoint(): void;
|
||
protected createItem(item: GraphicItem): void;
|
||
protected controlPointList(): any[];
|
||
protected setCtrlActive(item: GraphicItem, val: boolean): void;
|
||
getPositions(): any[];
|
||
getActiveIndex(x: any, y: any): number;
|
||
protected _getLengthByMouse(diff: any, heightCoeficient?: number): number;
|
||
cancelActive(index: any): void;
|
||
isClamp(item: GraphicItem): boolean;
|
||
updateCtrlPts(editItem: GraphicItem): void;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class WholeEditor {
|
||
private _viewer;
|
||
private _editItem;
|
||
private _screenEditor;
|
||
constructor(viewer: Cesium.Viewer);
|
||
initScreenEditor(): void;
|
||
setEditorOwnerElement(element: Element): void;
|
||
/**通过设置所编辑的标绘对象来激活当前编辑器 */
|
||
setEditItem(item: GraphicItem): void;
|
||
/**
|
||
* 设置回调函数(函数作用:更新所有的控制点)
|
||
*/
|
||
updateCtrlPtsCallback: Function;
|
||
clear(): void;
|
||
/**
|
||
* 根据屏幕移动修改heading
|
||
* @param start
|
||
* @param end
|
||
*/
|
||
rotateByHeading(start: Cesium.Cartesian2, end: Cesium.Cartesian2): void;
|
||
/**
|
||
* 根据屏幕移动修改Pich
|
||
* @param start
|
||
* @param end
|
||
*/
|
||
rotateByPitch(start: Cesium.Cartesian2, end: Cesium.Cartesian2): void;
|
||
/**
|
||
* 根据屏幕移动修改Roll
|
||
* @param start
|
||
* @param end
|
||
*/
|
||
rotateByRoll(start: Cesium.Cartesian2, end: Cesium.Cartesian2): void;
|
||
/**
|
||
* 水平移动
|
||
* @param start
|
||
* @param end
|
||
*/
|
||
movePosition(start: any, end: any): void;
|
||
private _screenPixel;
|
||
private _getLengthByMouse;
|
||
/**
|
||
* 垂直移动
|
||
* @param start
|
||
* @param end
|
||
*/
|
||
moveHeight(start: any, end: any): void;
|
||
/**
|
||
* 放大缩小
|
||
* @param start
|
||
* @param end
|
||
*/
|
||
moveScale(start: any, end: any): void;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class BaseControlPoint {
|
||
protected _group: GraphicGroup;
|
||
protected _index: number;
|
||
protected _position: GeoPoint;
|
||
protected _text: string;
|
||
protected _showText: boolean;
|
||
protected _isFormat: boolean;
|
||
protected _viewer: any;
|
||
constructor(viewer: Cesium.Viewer, group: GraphicGroup, position: GeoPoint, index: number, text?: string);
|
||
/**
|
||
* 初始化控制点
|
||
*/
|
||
init(position: GeoPoint): void;
|
||
/**
|
||
* 设置索引
|
||
* @param index
|
||
*/
|
||
setIndex(index: number): void;
|
||
/**
|
||
* 设置控制点是否可见
|
||
* @param b
|
||
*/
|
||
setVisible(b: boolean): void;
|
||
/**
|
||
* 获取文本标签是否可见
|
||
*/
|
||
getLabelVisible(): boolean;
|
||
/**
|
||
* 设置文本标签是否可见
|
||
* @param b
|
||
*/
|
||
setLabelVisible(b: boolean): void;
|
||
/**
|
||
* 设置标签文本是否格式化为度分秒格式
|
||
* @param b
|
||
*/
|
||
setLabelFormat(b: boolean): void;
|
||
/**
|
||
* 更新位置和文本
|
||
* @param position 位置
|
||
* @param text 文本
|
||
*/
|
||
setPosition(position: GeoPoint, text?: string): void;
|
||
getPosition(): GeoPoint;
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class ControlPoint extends BaseControlPoint {
|
||
private _graphics;
|
||
private _decimal;
|
||
private _labelText;
|
||
static highlightColor: string;
|
||
static normalColor: string;
|
||
static removeColor: string;
|
||
constructor(viewer: Cesium.Viewer, group: GraphicGroup, position: GeoPoint, index: number, text: string);
|
||
/**
|
||
*@ignore
|
||
* 初始化控制点
|
||
*/
|
||
init(position: GeoPoint): void;
|
||
private buildPositionText;
|
||
private buildPositionText_DegreeMinutesSecond;
|
||
/**
|
||
* 设置索引
|
||
* @param index
|
||
*/
|
||
setIndex(index: number): void;
|
||
/**
|
||
* 设置控制点是否可见
|
||
* @param b
|
||
*/
|
||
setVisible(b: boolean): void;
|
||
/**
|
||
* 设置文本标签是否可见
|
||
* @param b
|
||
*/
|
||
setLabelVisible(b: boolean): void;
|
||
/**
|
||
* 设置标签文本是否格式化为度分秒格式
|
||
* @param b
|
||
*/
|
||
setLabelFormat(b: boolean): void;
|
||
/**
|
||
* 更新位置和文本
|
||
* @param position 位置
|
||
* @param text 文本
|
||
*/
|
||
setPosition(position: GeoPoint, text?: string): void;
|
||
/**
|
||
* 设置编辑工具的颜色
|
||
* @param item 编辑工具对象
|
||
* @param val 是否处于激活状态(编辑工具被鼠标点中激活)
|
||
*/
|
||
static setCtrlActive(item: GraphicItem, val: boolean): void;
|
||
/**
|
||
* 设置关键点控高billboard的显隐
|
||
* @param bool
|
||
*/
|
||
setHeightEditVisible(bool: boolean): void;
|
||
/**
|
||
* 设置关键点删除billboard的显隐
|
||
* @param bool
|
||
*/
|
||
setRemoveEditVisible(bool: boolean): void;
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class ControlPointSet {
|
||
private _viewer;
|
||
private _pointConstructor;
|
||
private _pointList;
|
||
private _validPtNum;
|
||
private _labelVisible;
|
||
private _labelFormat;
|
||
private _group;
|
||
_graphicLayer: GraphicLayer;
|
||
constructor(viewer: Cesium.Viewer, graphicLayer: GraphicLayer);
|
||
/**
|
||
* 设置控制点模板
|
||
* @param value
|
||
*/
|
||
setPointConstructor(value: BaseControlPoint): void;
|
||
/**
|
||
* 添加控制点
|
||
* @param point
|
||
* @param text 显示的文本
|
||
*/
|
||
add(point: GeoPoint, text?: string): void;
|
||
/**
|
||
* 设置最后一个点的位置(若没有点,则添加一个点)
|
||
*/
|
||
setPosition(point: GeoPoint, text?: string): void;
|
||
/**
|
||
* 修改指定索引点的位置
|
||
*/
|
||
updatePosition(point: GeoPoint, index: number, text?: string): void;
|
||
/**
|
||
* 获取控制点列表
|
||
*/
|
||
getList(): BaseControlPoint[];
|
||
/**
|
||
* 获取有效顶点数
|
||
*/
|
||
getValidPtNum(): number;
|
||
/**
|
||
* 设置控制点状态
|
||
* @param val
|
||
*/
|
||
setCtrlActive(item: any, val: any): void;
|
||
/**
|
||
* 设置关键点控高billboard的显隐
|
||
* @param b 是否可见
|
||
* @param index 大于0表示设置指定索引点,小于0表示设置所有点
|
||
*/
|
||
setHeightEditVisible(b: boolean, index?: number): void;
|
||
/**
|
||
* 设置指定索引点的
|
||
* @param b 是否可见
|
||
* @param index 大于0表示设置指定索引点,小于0表示设置所有点
|
||
*/
|
||
setRemoveEditVisible(b: boolean, index?: number): void;
|
||
/**
|
||
* 设置文本标签是否显示
|
||
* @param b
|
||
*/
|
||
setLabelVisible(b: boolean): void;
|
||
/**
|
||
* 设置文本标签经纬度的显示是否格式化为度分秒格式
|
||
* @param b
|
||
*/
|
||
setLabelFormat(b: boolean): void;
|
||
clear(): void;
|
||
updateCtrPositions(positions: Array<GeoPoint>): void;
|
||
}
|
||
|
||
let gv: {
|
||
Version: string;
|
||
Item: typeof Item;
|
||
Layer: typeof Layer;
|
||
Event: typeof Event;
|
||
GeoCanvas: typeof GeoCanvas;
|
||
Calculate: typeof Calculate;
|
||
Check: typeof Check;
|
||
GeoPoint: typeof GeoPoint;
|
||
ViewPoint: typeof ViewPoint;
|
||
Util: typeof Util;
|
||
LayerManager: typeof LayerManager;
|
||
SceneOptions: typeof SceneOptions;
|
||
WeatherEnmu: typeof WeatherEnmu;
|
||
LevelCodeEnum: typeof LevelCodeEnum;
|
||
HeightReferenceEnum: typeof HeightReferenceEnum;
|
||
PluginManager: typeof PluginManager;
|
||
GraphicLayer: typeof GraphicLayer;
|
||
SatelliteLayer: typeof SatelliteLayer;
|
||
ImageLayer: typeof ImageLayer;
|
||
TargetLayer: typeof TargetLayer;
|
||
TargetItem: typeof TargetItem;
|
||
TargetState: typeof TargetState;
|
||
TargetStyle: typeof TargetStyle;
|
||
TargetHistory: typeof TargetHistory;
|
||
TileLayer: typeof TileLayer;
|
||
SpaceDebris: typeof SpaceDebris;
|
||
SpaceDebrisOpt: typeof SpaceDebrisOpt;
|
||
Windy: typeof Windy;
|
||
Cluster: typeof Cluster;
|
||
ClusterOpt: typeof ClusterOpt;
|
||
Canvas2Image: typeof Canvas2Image;
|
||
HeatMap: typeof HeatMap;
|
||
HeatMapOpt: typeof HeatMapOpt;
|
||
MapV: typeof MapV;
|
||
MapVOpt: typeof MapVOpt;
|
||
MassiveLines: typeof MassiveLines;
|
||
MassiveLinesOpt: typeof MassiveLinesOpt;
|
||
MassivePoints: typeof MassivePoints;
|
||
PointOption: typeof PointOption;
|
||
PointStyle: typeof PointStyle;
|
||
MassivePolygons: typeof MassivePolygons;
|
||
MassivePolygonOpt: typeof MassivePolygonOpt;
|
||
PlaceNameTile: typeof PlaceNameTile;
|
||
PlaceNameTileOpt: typeof PlaceNameTileOpt;
|
||
JQPlaceNameTile: typeof JQPlaceNameTile;
|
||
PlaceFontStyle: typeof PlaceFontStyle;
|
||
PolygonTileOpt: typeof PolygonTileOpt;
|
||
PolygonTile: typeof PolygonTile;
|
||
IconTile: typeof IconTile;
|
||
IconTileOpt: typeof IconTileOpt;
|
||
ObliqueTile: typeof ObliqueTile;
|
||
TileScaleImageProvider: any;
|
||
LineTile: typeof LineTile;
|
||
LineTileOpt: typeof LineTileOpt;
|
||
VectorTileItem: typeof VectorTileItem;
|
||
VectorTileItemOpt: typeof VectorTileItemOpt;
|
||
Satellite: typeof Satellite;
|
||
SatelliteOpt: typeof SatelliteOpt;
|
||
StatelliteEnum: typeof StatelliteEnum;
|
||
SatelliteOrbitType: typeof SatelliteOrbitType;
|
||
SatelliteComponents: typeof SatelliteComponents;
|
||
PointGraphic: typeof PointGraphic;
|
||
CylinderDynamicGraphic: typeof CylinderDynamicGraphic;
|
||
CylinderDynamicGraphicOpt: typeof CylinderDynamicGraphicOpt;
|
||
SectorGraphic: typeof SectorGraphic;
|
||
SectorGraphicOpt: typeof SectorGraphicOpt;
|
||
WeatherGraphic: typeof WeatherGraphic;
|
||
WeatherGraphicOpt: typeof WeatherGraphicOpt;
|
||
WaterGraphic: typeof WaterGraphic;
|
||
WaterGraphicOpt: typeof WaterGraphicOpt;
|
||
PolylineGraphic: typeof PolylineGraphic;
|
||
PolylineGraphicOpt: typeof PolylineGraphicOpt;
|
||
ColorStyle: typeof ColorStyle;
|
||
ArrowStyle: typeof ArrowStyle;
|
||
OutlineStyle: typeof OutlineStyle;
|
||
DashStyle: typeof DashStyle;
|
||
GlowStyle: typeof GlowStyle;
|
||
DynamicStyle: typeof DynamicStyle;
|
||
TextureStyle: typeof TextureStyle;
|
||
DynamicIconEnum: typeof DynamicIconEnum;
|
||
TextureIconEnum: typeof TextureIconEnum;
|
||
PolylineStyleEnum: typeof PolylineStyleEnum;
|
||
BezierLineGraphic: typeof BezierLineGraphic;
|
||
BezierLineGraphicOpt: typeof BezierLineGraphicOpt;
|
||
ParabolaLineGraphic: typeof ParabolaLineGraphic;
|
||
ParabolaLineGraphicOpt: typeof ParabolaLineGraphicOpt;
|
||
ArcTypeEnum: typeof ArcTypeEnum;
|
||
BubbleGraphic: typeof BubbleGraphic;
|
||
BubbleGraphicOpt: typeof BubbleGraphicOpt;
|
||
BubbleTypeEnum: typeof BubbleTypeEnum;
|
||
LabelGraphic: typeof LabelGraphic;
|
||
LabelGraphicOpt: typeof LabelGraphicOpt;
|
||
ModelGraphic: typeof ModelGraphic;
|
||
ModelGraphicOpt: typeof ModelGraphicOpt;
|
||
BillboardGraphic: typeof BillboardGraphic;
|
||
BillboardGraphicOpt: typeof BillboardGraphicOpt;
|
||
ScanGraphic: typeof ScanGraphic;
|
||
ScanGraphicOpt: typeof ScanGraphicOpt;
|
||
SensorGraphic: typeof SensorGraphic;
|
||
SensorGraphicOpt: typeof SensorGraphicOpt;
|
||
SpreadGraphic: typeof SpreadGraphic;
|
||
SpreadGraphicOpt: typeof SpreadGraphicOpt;
|
||
EllipseGraphic: typeof EllipseGraphic;
|
||
EllipseGraphicOpt: typeof EllipseGraphicOpt;
|
||
RectangleGraphic: typeof RectangleGraphic;
|
||
RectangleGraphicOpt: typeof RectangleGraphicOpt;
|
||
EllipsoidGraphic: typeof EllipsoidGraphic;
|
||
EllipsoidGraphicOpt: typeof EllipsoidGraphicOpt;
|
||
SphereGraphic: typeof SphereGraphic;
|
||
SphereGraphicOpt: typeof SphereGraphicOpt;
|
||
WallGraphic: typeof WallGraphic;
|
||
WallGraphicOpt: typeof WallGraphicOpt;
|
||
PipelineManager: typeof PipelineManager;
|
||
PipelineGraphic: typeof PipelineGraphic;
|
||
PipelineStripGraphic: typeof PipelineStripGraphic;
|
||
PipelineGraphicOpt: typeof PipelineGraphicOpt;
|
||
PipelineTurnGraphic: typeof PipelineTurnGraphic;
|
||
PipelineTurnGraphicOpt: typeof PipelineTurnGraphicOpt;
|
||
PipeTurnTwoGraphic: typeof PipeTurnTwoGraphic;
|
||
PipeTurnThreeGraphic: typeof PipeTurnThreeGraphic;
|
||
VolumePolylineGraphic: typeof VolumePolylineGraphic;
|
||
VolumePolylineGraphicOpt: typeof VolumePolylineGraphicOpt;
|
||
CylinderGraphic: typeof CylinderGraphic;
|
||
CylinderGraphicOpt: typeof CylinderGraphicOpt;
|
||
RadarGraphic: typeof RadarGraphic;
|
||
RadarGraphicOpt: typeof RadarGraphicOpt;
|
||
DynamicRippleGraphicOpt: typeof DynamicRippleGraphicOpt;
|
||
DynamicRippleGraphic: typeof DynamicRippleGraphic;
|
||
GraphicGroup: typeof GraphicGroup;
|
||
PolygonGraphic: typeof PolygonGraphic;
|
||
PolygonGraphicOpt: typeof PolygonGraphicOpt;
|
||
FlagGraphic: typeof FlagGraphic;
|
||
FlagGraphicOpt: typeof FlagGraphicOpt;
|
||
PluginView: typeof PluginView;
|
||
Tool: typeof Tool;
|
||
Widget: typeof Widget;
|
||
PopoverGraphic: typeof PopoverGraphic;
|
||
PopoverGraphicOpt: typeof PopoverGraphicOpt;
|
||
JBLineGraphic: typeof JBLineGraphic;
|
||
JBLineGraphicOpt: typeof JBLineGraphicOpt;
|
||
JBPointGraphic: typeof JBPointGraphic;
|
||
JBPointGraphicOpt: typeof JBPointGraphicOpt;
|
||
JBRenderModeEnum: typeof JBRenderModeEnum;
|
||
CircularGraphic: typeof CircularGraphic;
|
||
CircularGraphicOpt: typeof CircularGraphicOpt;
|
||
Path: typeof Path;
|
||
PathManager: typeof PathManager;
|
||
TriangleMeshGraphicOpt: typeof TriangleMeshGraphicOpt;
|
||
TriangleMeshGraphic: typeof TriangleMeshGraphic;
|
||
TerrainLayerCollection: typeof TerrainLayerCollection;
|
||
TerrainItem: typeof TerrainItem;
|
||
iCenter: typeof iCenter;
|
||
Analysis: typeof Analysis;
|
||
Camera: typeof Camera;
|
||
MeasureAreaOpt: typeof MeasureAreaOpt;
|
||
MeasureDistanceOpt: typeof MeasureDistanceOpt;
|
||
FloodAnalysisOpt: typeof FloodAnalysisOpt;
|
||
CustomLabelGraphic: typeof CustomLabelGraphic;
|
||
CustomLabelGraphicOpt: typeof CustomLabelGraphicOpt;
|
||
IntervisibilityAnalysis: typeof IntervisibilityAnalysis;
|
||
HideAnalysis: typeof HideAnalysis;
|
||
PathAnalysis: typeof PathAnalysis;
|
||
PolygonVisiableAnalysis: typeof PolygonVisiableAnalysis;
|
||
SlopeAnalysis: typeof SlopeAnalysis;
|
||
SkylineAnalyze: typeof SkylineAnalyze;
|
||
SkylineOption: typeof SkylineOption;
|
||
PlaceNameService: typeof PlaceNameService;
|
||
BufferAnalysis: typeof BufferAnalysis;
|
||
LabelBillboardGraphic: typeof LabelBillboardGraphic;
|
||
LabelBillboardGraphicOpt: typeof LabelBillboardGraphicOpt;
|
||
LabelRectGraphic: typeof LabelRectGraphic;
|
||
LabelRectGraphicOpt: typeof LabelRectGraphicOpt;
|
||
BackLineMode: typeof BackLineMode;
|
||
DePluginManager: typeof DePluginManager;
|
||
DePluginViewManager: typeof DePluginViewManager;
|
||
BilTerrainProvider: any;
|
||
TMSTerrainProvider: typeof TMSTerrainProvider;
|
||
BaiduImageryProvider: typeof BaiduImageryProvider;
|
||
GVDocument: typeof GVDocument;
|
||
DashBoardGraphic: typeof DashBoardGraphic;
|
||
DashGraphicOpt: typeof DashGraphicOpt;
|
||
BindedCylinderGraphic: typeof BindedCylinderGraphic;
|
||
BindedCylinderOpt: typeof BindedCylinderOpt;
|
||
GradientSectorGraphic: typeof GradientSectorGraphic;
|
||
GradientSectorGraphicOpt: typeof GradientSectorGraphicOpt;
|
||
CompoundImage: typeof CompoundImage;
|
||
HDVImageOption: typeof HDVImageOption;
|
||
MapSheet: typeof MapSheet;
|
||
MapBox: typeof MapBox;
|
||
MapBoxOpt: typeof MapBoxOpt;
|
||
StaticMapBox: typeof StaticMapBox;
|
||
StaticMapBoxOpt: typeof StaticMapBoxOpt;
|
||
PathPlanning: typeof PathPlanning;
|
||
PathPlanningOpt: typeof PathPlanningOpt;
|
||
ObliqueGraphic: typeof ObliqueGraphic;
|
||
ObliqueGraphicOpt: typeof ObliqueGraphicOpt;
|
||
GeoVector3: typeof GeoVector3;
|
||
ViewShedPrimitive: typeof ViewShedPrimitive;
|
||
PbfImageryProvider: any;
|
||
createMapBoxStyle: any;
|
||
ArcGisImagery: typeof ArcGisImagery;
|
||
ArcGisImageryOpt: typeof ArcGisImageryOpt;
|
||
BingImagery: typeof BingImagery;
|
||
BingImageryOpt: typeof BingImageryOpt;
|
||
OSMImagery: typeof OSMImagery;
|
||
OSMImageryOpt: typeof OSMImageryOpt;
|
||
UrlTemplateImagery: typeof UrlTemplateImagery;
|
||
UrlTemplateImageryOpt: typeof UrlTemplateImageryOpt;
|
||
WMSImagery: typeof WMSImagery;
|
||
WMSImageryOpt: typeof WMSImageryOpt;
|
||
WMTSImagery: typeof WMTSImagery;
|
||
WMTSImageryOpt: typeof WMTSImageryOpt;
|
||
KMLLayer: typeof KMLLayer;
|
||
KMLLayerOpt: typeof KMLLayerOpt;
|
||
GeoJsonLayer: typeof GeoJsonLayer;
|
||
GeoJsonLayerOpt: typeof GeoJsonLayerOpt;
|
||
Cesium3DTileLayer: typeof Cesium3DTileLayer;
|
||
Cesium3DTileLayerOpt: typeof Cesium3DTileLayerOpt;
|
||
BuildingMesh: typeof BuildingMesh;
|
||
ODLine: typeof ODLine;
|
||
SpreadCylinder: typeof SpreadCylinder;
|
||
SpreadCylinderOpt: typeof SpreadCylinderOpt;
|
||
DefenseEllipsoid: typeof DefenseEllipsoid;
|
||
CustomTilesetShader: typeof CustomTilesetShader;
|
||
SpecularReflection: typeof SpecularReflection;
|
||
RotatingPentahedron: typeof RotatingPentahedron;
|
||
FlowLine: typeof FlowLine;
|
||
CylinderGeometry: typeof CylinderGeometry;
|
||
FlowTube: typeof FlowTube;
|
||
FlowTubeOpt: typeof FlowTubeOpt;
|
||
DiffusionCircles: typeof DiffusionCircles;
|
||
Pentahedron: typeof Pentahedron;
|
||
TruncatedCone: typeof TruncatedCone;
|
||
ParticleOrbitingCone: typeof ParticleOrbitingCone;
|
||
EarthTheme: typeof EarthTheme;
|
||
SkyboxTheme: typeof SkyboxTheme;
|
||
ActionLayer: typeof ActionLayer;
|
||
PathAction: typeof PathAction;
|
||
CameraAction: typeof CameraAction;
|
||
VisibleAction: typeof VisibleAction;
|
||
FlickerAction: typeof FlickerAction;
|
||
FadeOutAction: typeof FadeOutAction;
|
||
ScaleAction: typeof ScaleAction;
|
||
IconGraphicOpt: typeof IconGraphicOpt;
|
||
CircleIconGraphic: typeof CircleIconGraphic;
|
||
WaveIconGraphic: typeof WaveIconGraphic;
|
||
WarnIconGraphic: typeof WarnIconGraphic;
|
||
WaterFaceGraphicOpt: typeof WaterFaceGraphicOpt;
|
||
WaterFaceGraphic: typeof WaterFaceGraphic;
|
||
AttractPointGraphic: typeof AttractPointGraphic;
|
||
AttractPointGraphicOpt: typeof AttractPointGraphicOpt;
|
||
TruncatedConeGraphic: typeof TruncatedConeGraphic;
|
||
TruncatedConeGraphicOpt: typeof TruncatedConeGraphicOpt;
|
||
TruncatedConeParticleGraphic: typeof TruncatedConeParticleGraphic;
|
||
TruncatedConeParticleGraphicOpt: typeof TruncatedConeParticleGraphicOpt;
|
||
SpreadCircleGraphic: typeof SpreadCircleGraphic;
|
||
SpreadCircleGraphicOpt: typeof SpreadCircleGraphicOpt;
|
||
SpreadCircleLineGraphic: typeof SpreadCircleLineGraphic;
|
||
SpreadCircleLineGraphicOpt: typeof SpreadCircleLineGraphicOpt;
|
||
SpreadCircleLineEnum: typeof SpreadCircleLineEnum;
|
||
SpreadCircleClampGraphic: typeof SpreadCircleClampGraphic;
|
||
SpreadCircleRampGraphic: typeof SpreadCircleRampGraphic;
|
||
SpreadCircleRampGraphicOpt: typeof SpreadCircleRampGraphicOpt;
|
||
SpreadCircleRingGraphic: typeof SpreadCircleRingGraphic;
|
||
SpreadCircleRingGraphicOpt: typeof SpreadCircleRingGraphicOpt;
|
||
SpreadCircleRingEnum: typeof SpreadCircleRingEnum;
|
||
FlowWallGraphic: typeof FlowWallGraphic;
|
||
FlowWallGraphicOpt: typeof FlowWallGraphicOpt;
|
||
DirEnum: typeof DirEnum;
|
||
GeoSotLayer: typeof GeoSotLayer;
|
||
GroundClippingAnalysis: typeof GroundClippingAnalysis;
|
||
NuclearProtectionAnalysis: typeof NuclearProtectionAnalysis;
|
||
MorphologicAnalysis: typeof MorphologicAnalysis;
|
||
MorphologicModelEnum: typeof MorphologicModelEnum;
|
||
SelectionTool: typeof SelectionTool;
|
||
BlastGraphic: typeof BlastGraphic;
|
||
BlastGraphicOpt: typeof BlastGraphicOpt;
|
||
FireGraphic: typeof FireGraphic;
|
||
FireGraphicOpt: typeof FireGraphicOpt;
|
||
FireGraphicEnum: typeof FireGraphicEnum;
|
||
ColorTable: typeof ColorTable;
|
||
CloundLayer: typeof CloundLayer;
|
||
ScreenTextGraphic: typeof ScreenTextGraphic;
|
||
ScreenTextGraphicOpt: typeof ScreenTextGraphicOpt;
|
||
FirstPersonControl: typeof FirstPersonControl;
|
||
FogPlane: typeof FogPlane;
|
||
BDTileLayer: typeof BDTileLayer;
|
||
};
|
||
|
||
|
||
|
||
let gv: {
|
||
Version: string;
|
||
Item: typeof Item;
|
||
Layer: typeof Layer;
|
||
Event: typeof Event;
|
||
GeoCanvas: typeof GeoCanvas;
|
||
Calculate: typeof Calculate;
|
||
Check: typeof Check;
|
||
GeoPoint: typeof GeoPoint;
|
||
ViewPoint: typeof ViewPoint;
|
||
Util: typeof Util;
|
||
LayerManager: typeof LayerManager;
|
||
SceneOptions: typeof SceneOptions;
|
||
WeatherEnmu: typeof WeatherEnmu;
|
||
LevelCodeEnum: typeof LevelCodeEnum;
|
||
HeightReferenceEnum: typeof HeightReferenceEnum;
|
||
PluginManager: typeof PluginManager;
|
||
GraphicLayer: typeof GraphicLayer;
|
||
ImageLayer: typeof ImageLayer;
|
||
TileLayer: typeof TileLayer;
|
||
SpaceDebris: typeof SpaceDebris;
|
||
SpaceDebrisOpt: typeof SpaceDebrisOpt;
|
||
Windy: typeof Windy;
|
||
Cluster: typeof Cluster;
|
||
ClusterOpt: typeof ClusterOpt;
|
||
Canvas2Image: typeof Canvas2Image;
|
||
HeatMap: typeof HeatMap;
|
||
HeatMapOpt: typeof HeatMapOpt;
|
||
MapV: typeof MapV;
|
||
MapVOpt: typeof MapVOpt;
|
||
MassiveLines: typeof MassiveLines;
|
||
MassiveLinesOpt: typeof MassiveLinesOpt;
|
||
MassivePoints: typeof MassivePoints;
|
||
PointOption: typeof PointOption;
|
||
PointStyle: typeof PointStyle;
|
||
MassivePolygons: typeof MassivePolygons;
|
||
MassivePolygonOpt: typeof MassivePolygonOpt;
|
||
PlaceNameTile: typeof PlaceNameTile;
|
||
PlaceNameTileOpt: typeof PlaceNameTileOpt;
|
||
JQPlaceNameTile: typeof JQPlaceNameTile;
|
||
PlaceFontStyle: typeof PlaceFontStyle;
|
||
PolygonTileOpt: typeof PolygonTileOpt;
|
||
PolygonTile: typeof PolygonTile;
|
||
IconTile: typeof IconTile;
|
||
IconTileOpt: typeof IconTileOpt;
|
||
ObliqueTile: typeof ObliqueTile;
|
||
TileScaleImageProvider: any;
|
||
LineTile: typeof LineTile;
|
||
LineTileOpt: typeof LineTileOpt;
|
||
VectorTileItem: typeof VectorTileItem;
|
||
VectorTileItemOpt: typeof VectorTileItemOpt;
|
||
PointGraphic: typeof PointGraphic;
|
||
CylinderDynamicGraphic: typeof CylinderDynamicGraphic;
|
||
CylinderDynamicGraphicOpt: typeof CylinderDynamicGraphicOpt;
|
||
SectorGraphic: typeof SectorGraphic;
|
||
SectorGraphicOpt: typeof SectorGraphicOpt;
|
||
WeatherGraphic: typeof WeatherGraphic;
|
||
WeatherGraphicOpt: typeof WeatherGraphicOpt;
|
||
WaterGraphic: typeof WaterGraphic;
|
||
WaterGraphicOpt: typeof WaterGraphicOpt;
|
||
PolylineGraphic: typeof PolylineGraphic;
|
||
PolylineGraphicOpt: typeof PolylineGraphicOpt;
|
||
ColorStyle: typeof ColorStyle;
|
||
ArrowStyle: typeof ArrowStyle;
|
||
OutlineStyle: typeof OutlineStyle;
|
||
DashStyle: typeof DashStyle;
|
||
GlowStyle: typeof GlowStyle;
|
||
DynamicStyle: typeof DynamicStyle;
|
||
TextureStyle: typeof TextureStyle;
|
||
DynamicIconEnum: typeof DynamicIconEnum;
|
||
TextureIconEnum: typeof TextureIconEnum;
|
||
PolylineStyleEnum: typeof PolylineStyleEnum;
|
||
BezierLineGraphic: typeof BezierLineGraphic;
|
||
BezierLineGraphicOpt: typeof BezierLineGraphicOpt;
|
||
ParabolaLineGraphic: typeof ParabolaLineGraphic;
|
||
ParabolaLineGraphicOpt: typeof ParabolaLineGraphicOpt;
|
||
ArcTypeEnum: typeof ArcTypeEnum;
|
||
BubbleGraphic: typeof BubbleGraphic;
|
||
BubbleGraphicOpt: typeof BubbleGraphicOpt;
|
||
BubbleTypeEnum: typeof BubbleTypeEnum;
|
||
LabelGraphic: typeof LabelGraphic;
|
||
LabelGraphicOpt: typeof LabelGraphicOpt;
|
||
ModelGraphic: typeof ModelGraphic;
|
||
ModelGraphicOpt: typeof ModelGraphicOpt;
|
||
BillboardGraphic: typeof BillboardGraphic;
|
||
BillboardGraphicOpt: typeof BillboardGraphicOpt;
|
||
ScanGraphic: typeof ScanGraphic;
|
||
ScanGraphicOpt: typeof ScanGraphicOpt;
|
||
SensorGraphic: typeof SensorGraphic;
|
||
SensorGraphicOpt: typeof SensorGraphicOpt;
|
||
SpreadGraphic: typeof SpreadGraphic;
|
||
SpreadGraphicOpt: typeof SpreadGraphicOpt;
|
||
EllipseGraphic: typeof EllipseGraphic;
|
||
EllipseGraphicOpt: typeof EllipseGraphicOpt;
|
||
RectangleGraphic: typeof RectangleGraphic;
|
||
RectangleGraphicOpt: typeof RectangleGraphicOpt;
|
||
EllipsoidGraphic: typeof EllipsoidGraphic;
|
||
EllipsoidGraphicOpt: typeof EllipsoidGraphicOpt;
|
||
SphereGraphic: typeof SphereGraphic;
|
||
SphereGraphicOpt: typeof SphereGraphicOpt;
|
||
WallGraphic: typeof WallGraphic;
|
||
WallGraphicOpt: typeof WallGraphicOpt;
|
||
PipelineGraphic: typeof PipelineGraphic;
|
||
PipelineGraphicOpt: typeof PipelineGraphicOpt;
|
||
VolumePolylineGraphic: typeof VolumePolylineGraphic;
|
||
VolumePolylineGraphicOpt: typeof VolumePolylineGraphicOpt;
|
||
CylinderGraphic: typeof CylinderGraphic;
|
||
CylinderGraphicOpt: typeof CylinderGraphicOpt;
|
||
RadarGraphic: typeof RadarGraphic;
|
||
RadarGraphicOpt: typeof RadarGraphicOpt;
|
||
DynamicRippleGraphicOpt: typeof DynamicRippleGraphicOpt;
|
||
DynamicRippleGraphic: typeof DynamicRippleGraphic;
|
||
GraphicGroup: typeof GraphicGroup;
|
||
PolygonGraphic: typeof PolygonGraphic;
|
||
PolygonGraphicOpt: typeof PolygonGraphicOpt;
|
||
FlagGraphic: typeof FlagGraphic;
|
||
FlagGraphicOpt: typeof FlagGraphicOpt;
|
||
PluginView: typeof PluginView;
|
||
Tool: typeof Tool;
|
||
Widget: typeof Widget;
|
||
PopoverGraphic: typeof PopoverGraphic;
|
||
PopoverGraphicOpt: typeof PopoverGraphicOpt;
|
||
CircularGraphic: typeof CircularGraphic;
|
||
CircularGraphicOpt: typeof CircularGraphicOpt;
|
||
Path: typeof Path;
|
||
PathManager: typeof PathManager;
|
||
TriangleMeshGraphicOpt: typeof TriangleMeshGraphicOpt;
|
||
TriangleMeshGraphic: typeof TriangleMeshGraphic;
|
||
TerrainLayerCollection: typeof TerrainLayerCollection;
|
||
TerrainItem: typeof TerrainItem;
|
||
iCenter: typeof iCenter;
|
||
Camera: typeof Camera;
|
||
CustomLabelGraphic: typeof CustomLabelGraphic;
|
||
CustomLabelGraphicOpt: typeof CustomLabelGraphicOpt;
|
||
PlaceNameService: typeof PlaceNameService;
|
||
LabelBillboardGraphic: typeof LabelBillboardGraphic;
|
||
LabelBillboardGraphicOpt: typeof LabelBillboardGraphicOpt;
|
||
LabelRectGraphic: typeof LabelRectGraphic;
|
||
LabelRectGraphicOpt: typeof LabelRectGraphicOpt;
|
||
DePluginManager: typeof DePluginManager;
|
||
DePluginViewManager: typeof DePluginViewManager;
|
||
BilTerrainProvider: any;
|
||
TMSTerrainProvider: typeof TMSTerrainProvider;
|
||
BaiduImageryProvider: typeof BaiduImageryProvider;
|
||
GVDocument: typeof GVDocument;
|
||
DashBoardGraphic: typeof DashBoardGraphic;
|
||
DashGraphicOpt: typeof DashGraphicOpt;
|
||
BindedCylinderGraphic: typeof BindedCylinderGraphic;
|
||
BindedCylinderOpt: typeof BindedCylinderOpt;
|
||
GradientSectorGraphic: typeof GradientSectorGraphic;
|
||
GradientSectorGraphicOpt: typeof GradientSectorGraphicOpt;
|
||
CompoundImage: typeof CompoundImage;
|
||
HDVImageOption: typeof HDVImageOption;
|
||
MapSheet: typeof MapSheet;
|
||
MapBox: typeof MapBox;
|
||
MapBoxOpt: typeof MapBoxOpt;
|
||
StaticMapBox: typeof StaticMapBox;
|
||
StaticMapBoxOpt: typeof StaticMapBoxOpt;
|
||
PathPlanning: typeof PathPlanning;
|
||
PathPlanningOpt: typeof PathPlanningOpt;
|
||
ObliqueGraphic: typeof ObliqueGraphic;
|
||
ObliqueGraphicOpt: typeof ObliqueGraphicOpt;
|
||
GeoVector3: typeof GeoVector3;
|
||
PbfImageryProvider: any;
|
||
createMapBoxStyle: any;
|
||
ArcGisImagery: typeof ArcGisImagery;
|
||
ArcGisImageryOpt: typeof ArcGisImageryOpt;
|
||
BingImagery: typeof BingImagery;
|
||
BingImageryOpt: typeof BingImageryOpt;
|
||
OSMImagery: typeof OSMImagery;
|
||
OSMImageryOpt: typeof OSMImageryOpt;
|
||
UrlTemplateImagery: typeof UrlTemplateImagery;
|
||
UrlTemplateImageryOpt: typeof UrlTemplateImageryOpt;
|
||
WMSImagery: typeof WMSImagery;
|
||
WMSImageryOpt: typeof WMSImageryOpt;
|
||
WMTSImagery: typeof WMTSImagery;
|
||
WMTSImageryOpt: typeof WMTSImageryOpt;
|
||
KMLLayer: typeof KMLLayer;
|
||
KMLLayerOpt: typeof KMLLayerOpt;
|
||
GeoJsonLayer: typeof GeoJsonLayer;
|
||
GeoJsonLayerOpt: typeof GeoJsonLayerOpt;
|
||
Cesium3DTileLayer: typeof Cesium3DTileLayer;
|
||
Cesium3DTileLayerOpt: typeof Cesium3DTileLayerOpt;
|
||
BuildingMesh: typeof BuildingMesh;
|
||
ODLine: typeof ODLine;
|
||
SpreadCylinder: typeof SpreadCylinder;
|
||
SpreadCylinderOpt: typeof SpreadCylinderOpt;
|
||
DefenseEllipsoid: typeof DefenseEllipsoid;
|
||
CustomTilesetShader: typeof CustomTilesetShader;
|
||
SpecularReflection: typeof SpecularReflection;
|
||
RotatingPentahedron: typeof RotatingPentahedron;
|
||
FlowLine: typeof FlowLine;
|
||
CylinderGeometry: typeof CylinderGeometry;
|
||
FlowTube: typeof FlowTube;
|
||
FlowTubeOpt: typeof FlowTubeOpt;
|
||
DiffusionCircles: typeof DiffusionCircles;
|
||
Pentahedron: typeof Pentahedron;
|
||
TruncatedCone: typeof TruncatedCone;
|
||
ParticleOrbitingCone: typeof ParticleOrbitingCone;
|
||
EarthTheme: typeof EarthTheme;
|
||
SkyboxTheme: typeof SkyboxTheme;
|
||
ActionLayer: typeof ActionLayer;
|
||
PathAction: typeof PathAction;
|
||
CameraAction: typeof CameraAction;
|
||
VisibleAction: typeof VisibleAction;
|
||
FlickerAction: typeof FlickerAction;
|
||
FadeOutAction: typeof FadeOutAction;
|
||
ScaleAction: typeof ScaleAction;
|
||
IconGraphicOpt: typeof IconGraphicOpt;
|
||
CircleIconGraphic: typeof CircleIconGraphic;
|
||
WaveIconGraphic: typeof WaveIconGraphic;
|
||
WarnIconGraphic: typeof WarnIconGraphic;
|
||
WaterFaceGraphicOpt: typeof WaterFaceGraphicOpt;
|
||
WaterFaceGraphic: typeof WaterFaceGraphic;
|
||
AttractPointGraphic: typeof AttractPointGraphic;
|
||
AttractPointGraphicOpt: typeof AttractPointGraphicOpt;
|
||
TruncatedConeGraphic: typeof TruncatedConeGraphic;
|
||
TruncatedConeGraphicOpt: typeof TruncatedConeGraphicOpt;
|
||
TruncatedConeParticleGraphic: typeof TruncatedConeParticleGraphic;
|
||
TruncatedConeParticleGraphicOpt: typeof TruncatedConeParticleGraphicOpt;
|
||
SpreadCircleGraphic: typeof SpreadCircleGraphic;
|
||
SpreadCircleGraphicOpt: typeof SpreadCircleGraphicOpt;
|
||
SpreadCircleLineGraphic: typeof SpreadCircleLineGraphic;
|
||
SpreadCircleLineGraphicOpt: typeof SpreadCircleLineGraphicOpt;
|
||
SpreadCircleLineEnum: typeof SpreadCircleLineEnum;
|
||
SpreadCircleClampGraphic: typeof SpreadCircleClampGraphic;
|
||
SpreadCircleRampGraphic: typeof SpreadCircleRampGraphic;
|
||
SpreadCircleRampGraphicOpt: typeof SpreadCircleRampGraphicOpt;
|
||
SpreadCircleRingGraphic: typeof SpreadCircleRingGraphic;
|
||
SpreadCircleRingGraphicOpt: typeof SpreadCircleRingGraphicOpt;
|
||
SpreadCircleRingEnum: typeof SpreadCircleRingEnum;
|
||
FlowWallGraphic: typeof FlowWallGraphic;
|
||
FlowWallGraphicOpt: typeof FlowWallGraphicOpt;
|
||
DirEnum: typeof DirEnum;
|
||
GeoSotLayer: typeof GeoSotLayer;
|
||
GroundClippingAnalysis: typeof GroundClippingAnalysis;
|
||
NuclearProtectionAnalysis: typeof NuclearProtectionAnalysis;
|
||
MorphologicAnalysis: typeof MorphologicAnalysis;
|
||
MorphologicModelEnum: typeof MorphologicModelEnum;
|
||
SelectionTool: typeof SelectionTool;
|
||
BlastGraphic: typeof BlastGraphic;
|
||
BlastGraphicOpt: typeof BlastGraphicOpt;
|
||
FireGraphic: typeof FireGraphic;
|
||
FireGraphicOpt: typeof FireGraphicOpt;
|
||
FireGraphicEnum: typeof FireGraphicEnum;
|
||
ColorTable: typeof ColorTable;
|
||
CloundLayer: typeof CloundLayer;
|
||
ScreenTextGraphic: typeof ScreenTextGraphic;
|
||
ScreenTextGraphicOpt: typeof ScreenTextGraphicOpt;
|
||
FirstPersonControl: typeof FirstPersonControl;
|
||
};
|
||
|
||
|
||
/// <reference types="node" />
|
||
/**
|
||
* 二进制数据处理类
|
||
*/
|
||
class BinaryParser {
|
||
constructor();
|
||
static toBinary(data: Object): Buffer;
|
||
static fromBinary(result: ArrayBuffer): any;
|
||
}
|
||
|
||
/**
|
||
* 相机配置类
|
||
*/
|
||
class CameraOption {
|
||
private _viewer;
|
||
constructor(viewer: Cesium.Viewer);
|
||
toJson(): any;
|
||
parseJson(config: any): void;
|
||
static defaultOption(): any;
|
||
}
|
||
|
||
class GVDocument {
|
||
private _LayerManager;
|
||
private _viewer;
|
||
private _cameraOption;
|
||
constructor(viewer: GeoCanvas);
|
||
create(): void;
|
||
toJson(): any;
|
||
/**
|
||
* 解析json
|
||
* @param json 解析
|
||
*/
|
||
parseJson(json: any): void;
|
||
}
|
||
|
||
/**
|
||
* 场景数据类
|
||
*/
|
||
class SceneData {
|
||
constructor();
|
||
static getDefaultScene(): any;
|
||
}
|
||
|
||
/**
|
||
* @类别 需要创建,new iCenter()</br>
|
||
* @描述 提供iCenter产品中图层管理相关的操作 </br>
|
||
*/
|
||
class iCenter {
|
||
private _placeName;
|
||
private _userInfo;
|
||
private _viewer;
|
||
private _url;
|
||
private _username;
|
||
private _password;
|
||
private _icenterToken;
|
||
/**
|
||
* 初始化
|
||
* @param {GeoCanvas} viewer
|
||
* @param {string} url 连接的icenter环境地址
|
||
* @param {string} username 用户名
|
||
* @param {string} password 密码
|
||
* ```
|
||
* 示例代码
|
||
* const icenter = new GV.iCenter(viewer, 'http://icenter.geovis.online', 'admin', 'icenter');
|
||
* ```
|
||
*/
|
||
constructor(viewer: GeoCanvas, url: String, username: String, password: String);
|
||
/**
|
||
* 用户类
|
||
*/
|
||
readonly userInfo: UserInfo;
|
||
/**
|
||
* 地名类
|
||
*/
|
||
readonly placeName: PlaceName;
|
||
private _loginIcenter;
|
||
/**
|
||
* 获取基础影像图层
|
||
* @param {number} page 当前页数
|
||
* @param {number} pageSize 每页的条目数
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.getBaseImageLayers(1, 10).then(res => {
|
||
* res = {
|
||
* data: [{
|
||
* layerName: '中国',
|
||
* gridSet: 'EPSG:4326',
|
||
* mimeType: 'PNG',
|
||
* ......
|
||
* }, ......],
|
||
* total: 100,
|
||
* }
|
||
* }).catch(e => {
|
||
* console.log(e)
|
||
* });
|
||
* ```
|
||
*/
|
||
getBaseImageLayers(page: number, pageSize: number): Promise<any>;
|
||
/**
|
||
* 获取影像图层
|
||
* @param {number} page 当前页数
|
||
* @param {number} pageSize 每页的条目数
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.getImageLayers(1, 10).then(res => {
|
||
* console.log(res)
|
||
* }).catch(e => {
|
||
* console.log(e)
|
||
* });
|
||
* 返回值:
|
||
* 与基础影像返回值类似
|
||
* ```
|
||
*/
|
||
getImageLayers(page: number, pageSize: number): Promise<any>;
|
||
/**
|
||
* 获取矢量图层
|
||
* @param {number} page 当前页数
|
||
* @param {number} pageSize 每页的条目数
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.getVectorLayers(1, 10).then(res => {
|
||
* console.log(res)
|
||
* }).catch(e => {
|
||
* console.log(e)
|
||
* });
|
||
* 返回值:
|
||
* 与基础影像返回值类似
|
||
* ```
|
||
*/
|
||
getVectorLayers(page: number, pageSize: number): Promise<any>;
|
||
/**
|
||
* 获取地形图层
|
||
* @param {number} page 当前页数
|
||
* @param {number} pageSize 每页的条目数
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.getTerrainLayers(1, 10).then(res => {
|
||
* console.log(res)
|
||
* }).catch(e => {
|
||
* console.log(e)
|
||
* });
|
||
* 返回值:
|
||
* 与基础影像返回值类似
|
||
* ```
|
||
*/
|
||
getTerrainLayers(page: number, pageSize: number): Promise<any>;
|
||
/**
|
||
* 获取时序影像图层
|
||
* @param {number} page 当前页数
|
||
* @param {number} pageSize 每页的条目数
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.getTimeImageLayers(1, 10).then(res => {
|
||
* console.log(res)
|
||
* }).catch(e => {
|
||
* console.log(e)
|
||
* });
|
||
* 返回值:
|
||
* 与基础影像返回值类似
|
||
* ```
|
||
*/
|
||
getTimeImageLayers(page: number, pageSize: number): Promise<any>;
|
||
/**
|
||
* 获取倾斜摄影图层
|
||
* @param {number} page 当前页数
|
||
* @param {number} pageSize 每页的条目数
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.getTiltPhotoLayers(1, 10).then(res => {
|
||
* console.log(res)
|
||
* }).catch(e => {
|
||
* console.log(e)
|
||
* });
|
||
* 返回值:
|
||
* 与基础影像返回值类似
|
||
* ```
|
||
*/
|
||
getTiltPhotoLayers(page: number, pageSize: number): Promise<any>;
|
||
/**
|
||
* 获取实时数据服务图层列表
|
||
* @param {number} page 当前页数
|
||
* @param {number} pageSize 每页的条目数
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.getRealTimeLayers(1, 10).then(res => {
|
||
* console.log(res)
|
||
* }).catch(e => {
|
||
* console.log(e)
|
||
* });
|
||
* ```
|
||
*/
|
||
getRealTimeLayers(page: number, pageSize: number): Promise<any>;
|
||
/**
|
||
* 获取实时数据服务聚合类数据
|
||
* @param {string} sourceId 数据源ID
|
||
* @param {number} minLon 最小经度
|
||
* @param {number} maxLon 最大经度
|
||
* @param {number} minLat 最小纬度
|
||
* @param {number} maxLat 最大纬度
|
||
* @param {number} level 层级
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.getClusterRealTimeData('1', 139, 39, 140, 40, 10).then(res => {
|
||
* console.log(res)
|
||
* }).catch(e => {
|
||
* console.log(e)
|
||
* });
|
||
* ```
|
||
*/
|
||
getClusterRealTimeData(sourceId: any, minLon: any, maxLon: any, minLat: any, maxLat: any, level: any): Promise<any>;
|
||
/**
|
||
* 获取实时数据服务目标类数据
|
||
* @param {string} sourceId 数据源ID
|
||
* @param {number} minLon 最小经度
|
||
* @param {number} maxLon 最大经度
|
||
* @param {number} minLat 最小纬度
|
||
* @param {number} maxLat 最大纬度
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.getTargetRealTimeData('1', 139, 39, 140, 40).then(res => {
|
||
* console.log(res)
|
||
* }).catch(e => {
|
||
* console.log(e)
|
||
* });
|
||
* ```
|
||
*/
|
||
getTargetRealTimeData(sourceId: any, minLon: any, maxLon: any, minLat: any, maxLat: any): Promise<any>;
|
||
/**
|
||
* 创建基础影像图层
|
||
* @param {object} options 图层列表返回值中的单个图层对象
|
||
* ```
|
||
* 示例代码:
|
||
* const provider = icenter.createBaseImageLayer({layerName: 'google-PNG-4326', gridSet: 'EPSG:4326', mimeType: 'image/png', ......});
|
||
* 加载返回值的方法如下:
|
||
* const layer = viewer.imageryLayers.addImageryProvider(provider);
|
||
* viewer.zoomTo(layer)
|
||
* ```
|
||
*/
|
||
createBaseImageLayer(options: {
|
||
layerName: string;
|
||
mimeType: string;
|
||
gridSet: string;
|
||
workspace: string;
|
||
minX: number;
|
||
minY: number;
|
||
maxX: number;
|
||
maxY: number;
|
||
}): Cesium.WebMapTileServiceImageryProvider;
|
||
/**
|
||
* 创建影像图层
|
||
* @param {object} options 图层列表返回值中的单个图层对象
|
||
* ```
|
||
* 示例代码:
|
||
* const provider = icenter.createImageLayer({layerName: 'pick-PNG-4326', gridSet: 'EPSG:4326', mimeType: 'image/png', ......});
|
||
* 加载返回值的方法如下:
|
||
* const layer = viewer.imageryLayers.addImageryProvider(provider);
|
||
* viewer.zoomTo(layer)
|
||
* ```
|
||
*/
|
||
createImageLayer(options: {
|
||
layerName: string;
|
||
mimeType: string;
|
||
gridSet: string;
|
||
workspace: string;
|
||
minX: number;
|
||
minY: number;
|
||
maxX: number;
|
||
maxY: number;
|
||
}): Cesium.WebMapTileServiceImageryProvider;
|
||
/**
|
||
* 创建矢量图层
|
||
* @param {object} options 图层列表返回值中的单个图层对象
|
||
* ```
|
||
* 示例代码:
|
||
* const vector = icenter.createVectorLayer({layerName: 'icenter:国界线-PNG-4326', ......});
|
||
* 加载返回值的方法如下:
|
||
* viewer.tileLayer.add(vector);
|
||
* ```
|
||
*/
|
||
createVectorLayer(options: {
|
||
layerName: string;
|
||
workspace: string;
|
||
minX: number;
|
||
minY: number;
|
||
maxX: number;
|
||
maxY: number;
|
||
}): LineTile;
|
||
/**
|
||
* 创建地形图层
|
||
* @param {object} options 图层列表返回值中的单个图层对象
|
||
* ```
|
||
* 示例代码:
|
||
* const provider = icenter.createTerrainLayer({layerName: 'taiwanDEM-TERRAIN-4326', minX: 119.9995833, minY: 19.9995838, maxX: 125.0004167, maxY: 25.0004171, ......});
|
||
* 加载返回值的方法如下:
|
||
* viewer.terrainProvider = provider;
|
||
* ```
|
||
*/
|
||
createTerrainLayer(options: {
|
||
layerName: string;
|
||
minX: number;
|
||
minY: number;
|
||
maxX: number;
|
||
maxY: number;
|
||
}): Cesium.CesiumTerrainProvider;
|
||
/**
|
||
* 创建倾斜摄影图层
|
||
* @param {object} options 图层列表返回值中的单个图层对象
|
||
* ```
|
||
* 示例代码:
|
||
* const tiltPhoto = icenter.createTiltPhotoLayer({layerName: 100, ......});
|
||
* 加载返回值的方法如下:
|
||
* tiltPhoto.readyPromise.then((tileset) => {
|
||
* viewer.scene.primitives.add(tileset);
|
||
* viewer.flyTo(tileset);
|
||
* });
|
||
* ```
|
||
*/
|
||
createTiltPhotoLayer(options: {
|
||
layerName: string;
|
||
}): Cesium.Cesium3DTileset;
|
||
}
|
||
|
||
class PlaceName {
|
||
private _viewer;
|
||
private _url;
|
||
private _username;
|
||
private _password;
|
||
private _icenterToken;
|
||
/**
|
||
* 初始化
|
||
* @param {GeoCanvas} viewer
|
||
* @param {string} url 连接的icenter环境地址
|
||
* @param {string} username 用户名
|
||
* @param {string} password 密码
|
||
* ```
|
||
* 示例代码
|
||
* const icenter = new GV.iCenter(viewer, 'http://icenter.geovis.online', 'admin', 'icenter');
|
||
* icenter.placeName
|
||
* ```
|
||
*/
|
||
constructor(viewer: GeoCanvas, url: String, username: String, password: String);
|
||
private _loginIcenter;
|
||
private _altitudeMap;
|
||
/**
|
||
* 获取模糊匹配的地名列表
|
||
* @param {String} placeName 地名
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.placeName.queryPlaceNameList('北京').then(res => {
|
||
* res = [{
|
||
* DMMC: '北京',
|
||
* WZ: 'POINT(116.400975 39.903325)',
|
||
* DMDZ: '中华人民共和国',
|
||
* ......
|
||
* }, ......]
|
||
* });
|
||
* ```
|
||
*/
|
||
queryPlaceNameList(placeName: string): Promise<any>;
|
||
/**
|
||
* 获取单个地名的位置信息
|
||
* @param {Object} options 地名列表返回的单个地名数据对象
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.placeName.getPlaceNameLocation(options);
|
||
* 返回值
|
||
* { lon: 119, lat: 39, height: 10 }
|
||
* ```
|
||
*/
|
||
getPlaceNameLocation(options: any): {
|
||
lon: any;
|
||
lat: any;
|
||
height: number;
|
||
};
|
||
/**
|
||
* 获取全球的国家列表
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.placeName.getWorldTree();
|
||
* 返回值:
|
||
* [{
|
||
* name: '中国',
|
||
* }, ......]
|
||
* ```
|
||
*/
|
||
getWorldTree(): Promise<any>;
|
||
/**
|
||
* 获取全国的省市县列表
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.placeName.getProvinceCityCountyTree();
|
||
* 返回值:
|
||
* [{
|
||
* code: 2121212,
|
||
* name: '北京',
|
||
* children: [],
|
||
* }, ......]
|
||
* ```
|
||
*/
|
||
getProvinceCityCountyTree(): Promise<any>;
|
||
/**
|
||
* 获取单个国家的范围数据
|
||
* @param {string} name 国家名称
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.placeName.getCountryArea('中国');
|
||
* 返回值:
|
||
* MULTIPOLYGON (((110.88 19.99)))
|
||
* ```
|
||
*/
|
||
getCountryArea(name: string): Promise<any>;
|
||
/**
|
||
* 获取省市县的范围数据
|
||
* @param {object} options 省市县列表返回值中的单个数据对象
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.placeName.getProvinceCityCountyArea({code: 110000, ......});
|
||
* 返回值:
|
||
* MULTIPOLYGON (((110.88 19.99)))
|
||
* ```
|
||
*/
|
||
getProvinceCityCountyArea(options: any): Promise<any>;
|
||
/**
|
||
* 创建地名服务
|
||
* ```
|
||
* 示例代码:
|
||
* const placeNameTile = icenter.placeName.createPlaceName();
|
||
* viewer.tileLayer.add(placeNameTile);
|
||
* ```
|
||
*/
|
||
createPlaceName(): PlaceNameTile;
|
||
}
|
||
|
||
class UserInfo {
|
||
private _url;
|
||
private _username;
|
||
private _password;
|
||
private _icenterToken;
|
||
/**
|
||
* 初始化
|
||
* @param {string} url 连接的icenter环境地址
|
||
* @param {string} username 用户名
|
||
* @param {string} password 密码
|
||
* ```
|
||
* 示例代码
|
||
* const icenter = new GV.iCenter('http://icenter.geovis.online', 'admin', 'icenter');
|
||
* icenter.userInfo
|
||
* ```
|
||
*/
|
||
constructor(url: String, username: String, password: String);
|
||
private _loginIcenter;
|
||
/**
|
||
* 获取用户信息
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.userInfo.getUserInfo();
|
||
* ```
|
||
*/
|
||
getUserInfo(): Promise<any>;
|
||
/**
|
||
* 获取用户token
|
||
* ```
|
||
* 示例代码:
|
||
* icenter.userInfo.getUserToken();
|
||
* ```
|
||
*/
|
||
getUserToken(): Promise<String>;
|
||
}
|
||
|
||
const PathGroupName = "ActionPathLayer";
|
||
/**
|
||
* 根据标绘图形获取可使用的动作
|
||
* @param graphic
|
||
*/
|
||
function getAvailableAction(graphic: GraphicItem): any[];
|
||
|
||
class ActionGroup extends Item {
|
||
private _itemCollection;
|
||
private _startTime;
|
||
private _endTime;
|
||
private _viewer;
|
||
private _baseTime;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
readonly length: number;
|
||
readonly rTimeBound: number[];
|
||
readonly actionCollection: ActionItem[];
|
||
setBaseTime(baseTime: Cesium.JulianDate): void;
|
||
addAction(item: ActionItem): void;
|
||
delActionInGroup(item: ActionItem): void;
|
||
delAction(item: ActionItem): void;
|
||
delActionById(itemId: string): void;
|
||
getActionById(itemId: string): ActionItem;
|
||
isContainActionId(itemId: string): boolean;
|
||
clear(): void;
|
||
moveUp(item: ActionItem): void;
|
||
moveDown(item: ActionItem): void;
|
||
calcTimeBound(): void;
|
||
calcRTimeBound(notCalcItem?: ActionItem): number[];
|
||
updateStartTimeByRST(rStartTime: number): JulianDate;
|
||
updateEndTimeByRET(rEndTime: number): JulianDate;
|
||
reCalcEndTimeByRET(notCalcItem: ActionItem, rEndTime: number): JulianDate;
|
||
reCalcStartTimeByRST(notCalcItem: ActionItem, rStartTime: number): JulianDate;
|
||
recordInitState(isAuto?: boolean): void;
|
||
pauseInExecute(): void;
|
||
continueAfterPause(): void;
|
||
stopInExecute(): void;
|
||
recoverInitState(): void;
|
||
listenerFun(currentTime: JulianDate, multiplier: number): void;
|
||
toJson(): {
|
||
actions: any[];
|
||
};
|
||
parseJson(jsonData: any): ActionItem[];
|
||
private getPathLayer;
|
||
checkGraphicStorageChange(): number;
|
||
reBindGraphicById(): void;
|
||
beforeStartInit(clock: Cesium.Clock): void;
|
||
private _toStringByDate;
|
||
private _getGraphics;
|
||
private _getRelativeGraphics;
|
||
_getGraphicById(group: GraphicGroup, id: string): any;
|
||
private _getGraphicIndex;
|
||
private _getGraphicByIndex;
|
||
}
|
||
/**
|
||
* 动画执行状态
|
||
*/
|
||
enum ActionStateEnum {
|
||
/**
|
||
* 未开始
|
||
*/
|
||
NotStart = "notstart",
|
||
/**
|
||
* 正在运行
|
||
*/
|
||
Start = "start",
|
||
/**
|
||
* 暂停
|
||
*/
|
||
Pause = "pause",
|
||
/**
|
||
* 停止
|
||
*/
|
||
Stop = "stop",
|
||
/**
|
||
* 重新运行
|
||
*/
|
||
ReStart = "restart"
|
||
}
|
||
|
||
class ActionItem extends Item {
|
||
protected _startTime: Cesium.JulianDate;
|
||
protected _endTime: Cesium.JulianDate;
|
||
protected _rStartTime: number;
|
||
protected _rEndTime: number;
|
||
protected _isDone: boolean;
|
||
protected _isFirstDone: boolean;
|
||
protected _initState: any;
|
||
protected _actionGroup: ActionGroup;
|
||
protected _viewer: GeoCanvas;
|
||
protected _properties: Object;
|
||
constructor();
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
viewer: GeoCanvas;
|
||
rStartTime: number;
|
||
rEndTime: number;
|
||
startTime: Cesium.JulianDate;
|
||
endTime: Cesium.JulianDate;
|
||
isDone: boolean;
|
||
isFirstDone: boolean;
|
||
actionGroup: ActionGroup;
|
||
properties: Object;
|
||
/**
|
||
* @description: 时间轴每帧执行的方法
|
||
* @param {Cesium} currentTime 当前时间
|
||
* @param {Cesium} baseTime 基础时间
|
||
* @param {number} multiplier 播放速率
|
||
* @return {*}
|
||
*/
|
||
timelineFun(currentTime: Cesium.JulianDate, baseTime: Cesium.JulianDate, multiplier: number): void;
|
||
recordInitState(): void;
|
||
recoverInitState(): void;
|
||
pauseEvent(): void;
|
||
stopEvent(): void;
|
||
continueEvent(): void;
|
||
}
|
||
|
||
class CameraAction extends ActionItem {
|
||
private _cameraOpt;
|
||
constructor(cameraActionOpt: CameraActionOpt);
|
||
rEndTime: number;
|
||
actionOpt: CameraActionOpt;
|
||
cameraOpt: any;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
timelineFun(currentTime: Cesium.JulianDate, baseTime: any, multiplier: any): void;
|
||
toJson(): {
|
||
name: string;
|
||
type: string;
|
||
option: {
|
||
startTime: number;
|
||
cameraOpt: any;
|
||
};
|
||
properties: Object;
|
||
};
|
||
}
|
||
class CameraActionOpt {
|
||
startTime: number;
|
||
endTime: number;
|
||
cameraOpt: any;
|
||
}
|
||
|
||
class FadeOutAction extends ActionItem {
|
||
private _graphic;
|
||
private _startTrans;
|
||
private _endTrans;
|
||
private _initColor;
|
||
private _totalTime;
|
||
private _intervalFun;
|
||
private _trans;
|
||
private _isMaterial;
|
||
private _timer;
|
||
private _materialGraphicTypes;
|
||
constructor(fadeOutActionOpt: FadeOutActionOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 开始透明度
|
||
*/
|
||
startTrans: number;
|
||
/**
|
||
* 结束透明度
|
||
*/
|
||
endTrans: number;
|
||
graphic: GraphicItem;
|
||
rStartTime: number;
|
||
rEndTime: number;
|
||
readonly actionOpt: FadeOutActionOpt;
|
||
ationOpt: FadeOutActionOpt;
|
||
timelineFun(currentTime: Cesium.JulianDate): void;
|
||
private _parseColor;
|
||
private _createInterval;
|
||
private _clearInterval;
|
||
private _isChangeColorByMaterial;
|
||
pauseEvent(): void;
|
||
stopEvent(): void;
|
||
continueEvent(): void;
|
||
recordInitState(): void;
|
||
/**
|
||
* @ignore
|
||
* @描述: 恢复初始状态
|
||
*/
|
||
recoverInitState(): void;
|
||
toJson(): {
|
||
name: string;
|
||
type: string;
|
||
option: {
|
||
startTime: number;
|
||
endTime: number;
|
||
startTrans: number;
|
||
endTrans: number;
|
||
graphic: object;
|
||
};
|
||
properties: Object;
|
||
};
|
||
}
|
||
class FadeOutActionOpt {
|
||
/**
|
||
* 动作开始时间(相对时间)
|
||
*/
|
||
startTime: number;
|
||
/**
|
||
* 动作结束时间(相对时间)
|
||
*/
|
||
endTime: number;
|
||
/**
|
||
* 绑定的标绘图形
|
||
*/
|
||
graphic: GraphicItem;
|
||
/**
|
||
* 开始不透明度 取值[0,1]
|
||
*/
|
||
startTrans?: number;
|
||
/**
|
||
* 最终不透明度 取值[0,1]
|
||
*/
|
||
endTrans?: number;
|
||
}
|
||
|
||
class FlickerAction extends ActionItem {
|
||
private _frequency;
|
||
private _f;
|
||
private _graphic;
|
||
constructor(flickerOpt: FlickerActionOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
graphic: GraphicItem;
|
||
actionOpt: FlickerActionOpt;
|
||
frequency: number;
|
||
timelineFun(currentTime: Cesium.JulianDate, baseTime: Cesium.JulianDate): void;
|
||
recordInitState(): void;
|
||
recoverInitState(): void;
|
||
stopEvent(): void;
|
||
toJson(): {
|
||
name: string;
|
||
type: string;
|
||
option: {
|
||
startTime: number;
|
||
endTime: number;
|
||
graphic: object;
|
||
frequency: number;
|
||
};
|
||
properties: Object;
|
||
};
|
||
}
|
||
interface FlickerActionOpt {
|
||
startTime: number;
|
||
endTime: number;
|
||
graphic: GraphicItem;
|
||
frequency: number;
|
||
}
|
||
|
||
/**
|
||
* @类别 需要用户创建的类
|
||
* @描述 提供路径回调函数
|
||
*/
|
||
class PathAction extends ActionItem {
|
||
private _graphic;
|
||
private _path;
|
||
private _posProperty;
|
||
private _relativePosParam;
|
||
private _moveCallback;
|
||
private _isMultiNodesGraphic;
|
||
private _isNeedIntervalSingleNodeGraphic;
|
||
private _MultiNodesGraphicTypes;
|
||
private _needIntervalSingleNodeTypes;
|
||
private _intervalFun;
|
||
private _multiPosGraphicTrans;
|
||
private _specialGraphicOpt;
|
||
constructor(pathActionOpt: PathActionOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
pathActionOpt: PathActionOpt;
|
||
moveCallback: Function;
|
||
rStartTime: number;
|
||
rEndTime: number;
|
||
graphic: GraphicItem;
|
||
/**
|
||
* @description: 获取路径标绘对象,设置路径标绘对象
|
||
* ```
|
||
* 示例代码
|
||
* actionObj.pathGraphic = path // 注:内部对path进行拷贝,actionObj.pathGraphic在设置后产生一个新的标绘对象,设置后的actionObj.pathGraphic != path
|
||
* viewer.graphicLayer.setEditItem(actionObj.pathGraphic);
|
||
* ```
|
||
*/
|
||
pathGraphic: BezierLineGraphic | PolylineGraphic;
|
||
removePathGraphic(viewer: GeoCanvas): GraphicItem | GraphicGroup;
|
||
static getPathGraphicGroup(viewer: any): any;
|
||
initPositions(): void;
|
||
timelineFun(currentTime: Cesium.JulianDate): void;
|
||
pauseEvent(): void;
|
||
stopEvent(): void;
|
||
continueEvent(): void;
|
||
private _doMoveAction;
|
||
private _createInterval;
|
||
private _clearInterval;
|
||
private _isMultiNodes;
|
||
private _isNeedIntervalSingleNode;
|
||
private _getPathPos;
|
||
recordInitState(): void;
|
||
recoverInitState(): void;
|
||
toJson(): {
|
||
name: string;
|
||
type: string;
|
||
option: {
|
||
startTime: number;
|
||
endTime: number;
|
||
graphic: object;
|
||
path: object;
|
||
};
|
||
properties: Object;
|
||
};
|
||
}
|
||
class PathActionOpt {
|
||
graphic: GraphicItem;
|
||
startTime: number;
|
||
endTime: number;
|
||
path: BezierLineGraphic | PolylineGraphic;
|
||
relativePosParam?: {
|
||
x: number;
|
||
y: number;
|
||
z: number;
|
||
heading: number;
|
||
pitch: number;
|
||
roll: number;
|
||
};
|
||
moveCallback?: Function;
|
||
}
|
||
|
||
class ScaleAction extends ActionItem {
|
||
private _graphic;
|
||
private _factor;
|
||
private _initSize;
|
||
private _totalTime;
|
||
private _intervalFun;
|
||
private _isNeedIntervalType;
|
||
private _needIntervalTypes;
|
||
private _progress;
|
||
constructor(scaleActionOpt: ScaleActionOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
timelineFun(currentTime: Cesium.JulianDate): void;
|
||
pauseEvent(): void;
|
||
stopEvent(): void;
|
||
continueEvent(): void;
|
||
private _createInterval;
|
||
private _clearInterval;
|
||
private _isNeedInterval;
|
||
actionOpt: ScaleActionOpt;
|
||
graphic: GraphicItem;
|
||
factor: number;
|
||
rStartTime: number;
|
||
rEndTime: number;
|
||
private _getInitPixelSize;
|
||
private _changePixelSize;
|
||
recordInitState(): void;
|
||
recoverInitState(): void;
|
||
toJson(): {
|
||
name: string;
|
||
type: string;
|
||
option: {
|
||
startTime: number;
|
||
endTime: number;
|
||
graphic: object;
|
||
factor: number;
|
||
};
|
||
properties: Object;
|
||
};
|
||
}
|
||
interface ScaleActionOpt {
|
||
startTime: number;
|
||
endTime: number;
|
||
graphic: GraphicItem;
|
||
factor: number;
|
||
}
|
||
|
||
class VisibleAction extends ActionItem {
|
||
_graphic: any;
|
||
_visible: boolean;
|
||
constructor(visibleActionOpt: VisibleActionOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
graphic: GraphicItem;
|
||
actionOpt: VisibleActionOpt;
|
||
visible: boolean;
|
||
timelineFun(currentTime: Cesium.JulianDate): void;
|
||
recordInitState(): void;
|
||
recoverInitState(): void;
|
||
toJson(): {
|
||
name: string;
|
||
type: string;
|
||
option: {
|
||
startTime: number;
|
||
graphic: any;
|
||
visible: boolean;
|
||
};
|
||
properties: Object;
|
||
};
|
||
}
|
||
interface VisibleActionOpt {
|
||
startTime: number;
|
||
graphic: GraphicItem;
|
||
visible: boolean;
|
||
}
|
||
|
||
class ActionLayer {
|
||
private _state;
|
||
private _groupCollection;
|
||
private _baseTime;
|
||
private _tickListener;
|
||
private _clock;
|
||
private _multiplier;
|
||
private _viewer;
|
||
private _initCamera;
|
||
private _stopCallBack;
|
||
private _startCallBack;
|
||
private _pauseCallBack;
|
||
private _runningCB;
|
||
private _groupChangedCB;
|
||
private _isLoop;
|
||
private _currentGroupIndex;
|
||
private _groupTimeLengths;
|
||
/**
|
||
* @description:
|
||
* @param {GeoCanvas} viewer
|
||
* @param {Cesium} baseTime
|
||
* ```
|
||
* 示例代码
|
||
* const baseTime = new Date()
|
||
* const actionLayer = new GV.ActionLayer(viewer, baseTime)
|
||
* ```
|
||
*/
|
||
constructor(viewer: GeoCanvas | any, baseTime?: Cesium.JulianDate | Date | String);
|
||
/**
|
||
* @description: 获取viewer
|
||
*/
|
||
readonly viewer: GeoCanvas;
|
||
/**
|
||
* @description: 是否重复播放
|
||
*/
|
||
/**
|
||
* @description: 设置是否重复播放
|
||
* @param {boolean} isLoop 是否重复播放
|
||
* @return {*}
|
||
*/
|
||
isLoop: boolean;
|
||
/**
|
||
* @description: 获取动作组集合
|
||
*/
|
||
readonly groupCollection: ActionGroup[];
|
||
/**
|
||
* @description: 获取播放速度
|
||
*/
|
||
/**
|
||
* @description: 设置播放速度
|
||
* @param {number} speed 传入播放速度
|
||
*/
|
||
speed: number;
|
||
/**
|
||
* @description: 获取动画图层中动作组的数量
|
||
*/
|
||
readonly length: number;
|
||
/**
|
||
* @description: 获取动画图层中所有动作的个数
|
||
*/
|
||
readonly actionsNum: number;
|
||
/**
|
||
* @description: 在动画图层中添加动作
|
||
* @param {ActionItem} item 添加的动作对象
|
||
* @param {ActionGroup} actionGroup 将添加至某动作组对象或动作组ID
|
||
* @return {*}
|
||
*/
|
||
addAction(item: ActionItem, actionGroup?: ActionGroup | string): void;
|
||
/**
|
||
* @description: 从动画图层中删除动作
|
||
* @param {ActionItem} item 删除的动作对象
|
||
* @param {ActionGroup} actionGroup 从某动作组中删除
|
||
* @return {*}
|
||
*/
|
||
delAction(item: ActionItem, actionGroup?: ActionGroup): void;
|
||
/**
|
||
* @description: 将动作对象移动至其他动作组
|
||
* @param {*} action 移动的动作对象
|
||
* @param {*} group 移动至某动作组
|
||
* @return {*}
|
||
*/
|
||
moveAction(action: any, group: any): void;
|
||
/**
|
||
* @description: 根据动作对象ID删除
|
||
* @param {string} actionId 动作对象ID
|
||
* @param {ActionGroup} actionGroup 从某动作组中删除
|
||
* @return {*}
|
||
*/
|
||
delActionById(actionId: string, actionGroup?: ActionGroup): void;
|
||
/**
|
||
* @description: 从动画图层中删除动作组
|
||
* @param {ActionGroup} actionGroup 将要被删除的动作组
|
||
* @return {*}
|
||
*/
|
||
delActionGroup(actionGroup: ActionGroup): void;
|
||
/**
|
||
* @description: 从动画图层中根据动作组ID删除组
|
||
* @param {string} actionGroupById
|
||
* @return {*}
|
||
*/
|
||
delActionGroupById(actionGroupById: string): void;
|
||
/**
|
||
* @description: 创建一个新组并添加至动画图层中
|
||
* @param {*}
|
||
* @return {ActionGroup}
|
||
*/
|
||
createGroup(): ActionGroup;
|
||
/**
|
||
* @description: 添加动作组
|
||
* @param {ActionGroup} actionGroup
|
||
* @return {*}
|
||
*/
|
||
addActionGroup(actionGroup: ActionGroup): void;
|
||
/**
|
||
* @description: 根据动作对象ID获取动作对象
|
||
* @param {string} actionId 动作对象ID
|
||
* @param {ActionGroup} actionGroup 动作组
|
||
* @return {*}
|
||
*/
|
||
getActionById(actionId: string, actionGroup?: ActionGroup): ActionItem;
|
||
/**
|
||
* @description: 根据动作组ID获取动作组
|
||
* @param {string} actionGroupId
|
||
* @return {*}
|
||
*/
|
||
getGroupById(actionGroupId: string): ActionGroup;
|
||
/**
|
||
* @description: 根据动作ID获取动作组
|
||
* @param {string} actionId
|
||
* @return {*}
|
||
*/
|
||
getGroupByActionId(actionId: string): ActionGroup;
|
||
/**
|
||
* @description: 清空动画图层
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
clear(): void;
|
||
/**
|
||
* @description: 将动作对象在动作组中上移|将动作组在动画图层中上移
|
||
* @param {ActionItem} item
|
||
* @return {*}
|
||
*/
|
||
moveUp(item: ActionItem | ActionGroup): void;
|
||
/**
|
||
* @description: 将动作对象在动作组中下移|将动作组在动画图层中下移
|
||
* @param {ActionItem} item
|
||
* @return {*}
|
||
*/
|
||
moveDown(item: ActionItem | ActionGroup): void;
|
||
/**
|
||
* @description: 设置基础时间
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
setBaseTime(baseTime: Cesium.JulianDate | Date | String, isSetAllActionGroup?: boolean): void;
|
||
/**
|
||
* @description: 获取基础时间
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
getBaseTime(): Date;
|
||
/**
|
||
* @description: 获取动画图层的相对时间范围
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
readonly rTimeBound: number[];
|
||
/**
|
||
* @description: 获取动画图层播放的总时长
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
getTimeLength(): number;
|
||
/**
|
||
* @description: 根据ID重新绑定标绘对象,防止标绘对象内存地址改变
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
reBindGraphicById(): void;
|
||
private _getGroupTimeLengths;
|
||
private _calcRTimeBound;
|
||
/**
|
||
* @description: 开始播放动画
|
||
* @param {boolean} isAuto
|
||
* @return {*}
|
||
*/
|
||
start(isAuto?: boolean): void;
|
||
/**
|
||
* @description: 暂停动画
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
pause(): void;
|
||
/**
|
||
* @description: 重新开始
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
reStart(): void;
|
||
/**
|
||
* @description: 停止播放
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
stop(): void;
|
||
/**
|
||
* @description: 复位动画图层
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
reSet(): void;
|
||
/**
|
||
* @description: 设置动画的初始视角
|
||
* @ignore
|
||
*/
|
||
setInitCamera(cameraOpt: any): void;
|
||
/**
|
||
* @description: 设置开始时回调函数
|
||
* @param {Function} startCallBack
|
||
* @return {*}
|
||
*/
|
||
onStart: () => void;
|
||
/**
|
||
* @description: 设置暂停时回调函数
|
||
* @param {Function} pauseCallBack
|
||
* @return {*}
|
||
*/
|
||
onPause: () => void;
|
||
/**
|
||
* @description: 设置运行时回调函数(输出当前动作组的当前相对时间(秒)、动画图层中所有动作组的当前相对时间(秒)、绝对时间)
|
||
* @param {function} runningCB
|
||
* @return {*}
|
||
*/
|
||
onRunning: (rCurrentTime: number, totalRCurrentTime: number, currentTime: Cesium.JulianDate) => void;
|
||
/**
|
||
* @description: 设置运行时回调函数(该属性即将删除,使用onRunning)
|
||
* @param {Function} runningCB
|
||
* @return {*}
|
||
*/
|
||
runningCB: (rCurrentTime: number, totalRCurrentTime: number, currentTime: Cesium.JulianDate) => void;
|
||
/**
|
||
* @description: 开始播放后,分组切换时触发的回调函数
|
||
* @param {Function} groupChangedCB
|
||
* @return {*}
|
||
*/
|
||
groupChangedCB: () => void;
|
||
/**
|
||
* @description: 获取该标绘可以使用的动作类型
|
||
* @param {GraphicItem} graphic 标绘图形
|
||
* @return {Array} 返回一个动作类型数组
|
||
*/
|
||
getAvailableAction(graphic: GraphicItem): any[];
|
||
/**
|
||
* @description: 设置结束时回调函数
|
||
* @param {Function} stopCallBack
|
||
* @return {*}
|
||
*/
|
||
onStop: () => void;
|
||
/**
|
||
* @description: 将动画图层转换为json
|
||
* @param {boolean} isSaveGraphics
|
||
* @return {*}
|
||
*/
|
||
toJson(isSaveGraphics?: boolean): {
|
||
baseTime: string;
|
||
actionGroups: any[];
|
||
graphics: object;
|
||
} | {
|
||
baseTime: string;
|
||
actionGroups: any[];
|
||
graphics?: undefined;
|
||
};
|
||
/**
|
||
* @description: 解析动画图层json数据
|
||
* @param {any} json
|
||
* @return {*} 返回动画图层中动作组的集合
|
||
*/
|
||
parseJson(json: any): ActionGroup[];
|
||
private _recordInitState;
|
||
private _beforeStartInit;
|
||
private _listenerFun;
|
||
private _clockStopFun;
|
||
private _getNextGroupIndex;
|
||
private _removeTickListener;
|
||
private _toStringByDate;
|
||
}
|
||
/**
|
||
* 动画执行状态
|
||
*/
|
||
enum ActionStateEnum {
|
||
/**
|
||
* 未开始
|
||
*/
|
||
NotStart = "notstart",
|
||
/**
|
||
* 正在运行
|
||
*/
|
||
Start = "start",
|
||
/**
|
||
* 暂停
|
||
*/
|
||
Pause = "pause",
|
||
/**
|
||
* 停止
|
||
*/
|
||
Stop = "stop",
|
||
/**
|
||
* 重新运行
|
||
*/
|
||
ReStart = "restart"
|
||
}
|
||
|
||
class CloundLayer {
|
||
private _viewer;
|
||
private scene;
|
||
private _config;
|
||
private _baseHeight;
|
||
private _brightnessShift;
|
||
private brightnessShift_;
|
||
private skyBoxshow_;
|
||
private _cloundCount;
|
||
private _maxCloundCount;
|
||
private _show;
|
||
private _rectangle;
|
||
private _option;
|
||
private _cloundColor;
|
||
private _modelCollection;
|
||
private _billboardCollection;
|
||
private _types;
|
||
constructor(viewer: Cesium.Viewer, option: any);
|
||
clamp(a: any, b: any, c: any): any;
|
||
_createClound(): void;
|
||
_initAtmosphere(): void;
|
||
_resetAtmosphere(): void;
|
||
show: boolean;
|
||
density: number;
|
||
rectangle: object;
|
||
destory(): void;
|
||
}
|
||
|
||
/**
|
||
* 初始化示例
|
||
* @param option 引人注目点
|
||
* ```
|
||
* 示例代码:
|
||
* let opt = new GV.AttractPointGraphicOpt();
|
||
* opt.position = new GV.GeoPoint(112, 26);
|
||
* opt.radius = 50;
|
||
* opt.height = 300;
|
||
* let obj = new GV.AttractPointGraphic(opt);
|
||
* viewer.graphicLayer.add(obj);
|
||
*
|
||
* ```
|
||
*/
|
||
class AttractPointGraphic extends GraphicPositionItem {
|
||
constructor(opt: any);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 半径
|
||
*/
|
||
radius: any;
|
||
/**
|
||
* 高度
|
||
*/
|
||
height: any;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: any;
|
||
}
|
||
class AttractPointGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 底面半径
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 高度
|
||
*/
|
||
height: number;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 贝塞尔曲线
|
||
* @see <a href='../../../examples/gallery/editor.html#plotEdit'>贝塞尔曲线</a>
|
||
*/
|
||
class BezierLineGraphic extends GraphicItem {
|
||
protected _opt: BezierLineGraphicOpt;
|
||
protected _type: string;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* ```
|
||
* let bezierLine = new GV.BezierLineGraphic({
|
||
* positions:[new GV.GeoPoint(0,0,200000), new GV.GeoPoint(100,0,200000), new GV.GeoPoint(100,100,200000)], //设置坐标
|
||
* lineStyle: new GV.ColorStyle({color: '#ffff00'}), //设置颜色
|
||
* width: 3, //设置宽度
|
||
* });
|
||
* viewer.graphicLayer.add(bezierLine); //添加到场景
|
||
* ```
|
||
*/
|
||
constructor(option: BezierLineGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* @name: 获取所有节点的坐标
|
||
* @msg:
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
readonly allPositions: any[];
|
||
/**
|
||
* 位置(只有前两个点位有效)
|
||
* ```
|
||
* 示例代码
|
||
* parabolaLine.positions = [new GV.GeoPoint(0,0,200000), new GV.GeoPoint(100,0,200000)]
|
||
* ```
|
||
*/
|
||
positions: any;
|
||
/**
|
||
* 线宽 (单位:像素) (范围: >0 && <100)
|
||
* ```
|
||
* 示例代码
|
||
* parabolaLine.width = 10
|
||
* ```
|
||
*/
|
||
width: number;
|
||
/**
|
||
* 只读属性贝塞尔曲线贴地
|
||
*/
|
||
readonly clampToGround: true;
|
||
/**
|
||
* 点集数,抛物线细分插值数 (范围:>0 && <1000)
|
||
* ```
|
||
* parabolaLine.step = 50
|
||
* ```
|
||
*/
|
||
step: number;
|
||
/**
|
||
* 是否支持动态点修改(支持模式可能会对效率有点影响与当前加载数据量有关)
|
||
*/
|
||
dirty: boolean;
|
||
/**
|
||
* 线条样式
|
||
* 线条支持测样式参考
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* parabolaLine.lineStyle = new GV.DynamicStyle({//设置动态样式
|
||
* color: '#ffff00', //颜色
|
||
* icon: GV.DynamicIconEnum.Attack, //样式图表
|
||
* duration:800 //周期
|
||
* })
|
||
* ```
|
||
*/
|
||
lineStyle: ColorStyle | ArrowStyle | OutlineStyle | DashStyle | GlowStyle | DynamicStyle;
|
||
/**
|
||
*@ignore
|
||
*/
|
||
getInterpolationCallback(value: any): GeoPoint[];
|
||
color: string;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class BezierLineGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 点集数量
|
||
*/
|
||
step?: number;
|
||
/**
|
||
* 线条样式
|
||
* 线条支持测样式参考
|
||
*/
|
||
lineStyle: ColorStyle | ArrowStyle | OutlineStyle | DashStyle | GlowStyle | DynamicStyle;
|
||
/**
|
||
* 关键点信息
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 线型宽度
|
||
*/
|
||
width: number;
|
||
/**
|
||
* 是否动态更新(脏检查)
|
||
*/
|
||
dirty: boolean;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 图标绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#plottingBillboard'>图标</a>
|
||
*/
|
||
class BillboardGraphic extends GraphicPositionItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: BillboardGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let billboardGraphicOpt = new GV.BillboardGraphicOpt();
|
||
* billboardGraphicOpt.position = [83, 33, 500000];
|
||
* let billboardGraphic = new GV.BillboardGraphic(billboardGraphicOpt);
|
||
* 或者
|
||
* let billboardGraphic = new GV.BillboardGraphic({...});
|
||
* ```
|
||
*/
|
||
constructor(option: BillboardGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): any;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 图片
|
||
*/
|
||
image: any;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale: any;
|
||
/**
|
||
* 水平对齐方式: 'left' 左对齐; 'center' 居中; 'right' 右对齐;
|
||
*/
|
||
horizontalOrigin: any;
|
||
/**
|
||
* 垂直对齐方式 : 'baseline'基线对齐; 'bottom' 底部对齐; 'center' 中间对齐; 'top' 顶部对齐
|
||
*/
|
||
verticalOrigin: any;
|
||
/**
|
||
* 视角偏移[x,y,z] 空间坐标值 单位为米
|
||
*/
|
||
eyeOffset: any;
|
||
/**
|
||
* 像素偏移 [x,y] x:相对中心点屏幕横向偏移; y:相对中心点屏幕纵向偏移; 单位像素值
|
||
*/
|
||
pixelOffset: any;
|
||
/**
|
||
*沿视角方向旋转角度,单位弧度值
|
||
*/
|
||
rotation: any;
|
||
/**
|
||
* 宽度: 默认以像素为单位,当sizeInMeters参数为true是单位为米; 最小值大于0
|
||
*/
|
||
width: any;
|
||
/**
|
||
* 高度: 默认以像素为单位,当sizeInMeters参数为true是单位为米; 最小值大于0
|
||
*/
|
||
height: any;
|
||
/**
|
||
* 颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
color: any;
|
||
scaleByDistance: any;
|
||
/**
|
||
* 大小是否以米为单位
|
||
*/
|
||
sizeInMeters: any;
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference: any;
|
||
disableDepthTestDistance: any;
|
||
}
|
||
class BillboardGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 图片路径
|
||
*/
|
||
image: String;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale?: number;
|
||
/**
|
||
* 水平对齐 : 'left' 左对齐; 'center' 居中; 'right' 右对齐;
|
||
*/
|
||
horizontalOrigin?: String;
|
||
/**
|
||
* 垂直对齐 : 'baseline'基线对齐; 'bottom' 底部对齐; 'center' 中间对齐; 'top' 顶部对齐
|
||
*/
|
||
verticalOrigin?: String;
|
||
/**
|
||
* 视角偏移[x,y,z] 空间坐标值 单位为米
|
||
*/
|
||
eyeOffset?: Array<number>;
|
||
/**
|
||
* 像素偏移 [x,y] x:相对中心点屏幕横向偏移; y:相对中心点屏幕纵向偏移; 单位像素值
|
||
*/
|
||
pixelOffset?: Array<number>;
|
||
/**
|
||
* 沿视角方向旋转角度,单位弧度值
|
||
*/
|
||
rotation?: number;
|
||
/**
|
||
* 宽度: 默认以像素为单位,当sizeInMeters参数为true是单位为米; 最小值大于0
|
||
*/
|
||
width: number;
|
||
/**
|
||
* 高度: 默认以像素为单位,当sizeInMeters参数为true是单位为米; 最小值大于0
|
||
*/
|
||
height: number;
|
||
/**
|
||
* 颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
color?: String;
|
||
scaleByDistance?: Array<number>;
|
||
/**
|
||
* 大小是否以米为单位
|
||
*/
|
||
sizeInMeters?: Boolean;
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference?: String;
|
||
disableDepthTestDistance?: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 圆锥的操作
|
||
* @see <a href='../../../examples/gallery/editor.html#cylinderRotate'>圆锥旋转</a>
|
||
*/
|
||
class BindedCylinderGraphic extends GraphicPositionItem {
|
||
protected _opt: BindedCylinderOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 圆锥沿当前位置与任一点构成的向量旋转
|
||
* ```
|
||
* 示例代码:
|
||
* let bindedCylinder = new GV.BindedCylinderGraphic();
|
||
* viewer.graphicLayer.add(bindedCylinder);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(option: BindedCylinderOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取圆锥颜色
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置圆锥颜色
|
||
* @param value 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 获取开合角
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置开合角
|
||
* @param value 开合角
|
||
*/
|
||
angle: number;
|
||
/**
|
||
* 按指定旋转轴和旋转角度进行旋转
|
||
* @param nextPosition 旋转轴的下一点位置(即当前点position与下一点nextPosition组成的直线作为旋转轴)
|
||
* @param horizontalAngle 水平旋转角
|
||
* @param verticalAngle 垂直旋转角
|
||
*/
|
||
rotate(nextPosition: GeoPoint, horizontalAngle: number, verticalAngle: number): void;
|
||
/**
|
||
* 获取下一点位置
|
||
* @returns
|
||
*/
|
||
readonly nextPosition: GeoPoint;
|
||
/**
|
||
* 获取水平旋转角
|
||
* @returns
|
||
*/
|
||
readonly horizontalAngle: number;
|
||
/**
|
||
* 获取垂直旋转角
|
||
* @returns
|
||
*/
|
||
readonly verticalAngle: number;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class BindedCylinderOpt extends GraphicPositionItemOpt {
|
||
/**圆锥位置,以圆锥顶部为中心 */
|
||
/**圆锥开合角 */
|
||
angle: number;
|
||
/**下一点位置 */
|
||
nextPosition: GeoPoint;
|
||
/**圆锥颜色 */
|
||
color: string;
|
||
/**水平旋转角 */
|
||
horizontalAngle: number;
|
||
/**垂直旋转角 */
|
||
verticalAngle: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 点几何体绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#plottingPoint'>点</a>
|
||
*/
|
||
class BlastGraphic extends GraphicPositionItem {
|
||
protected _opt: BlastGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 点几何体构造方法
|
||
* ```
|
||
* 示例代码
|
||
* let point = new GV.PointGraphic({position:new GV.GeoPoint(10,10)});
|
||
* viewer.graphicLayer.add(point);
|
||
* ```
|
||
*/
|
||
constructor(option: BlastGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 开始颜色
|
||
*/
|
||
startColor: any;
|
||
/**
|
||
* 结束颜色
|
||
*/
|
||
endColor: any;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class BlastGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 开始颜色 CssColor
|
||
*/
|
||
startColor?: string;
|
||
/**
|
||
* 结束颜色 CssColor
|
||
*/
|
||
endColor?: string;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 标牌绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#bubble'>标牌</a>
|
||
*/
|
||
class BubbleGraphic extends GraphicItem {
|
||
protected _opt: BubbleGraphicOpt;
|
||
protected _type: string;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 标牌构造方法
|
||
* * ```
|
||
* 示例代码
|
||
* let bubbleGraphicOpt = new GV.BubbleGraphicOpt();
|
||
* bubbleGraphicOpt.bindObject = new GV.GeoPoint(80, 40);
|
||
* let bubble = new GV.BubbleGraphic(bubbleGraphicOpt);
|
||
* graphicLayer.add(bubble);
|
||
* ```
|
||
*/
|
||
constructor(option: BubbleGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 获取标牌类型
|
||
*/
|
||
bubbleType: BubbleTypeEnum;
|
||
/**
|
||
* 获取标牌面板初始时位置偏移像素
|
||
*/
|
||
panelOffset: {
|
||
x: number;
|
||
y: number;
|
||
};
|
||
/**
|
||
* deprecated 获取或设置绑定对象(目前支持GeoPoint对象)
|
||
*/
|
||
bindObject: any;
|
||
/**
|
||
* position 转入至 bindObject
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 获取标牌面板DOM,标牌展示效果使用获取的 DOM 进行自定义修改
|
||
*/
|
||
readonly panelDom: any;
|
||
/**
|
||
* 获取标牌线DOM,相关样式使用获取的 DOM 进行修改
|
||
*/
|
||
readonly lineDom: any;
|
||
/**
|
||
* 获取或设置是否开启标牌拖拽
|
||
*/
|
||
panelDrag: boolean;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): any;
|
||
}
|
||
/**
|
||
* 标牌数据约束及默认值
|
||
*/
|
||
class BubbleGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 标牌面板初始时位置偏移像素
|
||
* 如果bubbleType为BubbleTypeEnum.FollowBubble则此参数为标牌面板相对于幕布位置
|
||
* 如果bubbleType为BubbleTypeEnum.FixedBubble则此参数为标牌面板相对于锚点位置
|
||
*/
|
||
panelOffset: {
|
||
x: number;
|
||
y: number;
|
||
};
|
||
/**
|
||
* 是否开启面板拖拽
|
||
*/
|
||
panelDrag: boolean;
|
||
/**
|
||
* 绑定对象
|
||
*/
|
||
bindObject: any;
|
||
/**
|
||
* 锚点坐标,设置时将自动设置为 bindObject 对象
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* Bubble类型
|
||
*/
|
||
bubbleType: BubbleTypeEnum;
|
||
visible: boolean;
|
||
}
|
||
/**
|
||
* 标牌类型枚举
|
||
*/
|
||
enum BubbleTypeEnum {
|
||
FixedBubble = "fixedBubble",
|
||
FollowBubble = "followBubble"
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 贴地圆、贴地扇形几何体
|
||
* @see <a href='../../../examples/gallery/editor.html#geometry'>圆柱</a>
|
||
*/
|
||
class CircularGraphic extends GraphicPositionItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: CircularGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* //绘制圆
|
||
* let circularGraphic = new GV.CircularGraphic({
|
||
* color: 'rgba(255,255,0, 0.5)',
|
||
* position: new GV.GeoPoint(0, 0, 2000),
|
||
* radius: 100000, //半径
|
||
* clampToGround: true //贴地
|
||
* });
|
||
* viewer.graphicLayer.add(circularGraphic); //添加到场景
|
||
*
|
||
* //绘制扇形
|
||
* let sector = new GV.CircularGraphic({
|
||
* color: 'rgba(255,0,0, 0.5)',
|
||
* position: new GV.GeoPoint(0, 5, 2000),
|
||
* radius: 100000, //半径
|
||
* clampToGround: false, //不贴地
|
||
* startAngle: 20, //起始角
|
||
* endAngle: 100 //终止角
|
||
* });
|
||
* viewer.graphicLayer.add(sector); //添加到场景
|
||
* ```
|
||
*/
|
||
constructor(option: CircularGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 半径
|
||
*/
|
||
radius: any;
|
||
/**
|
||
*起始角(单位:角度)
|
||
*/
|
||
startAngle: any;
|
||
/**
|
||
* 终止角(单位:角度)
|
||
*/
|
||
endAngle: any;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 是否贴合地形
|
||
*/
|
||
clampToGround: any;
|
||
/**
|
||
* 点集用于扇形,越大扇形越光滑
|
||
*/
|
||
step: any;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class CircularGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 是否贴地
|
||
*/
|
||
clampToGround: boolean;
|
||
/**
|
||
* 半径(单位m)
|
||
*/
|
||
radius?: number;
|
||
/**
|
||
*起始角(单位:角度)
|
||
*/
|
||
startAngle?: number;
|
||
/**
|
||
* 终止角(单位:角度)
|
||
*/
|
||
endAngle?: number;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color?: string;
|
||
/**
|
||
* 点集用于扇形,点集越大扇形越光滑
|
||
*/
|
||
step?: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 文本POI绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#textPOI'>文本</a>
|
||
*/
|
||
class CustomLabelGraphic extends GraphicPositionItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: CustomLabelGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* var customLabelGraphicOpt = new GV.CustomLabelGraphicOpt();
|
||
* customLabelGraphicOpt.position = new GV.GeoPoint(0, 0);
|
||
* customLabelGraphicOpt.width = 100;
|
||
* customLabelGraphicOpt.height = 100;
|
||
* customLabelGraphicOpt.text = '星图';
|
||
* customLabelGraphicOpt.backgroundColor = 'rgba(0,0,255,1.0)';
|
||
* var customLabelGraphic = new GV.CustomLabelGraphic(customLabelGraphicOpt);
|
||
* viewer.graphicLayer.add(customLabelGraphic);
|
||
* ```
|
||
*/
|
||
constructor(option: CustomLabelGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): any;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 文字
|
||
*/
|
||
text: any;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale: any;
|
||
/**
|
||
* 宽度: 默认以像素为单位,当sizeInMeters参数为true是单位为米; 最小值大于0
|
||
*/
|
||
width: any;
|
||
/**
|
||
* 高度: 默认以像素为单位,当sizeInMeters参数为true是单位为米; 最小值大于0
|
||
*/
|
||
height: any;
|
||
/**
|
||
* 背景颜色
|
||
*/
|
||
backgroundColor: any;
|
||
/**
|
||
* 垂直对齐方式 : 'baseline'基线对齐; 'bottom' 底部对齐; 'center' 中间对齐; 'top' 顶部对齐
|
||
*/
|
||
verticalOrigin: any;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
readonly clampToGround: boolean;
|
||
/**
|
||
* 设置显示范围 示例[near, far]
|
||
* label.distanceDisplayCondition = [0,1000000]
|
||
*/
|
||
distanceDisplayCondition: Array<number>;
|
||
getEditor(viewer: Cesium.Viewer, editorMgr: EditorManager): PointEditor;
|
||
}
|
||
class CustomLabelGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 文字内容
|
||
*/
|
||
text?: string;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale?: number;
|
||
/**
|
||
* 宽度: 默认以像素为单位,当sizeInMeters参数为true是单位为米; 最小值大于0
|
||
*/
|
||
width?: number;
|
||
/**
|
||
* 高度: 默认以像素为单位,当sizeInMeters参数为true是单位为米; 最小值大于0
|
||
*/
|
||
height?: number;
|
||
/**
|
||
* 背景颜色
|
||
*/
|
||
backgroundColor?: string;
|
||
/**
|
||
* 垂直对齐 : 'baseline'基线对齐; 'bottom' 底部对齐; 'center' 中间对齐; 'top' 顶部对齐
|
||
*/
|
||
verticalOrigin?: String;
|
||
/**
|
||
* 显示范围 示例[near, far] 物体在near和far的相机距离之间显示; near和far的单位为米;
|
||
*/
|
||
distanceDisplayCondition?: Array<number>;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 动态圆柱几何体
|
||
* @see <a href='../../../examples/gallery/editor.html#cylinderSensor'>动态圆柱</a>
|
||
*/
|
||
class CylinderDynamicGraphic extends GraphicItem {
|
||
protected _opt: CylinderDynamicGraphicOpt;
|
||
protected _type: string;
|
||
protected _renderCylinder: any;
|
||
protected _bindTop: GraphicItem;
|
||
protected _bindBottom: GraphicItem;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 动态圆柱几何体
|
||
* ```
|
||
* 示例代码:
|
||
* let cylinderDynamicGraphicOpt=new GV.CylinderDynamicGraphicOpt();
|
||
* let cylinder = new GV.CylinderDynamicGraphic(cylinderDynamicGraphicOpt);
|
||
* viewer.graphicLayer.add(cylinder);
|
||
* ```
|
||
*/
|
||
constructor(option: CylinderDynamicGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 获取最大控制点数量(编辑中的PolylineCreator使用,为无限大时可以省略)
|
||
*/
|
||
getMaxCtrlPosNum(): number;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 绑定顶端标绘
|
||
* * @param v 被绑定的标绘对象(注意:对象必须实现position属性GeoPoint类型)
|
||
*
|
||
* */
|
||
/**
|
||
* 获取顶端绑定的标绘对象
|
||
* @returns
|
||
*/
|
||
topBind: GraphicItem;
|
||
/**
|
||
* 绑定底端标绘
|
||
* * @param v 被绑定的标绘对象(注意:对象必须实现position属性GeoPoint类型)
|
||
*
|
||
* */
|
||
/**
|
||
* 获取底端绑定的标绘对象
|
||
* @returns
|
||
*/
|
||
bottomBind: GraphicItem;
|
||
/**
|
||
* 圆柱顶面位置
|
||
* @param value 顶面位置
|
||
*
|
||
* */
|
||
/**
|
||
* 获取顶面位置
|
||
* @returns
|
||
*/
|
||
topPosition: GeoPoint;
|
||
/**
|
||
* 圆柱底面位置
|
||
* @param value 底面位置
|
||
*/
|
||
/**
|
||
* 获取底面位置
|
||
* @returns
|
||
*/
|
||
bottomPosition: GeoPoint;
|
||
/**
|
||
* 设置圆柱顶面半径
|
||
* @param value 顶面半径
|
||
*/
|
||
/**
|
||
* 获取顶面半径
|
||
* @returns
|
||
*/
|
||
topRadius: number;
|
||
/**
|
||
* 设置圆柱底面半径
|
||
* @param value 底面半径
|
||
*/
|
||
/**
|
||
* 获取底面半径
|
||
* @returns
|
||
*/
|
||
bottomRadius: number;
|
||
/**
|
||
* 设置速度
|
||
* @param value 速度 范围 1-5
|
||
*/
|
||
/**
|
||
* 获取速度
|
||
* @returns
|
||
*
|
||
*/
|
||
speed: number;
|
||
/**
|
||
* 设置条纹颜色
|
||
* @param value 条纹颜色
|
||
*/
|
||
/**
|
||
* 获取条纹颜色
|
||
* @returns
|
||
*/
|
||
evenConeColor: string;
|
||
/**
|
||
* 设置条纹颜色
|
||
* @param value 条纹颜色
|
||
*/
|
||
/**
|
||
* 获取条纹颜色
|
||
* @returns
|
||
*/
|
||
oddConeColor: string;
|
||
/**
|
||
* 设置切分份数
|
||
* @param value 切分份数
|
||
*/
|
||
/**
|
||
* 获取切分份数
|
||
* @returns
|
||
*/
|
||
slice: number;
|
||
/**设置条纹间距 */
|
||
/**获取条纹间距 */
|
||
space: number;
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 获取中心点
|
||
*/
|
||
getCenterPosition(): GeoPoint;
|
||
movePosition(offsetLon: any, offsetLat: any, offsetAlt: any): void;
|
||
parseJson(option: any): void;
|
||
bindToJson(doc: any[]): void;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class CylinderDynamicGraphicOpt extends GraphicItemOpt {
|
||
/**圆柱顶面位置 */
|
||
topPosition?: GeoPoint;
|
||
/**圆柱底面位置 */
|
||
bottomPosition?: GeoPoint;
|
||
/**
|
||
* 圆柱顶面半径
|
||
*/
|
||
topRadius?: number;
|
||
/**
|
||
* 圆柱底面半径
|
||
* */
|
||
bottomRadius?: number;
|
||
/**
|
||
* 速度 范围1-5
|
||
*/
|
||
speed?: number;
|
||
/**
|
||
* 条纹颜色
|
||
*/
|
||
evenConeColor?: string;
|
||
/**
|
||
* 条纹颜色
|
||
*/
|
||
oddConeColor?: string;
|
||
/**相邻两个条纹之间的间距 */
|
||
space?: number;
|
||
/**
|
||
* 切分份数
|
||
*/
|
||
slice?: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 圆柱几何体
|
||
* @see <a href='../../../examples/gallery/editor.html#geometry'>圆柱</a>
|
||
*/
|
||
class CylinderGraphic extends GraphicPositionItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: CylinderGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let CylinderGraphic = new GV.CylinderGraphic({...});
|
||
* ```
|
||
*/
|
||
constructor(option: CylinderGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 高度参考
|
||
*/
|
||
heightReference: any;
|
||
/**
|
||
* 长度
|
||
*/
|
||
length: any;
|
||
/**
|
||
* 顶部半径
|
||
*/
|
||
topRadius: any;
|
||
/**
|
||
* 底部半径
|
||
*/
|
||
bottomRadius: any;
|
||
/**
|
||
* 偏航
|
||
*/
|
||
heading: any;
|
||
/**
|
||
* 俯仰
|
||
*/
|
||
pitch: any;
|
||
/**
|
||
* 翻转
|
||
*/
|
||
roll: any;
|
||
/**
|
||
* 是否填充
|
||
*/
|
||
fill: any;
|
||
/**
|
||
* 填充颜色
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 是否填充
|
||
*/
|
||
outline: any;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
outlineColor: any;
|
||
/**
|
||
* 轮廓宽度
|
||
*/
|
||
outlineWidth: any;
|
||
/**
|
||
* 沿轮廓周边绘制的垂直线数
|
||
*/
|
||
numberOfVerticalLines: any;
|
||
/**
|
||
* 周长的边数
|
||
*/
|
||
slices: any;
|
||
/**
|
||
* 是否投射或接收来自每个光源的阴影
|
||
*/
|
||
shadows: any;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class CylinderGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference?: String;
|
||
/**
|
||
* 圆柱长度
|
||
*/
|
||
length: number;
|
||
/**
|
||
* 圆柱顶部的半径
|
||
*/
|
||
topRadius: number;
|
||
/**
|
||
* 圆柱体底部的半径
|
||
*/
|
||
bottomRadius: number;
|
||
/**
|
||
* 偏航角围绕负z轴旋转
|
||
*/
|
||
heading?: number;
|
||
/**
|
||
* 俯仰角绕负y轴旋转
|
||
*/
|
||
pitch?: number;
|
||
/**
|
||
* 翻转角绕正x轴旋转
|
||
*/
|
||
roll?: number;
|
||
/**
|
||
* 是否填充提供的材质
|
||
*/
|
||
fill?: Boolean;
|
||
/**
|
||
* 填充材质
|
||
*/
|
||
color?: String;
|
||
/**
|
||
* 是否轮廓
|
||
*/
|
||
outline?: Boolean;
|
||
/**
|
||
* 轮廓颜色
|
||
*/
|
||
outlineColor?: String;
|
||
/**
|
||
* 轮廓宽度
|
||
*/
|
||
outlineWidth?: number;
|
||
/**
|
||
* 沿轮廓周边绘制的垂直线数
|
||
*/
|
||
numberOfVerticalLines?: number;
|
||
/**
|
||
* 圆柱周长的边数
|
||
*/
|
||
slices?: number;
|
||
/**
|
||
* 是否投射或接收来自每个光源的阴影: 'cast_only' 仅投射阴影; 'disabled' 不会投射或接收阴影; 'enabled' 投射和接收阴影; 'receive_only' 仅接收阴影;
|
||
*/
|
||
shadows?: Boolean;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 仪表盘效果
|
||
* @see <a href='../../../examples/gallery/editor.html#dashEffect'>仪表盘</a>
|
||
*/
|
||
class DashBoardGraphic extends GraphicPositionItem {
|
||
protected _opt: DashGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 仪表盘
|
||
* ```
|
||
* 示例代码:
|
||
* let opt = new GV.DashGraphicOpt();
|
||
* opt.dashColor = 'rgba(255.0, 0.0, 0.0, 1)';
|
||
* opt.position = new GV.GeoPoint(80, 31.85, 0);
|
||
* opt.radius = 1500;
|
||
* let dashScan = new GV.DashBoardGraphic(opt);
|
||
* viewer.graphicLayer.add(dashScan);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(option: DashGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取旋转角度
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置旋转角度
|
||
* @param value 角度
|
||
*/
|
||
angle: number;
|
||
/**
|
||
* 获取颜色
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置颜色
|
||
* @param value 颜色
|
||
*/
|
||
dashColor: string;
|
||
/**
|
||
* 获取半径
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置半径
|
||
* @param value 半径
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 获取贴地状态(只读)
|
||
*/
|
||
readonly clampToGround: boolean;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class DashGraphicOpt extends GraphicPositionItemOpt {
|
||
/**颜色 */
|
||
dashColor?: string;
|
||
/**半径 */
|
||
radius?: number;
|
||
/**旋转角度 */
|
||
angle: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 动态波纹
|
||
* @see <a href='../../../examples/gallery/editor.html#dynamicRipple'>动态波纹</a>
|
||
*/
|
||
class DynamicRippleGraphic extends GraphicPositionItem {
|
||
protected _opt: DynamicRippleGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 动态波纹
|
||
* ```
|
||
* 示例代码:
|
||
* let opt = new GV.DynamicRippleGraphicOpt();
|
||
* opt.position = new GV.GeoPoint(80, 30, 200000);
|
||
* let test = new GV.DynamicRippleGraphic(opt);
|
||
* viewer.graphicLayer.add(test);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(option: DynamicRippleGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 设置半径
|
||
* @param value 半径
|
||
*/
|
||
/**
|
||
* 获取半径
|
||
* @returns
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 设置颜色
|
||
* @param value 颜色
|
||
*/
|
||
/**
|
||
* 获取颜色
|
||
* @returns
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 轮廓线是否开启
|
||
* @param value 标志位
|
||
*/
|
||
/**
|
||
* 获取轮廓线是否开启
|
||
* @returns
|
||
*/
|
||
outline: boolean;
|
||
/**
|
||
* 设置轮廓线颜色
|
||
* @param value 轮廓线颜色
|
||
*/
|
||
/**
|
||
* 获取轮廓线颜色
|
||
* @returns
|
||
*/
|
||
outlineColor: string;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class DynamicRippleGraphicOpt extends GraphicPositionItemOpt {
|
||
/**半径 */
|
||
radius?: number;
|
||
/**颜色 */
|
||
color?: string;
|
||
/**轮廓线是否开启 */
|
||
outline?: boolean;
|
||
/**轮廓线颜色 */
|
||
outlineColor?: string;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 椭圆几何体
|
||
* @see <a href='../../../examples/gallery/editor.html#geometry'>椭圆</a>
|
||
*/
|
||
class EllipseGraphic extends GraphicPositionItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: EllipseGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let ellipseGraphic = new GV.EllipseGraphic({...});
|
||
* ```
|
||
*/
|
||
constructor(option: EllipseGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 短半轴
|
||
*/
|
||
semiMinorAxis: any;
|
||
/**
|
||
* 长半轴
|
||
*/
|
||
semiMajorAxis: any;
|
||
/**
|
||
* 高度参考
|
||
*/
|
||
heightReference: any;
|
||
/**
|
||
* 挤压面相对于椭球面的高度
|
||
*/
|
||
extrudedHeight: any;
|
||
/**
|
||
* extrudedHeight相对于什么
|
||
*/
|
||
extrudedHeightReference: any;
|
||
/**
|
||
* 是否填充
|
||
*/
|
||
fill: any;
|
||
/**
|
||
* 材质
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 是否显示轮廓线(如果显示廓线固定宽度为1像素)
|
||
*/
|
||
outline: any;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
outlineColor: any;
|
||
/**
|
||
* 沿轮廓周边绘制的垂直线数
|
||
*/
|
||
numberOfVerticalLines: any;
|
||
/**
|
||
* 沿视角方向旋转角度,单位弧度值
|
||
*/
|
||
rotation: any;
|
||
/**
|
||
* 从北向逆时针旋转椭圆纹理
|
||
*/
|
||
stRotation: any;
|
||
/**
|
||
* 椭圆上点之间的角距离:'radians_per_degree' 弧度数
|
||
*/
|
||
granularity: any;
|
||
/**
|
||
* 是否投射或接收来自每个光源的阴影
|
||
*/
|
||
shadows: any;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class EllipseGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 长半轴
|
||
*/
|
||
semiMajorAxis: number;
|
||
/**
|
||
* 短半轴
|
||
*/
|
||
semiMinorAxis: number;
|
||
/**
|
||
* 椭圆相对于椭球面的高度
|
||
*/
|
||
height?: number;
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference?: String;
|
||
/**
|
||
* 椭圆的挤压面相对于椭球面的高度
|
||
*/
|
||
extrudedHeight?: number;
|
||
/**
|
||
* extrudedHeight的相对参考:'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
extrudedHeightReference?: String;
|
||
/**
|
||
* 是否填充提供的材质
|
||
*/
|
||
fill?: Boolean;
|
||
/**
|
||
* 填充材质
|
||
*/
|
||
color?: String;
|
||
/**
|
||
* 是否轮廓轮(如果显示廓线固定宽度为1像素)
|
||
*/
|
||
outline?: Boolean;
|
||
/**
|
||
* 轮廓颜色
|
||
*/
|
||
outlineColor?: String;
|
||
/**
|
||
* 沿轮廓周边绘制的垂直线数
|
||
*/
|
||
numberOfVerticalLines?: number;
|
||
/**
|
||
* 沿视角方向旋转角度,单位弧度值
|
||
*/
|
||
rotation?: number;
|
||
/**
|
||
* 从北向逆时针旋转椭圆纹理
|
||
*/
|
||
stRotation?: number;
|
||
/**
|
||
* 椭圆上点之间的角距离:弧度数 degrees_per_radian: 180.0 / Math.PI; epsilon1: 0.1; epsilon2: 0.01; epsilon3: 0.001
|
||
*/
|
||
granularity?: string;
|
||
/**
|
||
* 是否投射或接收来自每个光源的阴影: 'cast_only' 仅投射阴影; 'disabled' 不会投射或接收阴影; 'enabled' 投射和接收阴影; 'receive_only' 仅接收阴影;
|
||
*/
|
||
shadows?: String;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 椭球体
|
||
* @see <a href='../../../examples/gallery/editor.html#geometry'>椭球体</a>
|
||
*/
|
||
class EllipsoidGraphic extends GraphicPositionItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: EllipsoidGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let ellipsoidGraphic = new GV.EllipsoidGraphic({...});
|
||
* ```
|
||
*/
|
||
constructor(option: EllipsoidGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 高度参考
|
||
*/
|
||
heightReference: any;
|
||
/**
|
||
* 半径
|
||
*/
|
||
radii: any;
|
||
/**
|
||
* 是否填充
|
||
*/
|
||
fill: any;
|
||
/**
|
||
* 材质
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 是否显示轮廓线(如果显示廓线固定宽度为1像素)
|
||
*/
|
||
outline: any;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
outlineColor: any;
|
||
/**
|
||
* 每个轮廓环的样本数,确定曲率的粒度
|
||
*/
|
||
subdivisions: any;
|
||
/**
|
||
* 堆栈数
|
||
*/
|
||
stackPartitions: any;
|
||
/**
|
||
* 径向切片数
|
||
*/
|
||
slicePartitions: any;
|
||
/**
|
||
* 是否投射或接收来自每个光源的阴影
|
||
*/
|
||
shadows: any;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class EllipsoidGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference?: String;
|
||
/**
|
||
* 半径 示例[x, y, z]
|
||
*/
|
||
radii?: Array<number>;
|
||
/**
|
||
* 是否填充提供的材质
|
||
*/
|
||
fill?: Boolean;
|
||
/**
|
||
* 填充材质
|
||
*/
|
||
color?: String;
|
||
/**
|
||
* 是否轮廓(如果显示廓线固定宽度为1像素)
|
||
*/
|
||
outline?: Boolean;
|
||
/**
|
||
* 轮廓颜色
|
||
*/
|
||
outlineColor?: String;
|
||
/**
|
||
* 每个轮廓环的样本数,确定曲率的粒度
|
||
*/
|
||
subdivisions?: number;
|
||
/**
|
||
* 堆栈数
|
||
*/
|
||
stackPartitions?: number;
|
||
/**
|
||
* 径向切片数
|
||
*/
|
||
slicePartitions?: number;
|
||
/**
|
||
* 是否投射或接收来自每个光源的阴影: 'cast_only' 仅投射阴影; 'disabled' 不会投射或接收阴影; 'enabled' 投射和接收阴影; 'receive_only' 仅接收阴影;
|
||
*/
|
||
shadows?: String;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 点几何体绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#plottingPoint'>点</a>
|
||
*/
|
||
class FireGraphic extends GraphicPositionItem {
|
||
protected _opt: FireGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 点几何体构造方法
|
||
* ```
|
||
* 示例代码
|
||
* let point = new GV.PointGraphic({position:new GV.GeoPoint(10,10)});
|
||
* viewer.graphicLayer.add(point);
|
||
* ```
|
||
*/
|
||
constructor(option: FireGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 开始颜色
|
||
*/
|
||
startColor: any;
|
||
/**
|
||
* 结束颜色
|
||
*/
|
||
endColor: any;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 形态
|
||
* item.renderType = GV.FireGraphicEnum.FIRE
|
||
*/
|
||
renderType: string;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class FireGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 开始颜色 CssColor
|
||
*/
|
||
startColor?: string;
|
||
/**
|
||
* 结束颜色 CssColor
|
||
*/
|
||
endColor?: string;
|
||
/**
|
||
* 形态 FireGraphicEnum.FIRE / FireGraphicEnum.SMKOE
|
||
*/
|
||
renderType?: string;
|
||
}
|
||
/**
|
||
* 例子类型
|
||
*/
|
||
enum FireGraphicEnum {
|
||
/**
|
||
* 火焰形态
|
||
*/
|
||
FIRE = "fire",
|
||
/**
|
||
* 烟雾形态
|
||
*/
|
||
SMOKE = "smoke"
|
||
}
|
||
|
||
class FirePrimitive {
|
||
private polygonHierarchy;
|
||
private modelMatrix;
|
||
show: any;
|
||
geometry: any;
|
||
vertexArray: any;
|
||
command: any;
|
||
time: any;
|
||
shaderProgram: any;
|
||
height: any;
|
||
constructor(options?: {});
|
||
createVertexArray(context: any): any;
|
||
createCommand(context: any): any;
|
||
createTexture(context: any, width: any, height: any, source: any, pixelFormat?: number, pixelDatatype?: any): any;
|
||
update(frameState: any): void;
|
||
isDestroyed(): boolean;
|
||
destroy(): void;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 旗子形状的绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#plotEdit'>编辑旗帜</a>
|
||
*/
|
||
class FlagGraphic extends GraphicItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: FlagGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let flagGraphic= new GV.FlagGraphic({
|
||
* position: new GV.GeoPoint(0,0,10),
|
||
* text: '这是个旗子',
|
||
* lineWidth: 3,
|
||
* color: '#ff0000'
|
||
* })
|
||
* viewer.graphicLayer.add(flagGraphic);
|
||
* ```
|
||
*/
|
||
constructor(option: FlagGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): any;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 位置
|
||
*/
|
||
position: any;
|
||
/**
|
||
* 文字
|
||
*/
|
||
text: string;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale: number;
|
||
/**
|
||
* 拐点相对锚点像素偏移
|
||
* 第一个值为沿x方向偏移
|
||
* 第二个值为沿y方向偏移
|
||
* `
|
||
* 示例代码
|
||
* flagGraphic.inflectionOffset = [10,10]
|
||
* `
|
||
*/
|
||
inflectionOffset: Array<number>;
|
||
/**
|
||
* 旗杆高度 单位像素
|
||
*/
|
||
flagpoleHeight: number;
|
||
/**
|
||
* 线宽
|
||
*/
|
||
lineWidth: number;
|
||
/**
|
||
* 字体大小
|
||
*/
|
||
textSize: number;
|
||
/**
|
||
* 文字颜色 css颜色
|
||
*/
|
||
textColor: string;
|
||
/**
|
||
* 旗面颜色
|
||
*/
|
||
fillColor: string;
|
||
/**
|
||
* 线框颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 获取canvas相关信息
|
||
*/
|
||
getCanvasInfo(): any;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
readonly clampToGround: boolean;
|
||
}
|
||
class FlagGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 位置 lon为经度, lat 为纬度, alt为高度
|
||
* ```
|
||
* 示例代码
|
||
* let position = new GV.GeoPoint(-80.0, 34.0, 0.0)
|
||
* ```
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 文字内容
|
||
*/
|
||
text: string;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale?: number;
|
||
/**
|
||
* 拐点相对锚点像素偏移
|
||
* 第一个值为沿x方向偏移
|
||
* 第二个值为沿y方向偏移
|
||
*/
|
||
inflectionOffset?: Array<number>;
|
||
/**
|
||
* 旗杆高度 单位像素
|
||
*/
|
||
flagpoleHeight?: number;
|
||
/**
|
||
* 字体大小
|
||
*/
|
||
textSize?: number;
|
||
/**
|
||
* 文字颜色 css字符串
|
||
*/
|
||
textColor?: string;
|
||
/**
|
||
* 旗面颜色
|
||
*/
|
||
fillColor?: string;
|
||
/**
|
||
* 线框颜色
|
||
*/
|
||
color?: string;
|
||
/**
|
||
* 线宽
|
||
*/
|
||
lineWidth?: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 流动墙体的绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#flowWall'>流动墙体</a>
|
||
*/
|
||
class FlowWallGraphic extends GraphicItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: FlowWallGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
*/
|
||
constructor(option: FlowWallGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): any;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 位置数组
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 重复次数
|
||
*/
|
||
repeat: Cesium.Cartesian2;
|
||
/**
|
||
* 纹理URL
|
||
*/
|
||
image: string;
|
||
/**
|
||
* 速度
|
||
* 说明:范围1-10
|
||
*/
|
||
speed: number;
|
||
/**
|
||
* 流动方向
|
||
*/
|
||
flowDir: DirEnum;
|
||
/**
|
||
* 高度数组
|
||
*/
|
||
maximumHeights: any;
|
||
/**
|
||
* 底部数组
|
||
*/
|
||
minimumHeights: any;
|
||
}
|
||
/**
|
||
* 流动墙体参数类
|
||
*/
|
||
class FlowWallGraphicOpt {
|
||
/**
|
||
* 位置数组
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 重复次数
|
||
*/
|
||
repeat: Cesium.Cartesian2;
|
||
/**
|
||
* 纹理URL
|
||
*/
|
||
image: string;
|
||
/**
|
||
* 速度
|
||
*/
|
||
speed: number;
|
||
/**
|
||
* 流动方向
|
||
*/
|
||
flowDir: DirEnum;
|
||
/**
|
||
* 指定用于墙顶的高度数组,而不是每个位置的高度.[100000, 200000, 100000, 200000, 100000, 200000 ...]
|
||
*/
|
||
maximumHeights: Array<number>;
|
||
/**
|
||
* 指定要用于墙的底部而不是地球表面的高度数组.[0, 100000, 0, 100000, 0, 100000, 0,...]
|
||
*/
|
||
minimumHeights: Array<number>;
|
||
}
|
||
/**
|
||
* 流动方向枚举
|
||
*/
|
||
enum DirEnum {
|
||
/**
|
||
* 垂直
|
||
*/
|
||
'vertical' = 1,
|
||
/**
|
||
* 水平
|
||
*/
|
||
'horizontal' = 0
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 渐变扇形
|
||
* @see <a href='../../../examples/gallery/editor.html#gradientSector'>渐变扇形</a>
|
||
*/
|
||
class GradientSectorGraphic extends GraphicItem {
|
||
protected _opt: GradientSectorGraphicOpt;
|
||
protected _type: string;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 渐变扇形
|
||
* ```
|
||
* 示例代码:
|
||
* let gradientSectorGraphic=new GV.GradientSectorGraphic();
|
||
* let sector = new GV.GradientSectorGraphic(GradientSectorGraphicOpt);
|
||
* viewer.graphicLayer.add(sector);
|
||
* ```
|
||
*/
|
||
constructor(option: GradientSectorGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* @ignore
|
||
* @描述 重写该方法用于屏蔽文档中显示该类的继承方法
|
||
*/
|
||
getCenterPosition(): void;
|
||
/**
|
||
* @ignore
|
||
* @描述 重写该方法用于屏蔽文档中显示该类的继承方法
|
||
*/
|
||
movePosition(): void;
|
||
/**
|
||
* 设置扇形顶点位置
|
||
* @param value 扇形顶点位置
|
||
*/
|
||
/**
|
||
* 获取扇形顶点位置
|
||
* @returns
|
||
*/
|
||
topPosition: GeoPoint;
|
||
/**
|
||
* 设置扇形底点位置
|
||
* @param value 扇形底点位置
|
||
*/
|
||
/**
|
||
* 获取扇形底点位置
|
||
* @returns
|
||
*/
|
||
bottomPosition: GeoPoint;
|
||
/**
|
||
* 获取扇形位置,返回底点位置
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置扇形位置
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 设置扇形开合角度
|
||
* @param value 扇形开合角度
|
||
*/
|
||
/**
|
||
* 获取扇形开合角度
|
||
* @returns
|
||
*/
|
||
fov: number;
|
||
/**
|
||
* 设置颜色
|
||
* @param value 条纹颜色
|
||
*/
|
||
/**
|
||
* 获取颜色
|
||
* @returns
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 获取旋转角度
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置旋转角度
|
||
* @param value 旋转角度
|
||
*/
|
||
rotation: number;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class GradientSectorGraphicOpt extends GraphicItemOpt {
|
||
/**顶点位置 */
|
||
topPosition?: GeoPoint;
|
||
/**底点位置 */
|
||
bottomPosition?: GeoPoint;
|
||
/**
|
||
* 开合角度
|
||
*/
|
||
fov?: number;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color?: string;
|
||
rotation?: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 绘制数据对象组对象提供了绘制数据对象的组管理
|
||
* @see <a href='../../../examples/gallery/editor.html#plottingPoint'>示例组</a>
|
||
*/
|
||
class GraphicGroup extends Event {
|
||
protected _type: string;
|
||
private _name;
|
||
private _id;
|
||
private _itemList;
|
||
protected _father: GraphicGroup;
|
||
private _visible;
|
||
private _extendInfo;
|
||
private _renderVisible;
|
||
private _root;
|
||
private _clusterComputeFun;
|
||
private _clusterComputeMoveEndFun;
|
||
private _blockCompute;
|
||
private graphicClusterGroup;
|
||
private clusterWorker;
|
||
private _viewer;
|
||
private _range;
|
||
private _svg;
|
||
private _svgMap;
|
||
constructor(jsonObj?: any);
|
||
/**
|
||
* 类型
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 对象名称不需要修改
|
||
* ```
|
||
* 示例代码
|
||
* item.name = 'itemName'
|
||
* ```
|
||
*/
|
||
name: string;
|
||
readonly id: any;
|
||
/**
|
||
* 获取父节点
|
||
*/
|
||
readonly father: GraphicGroup;
|
||
/**
|
||
* @注意 内部使用无需外部调用
|
||
* @描述 重新计算渲染显隐值
|
||
*/
|
||
updateVisible(): void;
|
||
/**
|
||
* 设置整组显隐
|
||
*/
|
||
visible: boolean;
|
||
/**
|
||
* 获取整组真实显隐
|
||
*/
|
||
readonly renderVisible: any;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: any): void;
|
||
/**
|
||
* @注意 外部无需调用
|
||
* @描述 在父类执行remove方法添加时被调用
|
||
*/
|
||
destroy(): void;
|
||
/**
|
||
* 清除所有子节点
|
||
*/
|
||
clear(): void;
|
||
readonly children: Array<GraphicGroup | GraphicItem>;
|
||
extendInfo: any;
|
||
/**
|
||
* 添加对象
|
||
* @param item
|
||
*/
|
||
add(item: GraphicItem | GraphicGroup): GraphicItem | GraphicGroup;
|
||
/**
|
||
* 根据配置添加图形绘制对象
|
||
* @param jsonObj
|
||
*/
|
||
addByJson(jsonObj: any): any;
|
||
removeById(itemId: string): GraphicItem | GraphicGroup;
|
||
/**
|
||
* 删除元素
|
||
* @param
|
||
*/
|
||
remove(removeItem: GraphicItem | GraphicGroup): GraphicItem | GraphicGroup;
|
||
/**
|
||
* 根据id获得对象
|
||
* @param itemID 对象id
|
||
*/
|
||
getById(itemID: string): any;
|
||
/**
|
||
* 根据name获得对象
|
||
* @param itemName 对象名称
|
||
*/
|
||
getByName(itemName: string): Array<GraphicGroup | GraphicItem>;
|
||
/**
|
||
* 导出json数据
|
||
*/
|
||
toJson(): {
|
||
type: string;
|
||
id: any;
|
||
name: string;
|
||
extendInfo: any;
|
||
children: any[];
|
||
};
|
||
bindToJson(doc: any[]): void;
|
||
/**
|
||
* @注意 外部无需调用
|
||
* @描述 解析json方法,在父类根据json对象创建节点时调用
|
||
*/
|
||
parseJson(json: any): this;
|
||
/**
|
||
* @注意 外部无需调用
|
||
* @描述 解析json方法,在父类根据json对象建立节点之间绑定关系时调用
|
||
*/
|
||
parseBind(json: any): void;
|
||
/**
|
||
*通过json添加子数据(V1.1.2暂时不对外暴露此接口)
|
||
*/
|
||
/**
|
||
* 获取graphicLayer
|
||
*/
|
||
getRoot(): any;
|
||
/**
|
||
* 开启当前组聚合状态,当前仅聚合同一类型的标绘且仅有 position 的坐标属性
|
||
* @param viewer 当前球视图对象
|
||
* @param range 聚合范围像素
|
||
*/
|
||
openCluster(viewer: GeoCanvas, range: number): Promise<void>;
|
||
/**
|
||
* 关闭聚合状态,所有聚合标绘的初始状态
|
||
* @param viewer 当前球视图对象
|
||
*/
|
||
closeCluster(viewer: GeoCanvas): void;
|
||
/**
|
||
* @ignore
|
||
* 初始化聚合算法
|
||
*/
|
||
initClusterCompute(viewer: any, range: any): Promise<void>;
|
||
/**
|
||
* @ignore
|
||
* 动态新建 svg 返回
|
||
*/
|
||
setClusterSvg(text: any, color: any): string;
|
||
}
|
||
|
||
class GraphicItem extends Item {
|
||
private _renderVisible;
|
||
private _father;
|
||
protected _getRenderObj: any;
|
||
protected _type: any;
|
||
protected _opt: any;
|
||
protected _event: Event;
|
||
protected _isEditing: boolean;
|
||
constructor(opt: any);
|
||
protected update(): void;
|
||
/**
|
||
* @param callback 回调函数
|
||
* @描述 为属性更新事件添加回调函数
|
||
* 例如:item.onUpdateAttribute(test)
|
||
* @注意 上例 test 为命名函数,也可以添加命名函数
|
||
*/
|
||
onUpdateAttribute(callback: any): void;
|
||
/**
|
||
* @param callback 回调函数
|
||
* @描述 解除属性更新事件添加额回调函数
|
||
* 例如:item.offUpdateAttribute(test)
|
||
* 注意:上例 test 为命名函数,将解除 onUpdateAttribute
|
||
* 绑定的 test 函数,如果需要解除绑定的匿名函数,callback 为空即可
|
||
*/
|
||
offUpdateAttribute(callback: any): void;
|
||
protected updateAttribute(propName: any): void;
|
||
getRenderObject(): any;
|
||
/**
|
||
* @注意 内部使用无需外部调用
|
||
* @描述 重新计算渲染显隐值
|
||
*/
|
||
updateVisible(): void;
|
||
/**
|
||
* 对象名称不需要修改
|
||
* ```
|
||
* 示例代码
|
||
* item.name = 'itemName'
|
||
* ```
|
||
*/
|
||
name: string;
|
||
/**
|
||
* 对象id为对象的唯一标识(每个对象的id不允许重复);
|
||
* 由对象初始化时自动生成 ;
|
||
* 对象初始化完成后不允许再次对id进行修改
|
||
* ```
|
||
* 示例代码:
|
||
* let id = item.id;//获取对象id
|
||
* ```
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* 扩展信息用户可以将自己的数据储存到该参数中支持序列化反序列化
|
||
*/
|
||
extendInfo: any;
|
||
/**
|
||
* 显隐控制
|
||
*/
|
||
visible: boolean;
|
||
/**
|
||
* 真实显隐
|
||
*/
|
||
readonly renderVisible: boolean;
|
||
/**
|
||
* 父节点
|
||
*/
|
||
readonly father: GraphicGroup;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 判断标绘对象是否贴地
|
||
* @param item
|
||
*/
|
||
static isClamp(item: GraphicItem): boolean;
|
||
/**
|
||
* 是否贴地
|
||
*/
|
||
readonly clampToGround: boolean;
|
||
/**
|
||
* 编辑状态控制
|
||
*/
|
||
isEditing: boolean;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
bindToJson(doc: any[]): void;
|
||
/**
|
||
* 解析json对象
|
||
*/
|
||
parseJson(option: any): void;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): any;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行remove方法添加时被调用
|
||
*/
|
||
destroy(): void;
|
||
/**
|
||
* 获取对象的编辑器,子类可以重写它来指定自身使用的编辑器。
|
||
* 返回编辑器对象,例如:return new LineEditor(viewer, editorMgr);
|
||
*/
|
||
getEditor(viewer: Cesium.Viewer, editorMgr: EditorManager): any;
|
||
/**
|
||
* 获取中心点
|
||
* Bubble 类无效
|
||
*/
|
||
getCenterPosition(): any;
|
||
/**
|
||
* 设置控制点
|
||
* Bubble 类无效
|
||
*/
|
||
movePosition(offsetLon?: number, offsetLat?: number, offsetAlt?: number): void;
|
||
/**
|
||
* 复制图形
|
||
* 返回一个新的图形对象
|
||
*/
|
||
clone(): GraphicItem;
|
||
}
|
||
class GraphicItemOpt {
|
||
/**
|
||
* 名称
|
||
*/
|
||
name?: string;
|
||
/**
|
||
* 显隐控制
|
||
*/
|
||
visible?: boolean;
|
||
/**
|
||
* 扩展数据信息
|
||
*/
|
||
extendInfo?: any;
|
||
/**
|
||
* 是否是编辑状态
|
||
*/
|
||
isEditing?: boolean;
|
||
}
|
||
/**
|
||
* 高度参照
|
||
*/
|
||
enum HeightReferenceEnum {
|
||
/**
|
||
* 完全贴合地面
|
||
*/
|
||
ClampToGround,
|
||
/**
|
||
* 高度与地形无关
|
||
*/
|
||
None,
|
||
/**
|
||
* 真实高度=地形高度+高度值
|
||
*/
|
||
RelativeToGround
|
||
}
|
||
|
||
/**
|
||
* 点标绘虚基类,提供点标绘的位置属性及位置绑定属性
|
||
* 子类:PointGraphic、ModelGraphic、BillboardGraphic、BindedCylinderGraphic、CircularGraphic、
|
||
* 子类:CustomLabelGraphic、CylinderGraphic、SphereGraphic、LabelGraphic、LabelRectGraphic、DynamicRippleGraphic、
|
||
* 子类:PopoverGraphic、ScanGraphic、SensorGraphic、DashBoardGraphic、SpreadGraphic、EllipseGraphic、EllipsoidGraphic、
|
||
* 子类:RadarGraphic、SpreadCircleGraphic
|
||
*/
|
||
class GraphicPositionItem extends GraphicItem {
|
||
constructor(opt: any);
|
||
/**
|
||
* 设置位置
|
||
* @return
|
||
* ```
|
||
* 示例代码
|
||
* item.position = new GV.GeoPoint(10,10,10);
|
||
* ```
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 绑定的点标绘对象
|
||
*/
|
||
bindObject: GraphicPositionItem;
|
||
bindToJson(doc: any[]): void;
|
||
}
|
||
class GraphicPositionItemOpt extends GraphicItemOpt {
|
||
/**
|
||
* 位置
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 绑定的点标绘对象
|
||
*/
|
||
bindObject?: GraphicPositionItem;
|
||
}
|
||
|
||
class BaseIconGraphic extends GraphicPositionItem {
|
||
entity: any;
|
||
protected _opt: IconGraphicOpt;
|
||
/**
|
||
* 点图标特效基类
|
||
* @param {IconGraphicOpt} options
|
||
*/
|
||
constructor(options: IconGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 颜色
|
||
* ```
|
||
* circleIcon.color=Cesium.Color.RED;
|
||
* ```
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 半径
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 圈的个数
|
||
* ```
|
||
* //示例
|
||
* iconGraphic.numberOfLines=3;
|
||
* ```
|
||
*/
|
||
numberOfLines: number;
|
||
/**
|
||
* 周期,单位:秒
|
||
* ```
|
||
* //示例
|
||
* iconGraphic.duration=3000;
|
||
* ```
|
||
*/
|
||
duration: number;
|
||
/**
|
||
* 贴图纹理
|
||
* ```
|
||
* //示例
|
||
* iconGraphic.image='./images/test.png';
|
||
* ```
|
||
*/
|
||
image: String;
|
||
/**
|
||
* 是否贴地
|
||
*/
|
||
readonly clampToGround: boolean;
|
||
}
|
||
class IconGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 半径
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 圆圈个数
|
||
*/
|
||
numberOfLines: number;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 周期
|
||
*/
|
||
duration: number;
|
||
/**
|
||
* 纹理贴图
|
||
*/
|
||
image: String;
|
||
/**
|
||
* 发光强度
|
||
*/
|
||
gradient: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 圆形点特效
|
||
* @see <a href='../../../examples/gallery/editor.html#icon' target="_blank">点特效</a>
|
||
*/
|
||
class CircleIconGraphic extends BaseIconGraphic {
|
||
/**
|
||
* 构造函数
|
||
* @param {IconGraphicOpt} options 参数
|
||
* ```
|
||
* const circleOpt = new GV.IconGraphicOpt();
|
||
* circleOpt.center = new GV.GeoPoint(lon, lat);
|
||
* circleOpt.radius = 1000;
|
||
* circleOpt.numberOfLines = 4;
|
||
* circleOpt.color = Cesium.Color.AQUA;
|
||
* circleOpt.duration = 2000;
|
||
* circleOpt.gradient = 16;
|
||
* const circleIcon = new GV.CircleIconGraphic(circleOpt);
|
||
* viewer.graphicLayer.add(circleIcon);
|
||
* ```
|
||
*/
|
||
constructor(options: IconGraphicOpt);
|
||
getType(): string;
|
||
static readonly type: string;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 警告点特效
|
||
* @see <a href='../../../examples/gallery/editor.html#icon' target="_blank">点特效</a>
|
||
*/
|
||
class WarnIconGraphic extends BaseIconGraphic {
|
||
_centerColor: string;
|
||
/**
|
||
* 构造函数
|
||
* @param {IconGraphicOpt} options 参数
|
||
* ```
|
||
* const warnOpt = new GV.IconGraphicOpt();
|
||
* warnOpt.center = new GV.GeoPoint(lon + 0.03, lat);
|
||
* warnOpt.radius = 1000;
|
||
* warnOpt.numberOfLines = 3;
|
||
* warnOpt.color = 'gold';
|
||
* warnOpt.centerColor = 'red';
|
||
* warnOpt.duration = 3000;
|
||
* warnOpt.gradient = 6;
|
||
* warnOpt.image = '../images/叹号.png'
|
||
* const warn = new GV.WarnIconGraphic(warnOpt)
|
||
* viewer.graphicLayer.add(warn);
|
||
* ```
|
||
*/
|
||
constructor(options: IconGraphicOpt);
|
||
getType(): string;
|
||
static readonly type: string;
|
||
/**
|
||
* 发光强度
|
||
*/
|
||
gradient: number;
|
||
/**
|
||
* 中心颜色
|
||
*/
|
||
centerColor: string;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 波纹点特效
|
||
* @see <a href='../../../examples/gallery/editor.html#icon' target="_blank">点特效</a>
|
||
*/
|
||
class WaveIconGraphic extends BaseIconGraphic {
|
||
_gradient: Number;
|
||
/**
|
||
* 构造函数
|
||
* @param {IconGraphicOpt} options 参数
|
||
* ```
|
||
* const waveOpt = new GV.IconGraphicOpt();
|
||
* waveOpt.center = new GV.GeoPoint(lon + 0.01, lat + 0.02, 0);
|
||
* waveOpt.radius = 1000;
|
||
* waveOpt.numberOfLines = 3;
|
||
* waveOpt.color = Cesium.Color.AQUA;
|
||
* waveOpt.duration = 3000;
|
||
* waveOpt.gradient = 6;
|
||
* waveOpt.image = '../images/叹号.png'
|
||
* const wave = new GV.WaveIconGraphic(waveOpt)
|
||
* viewer.graphicLayer.add(wave)
|
||
* ```
|
||
*/
|
||
constructor(options: IconGraphicOpt);
|
||
/**
|
||
* 发光强度
|
||
*/
|
||
gradient: Number;
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 基础线
|
||
* @see <a href='../../../examples/gallery/editor.html#plottingPointLine'>标绘点、线</a>
|
||
*/
|
||
class JBLineGraphic extends GraphicItem {
|
||
protected _opt: JBLineGraphicOpt;
|
||
protected _type: string;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let jbLine = new GV.JBLineGraphic({
|
||
* positions:[new GV.GeoPoint(0,0,200000), new GV.GeoPoint(100,0,200000)], //设置坐标
|
||
* });
|
||
* viewer.graphicLayer.add(jbLine); //添加到场景
|
||
* ```
|
||
*/
|
||
constructor(option: JBLineGraphicOpt);
|
||
/**
|
||
* 军标码
|
||
*/
|
||
code: string;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 位置
|
||
* ```
|
||
* 示例代码
|
||
* jbLine.positions = [new GV.GeoPoint(0,0,200000), new GV.GeoPoint(100,0,200000)]
|
||
* ```
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 线宽
|
||
*/
|
||
lineWidth: number;
|
||
/**
|
||
* 是否支持动态点修改(支持模式可能会对效率有点影响与当前加载数据量有关)
|
||
*/
|
||
dirty: boolean;
|
||
/**
|
||
* 设置高度
|
||
*/
|
||
/**
|
||
* 获取高度
|
||
*/
|
||
height: number;
|
||
/**
|
||
* 拉高网格体展示
|
||
*/
|
||
/**
|
||
* 获取厚度
|
||
*/
|
||
supplementFlag: boolean;
|
||
/**
|
||
* 设置线颜色
|
||
*/
|
||
/**
|
||
* 获取线颜色
|
||
*/
|
||
lineColor: string;
|
||
/**********适应之前所修改 begin*/
|
||
/**
|
||
* 设置线颜色
|
||
*/
|
||
/**
|
||
* 获取线颜色
|
||
*/
|
||
color: string;
|
||
/**********适应之前所修改 end*/
|
||
/**
|
||
* 设置渲染模式
|
||
*/
|
||
/**
|
||
* 获取渲染模式
|
||
*/
|
||
renderMode: JBRenderModeEnum;
|
||
/**
|
||
* 是否填充
|
||
*/
|
||
/**
|
||
* 是否填充
|
||
*/
|
||
fillFlag: boolean;
|
||
/**
|
||
* 设置起点填充颜色
|
||
*/
|
||
/**
|
||
* 获取起点填充颜色
|
||
*/
|
||
fillStartColor: string;
|
||
/**
|
||
* 设置终点填充颜色
|
||
*/
|
||
/**
|
||
* 获取终点填充颜色
|
||
*/
|
||
fillEndColor: string;
|
||
/**
|
||
* 设置渐变偏角
|
||
*/
|
||
/**
|
||
* 获取渐变偏角
|
||
*/
|
||
fillAngle: number;
|
||
/**
|
||
* 设置拉伸网格体颜色
|
||
*/
|
||
/**
|
||
* 获取拉伸网格体颜色
|
||
*/
|
||
supplementColor: string;
|
||
/**
|
||
* 当一些特殊情况时,会有点重叠,此时该参数将用于闭合判断, false 为处理一些特殊线不会闭合的情况
|
||
*/
|
||
isUnique: boolean;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
readonly clampToGround: boolean;
|
||
}
|
||
/**
|
||
* 折线数据约束及默认值
|
||
*/
|
||
class JBLineGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 军标码
|
||
*/
|
||
code: string;
|
||
/**
|
||
* 关键点信息
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 线宽度
|
||
*/
|
||
lineWidth?: number;
|
||
/**
|
||
* 线的颜色
|
||
*/
|
||
lineColor?: string;
|
||
/**注:lineColor与color一致 */
|
||
/**线的颜色 */
|
||
color?: string;
|
||
/**
|
||
* 是否动态更新(脏检查)
|
||
*/
|
||
dirty: boolean;
|
||
/**
|
||
* 距离底面高度
|
||
*/
|
||
height: number;
|
||
/**
|
||
* 拉高网格体展示
|
||
*/
|
||
supplementFlag: boolean;
|
||
/**
|
||
* 绘制形态 'raster'或 'vector'
|
||
*/
|
||
renderMode: JBRenderModeEnum;
|
||
/**是否填充 */
|
||
fillFlag: boolean;
|
||
/**起点填充颜色 */
|
||
fillStartColor: string;
|
||
/**终点填充颜色 */
|
||
fillEndColor: string;
|
||
/**渐变偏角 */
|
||
fillAngle: number;
|
||
/**拉伸网格体颜色 */
|
||
supplementColor: string;
|
||
/**是否非闭合 */
|
||
isUnique: boolean;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 军标点
|
||
* @see <a href='../../../examples/gallery/editor.html#jbPointRender'>JB点</a>
|
||
*/
|
||
class JBPointGraphic extends GraphicItem {
|
||
protected _opt: JBPointGraphicOpt;
|
||
protected _type: string;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let group = new GV.GraphicGroup();
|
||
* viewer.graphicLayer.add(group);
|
||
* let point = new GV.JBPointGraphic({
|
||
* code: '10-200-0',//军标码
|
||
* position:new GV.GeoPoint(i,j,0),//位置点
|
||
* size:0.5,//大小,
|
||
* color: '#ffff00'
|
||
* });
|
||
* group.add(point);
|
||
* ```
|
||
*/
|
||
constructor(option: JBPointGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 位置
|
||
* ```
|
||
* 示例代码
|
||
* jbPoint.position = new GV.GeoPoint(0,0,200000);
|
||
* ```
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 军标码,仅在渲染初始化前修改有效
|
||
*/
|
||
code: string;
|
||
/**
|
||
* 军标线颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 旋转
|
||
*/
|
||
rotation: number;
|
||
/**
|
||
* 尺寸
|
||
*/
|
||
size: number;
|
||
/**
|
||
* 描边颜色,默认 #F66
|
||
*/
|
||
strokeColor: string;
|
||
/**
|
||
* 描边宽度,0 为不显示描边,默认:0
|
||
*/
|
||
strokeWidth: number;
|
||
/**
|
||
* 注记位置信息
|
||
*/
|
||
renderMode: JBRenderModeEnum;
|
||
/**
|
||
* 图标偏移量设置
|
||
* ```
|
||
* 示例代码
|
||
* point.imageOffset={'x':50,'y':50}
|
||
* ```
|
||
*/
|
||
imageOffset: {
|
||
x: number;
|
||
y: number;
|
||
};
|
||
/**
|
||
* 注记位置信息
|
||
*/
|
||
textOffset: {
|
||
x: number;
|
||
y: number;
|
||
};
|
||
/**
|
||
* 注记内容
|
||
*/
|
||
text: string;
|
||
/**
|
||
* 注记字体
|
||
*/
|
||
textFont: string;
|
||
/**
|
||
* 注记颜色
|
||
*/
|
||
textColor: string;
|
||
/**
|
||
* 注记字体大小
|
||
*/
|
||
textSize: number;
|
||
/**
|
||
* 注记背景色
|
||
*/
|
||
textBackgroundColor: string;
|
||
/**
|
||
* 注记缩放
|
||
*/
|
||
textScale: number;
|
||
/**
|
||
* 高度,仅 RASTER 下有效
|
||
*/
|
||
height: number;
|
||
/**
|
||
* 挤压高度
|
||
*/
|
||
vectorExtrudedHeight: number;
|
||
/**
|
||
* 填充
|
||
* @ignore
|
||
*/
|
||
/**
|
||
* @ignore
|
||
*/
|
||
fillColor: string;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
readonly clampToGround: boolean;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
pixelOffset: Cesium.Cartesian2;
|
||
/**
|
||
* 旗标文字(仅旗标有效)
|
||
*/
|
||
flagText: string;
|
||
/**
|
||
* 旗标大小(仅旗标有效)
|
||
*/
|
||
flagTextSize: number;
|
||
/**
|
||
* 旗标文字间距(仅短字符有效)
|
||
*/
|
||
flagTextSpace: number;
|
||
/**
|
||
* 旗标文字格式
|
||
*/
|
||
flagTextFont: string;
|
||
/**
|
||
* 旗标文字颜色(仅旗标有效)
|
||
*/
|
||
flagTextColor: string;
|
||
/**
|
||
* 旗标背景颜色(仅旗标有效)
|
||
*/
|
||
flagTextBgColor: string;
|
||
/**
|
||
* 是否显示拖线
|
||
*/
|
||
trailLineShow: any;
|
||
/**
|
||
* 拖线的样式,GV.ColorStyle,GV.DashStyle,GV.OutlineStyle
|
||
*/
|
||
trailLineColor: any;
|
||
/**
|
||
* 拖线的宽度
|
||
*/
|
||
trailLineWidth: any;
|
||
/**
|
||
* 拖线的宽度
|
||
*/
|
||
enableTrailDrag: any;
|
||
/**
|
||
* 旗标内衬线宽度
|
||
*/
|
||
flagInnerStrokeWidth: any;
|
||
/**
|
||
* 旗标内衬线颜色
|
||
*/
|
||
flagInnerStrokeColor: any;
|
||
}
|
||
/**
|
||
* 点标数据约束及默认值
|
||
*/
|
||
class JBPointGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 军标码
|
||
*/
|
||
code: string;
|
||
/**
|
||
* 关键点信息
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 填充颜色
|
||
*/
|
||
color?: string;
|
||
/**
|
||
* 大小
|
||
*/
|
||
size?: number;
|
||
/**
|
||
* 旋转
|
||
*/
|
||
rotation?: number;
|
||
/**
|
||
* 是否动态更新(脏检查)
|
||
*/
|
||
dirty: boolean;
|
||
/**
|
||
* 描边颜色,默认 #F66
|
||
*/
|
||
strokeColor?: string;
|
||
/**
|
||
* 描边宽度,0 为不显示描边
|
||
*/
|
||
strokeWidth?: number;
|
||
/**
|
||
* 绘制形式
|
||
*/
|
||
renderMode?: JBRenderModeEnum;
|
||
/**
|
||
* 注记位置点
|
||
*/
|
||
textOffset?: {
|
||
x: number;
|
||
y: number;
|
||
};
|
||
/**
|
||
* 图片位置点
|
||
*/
|
||
imageOffset?: {
|
||
x: number;
|
||
y: number;
|
||
};
|
||
/**
|
||
* 注记内容
|
||
*/
|
||
text?: string;
|
||
/**
|
||
* 注记字体
|
||
*/
|
||
textFont?: string;
|
||
/**
|
||
* 注记字体大小
|
||
*/
|
||
textSize?: number;
|
||
/**
|
||
* 注记颜色
|
||
*/
|
||
textColor?: string;
|
||
/**
|
||
* 注记背景颜色
|
||
*/
|
||
textBackgroundColor?: string;
|
||
/**
|
||
* 文字缩放
|
||
*/
|
||
textScale?: number;
|
||
/**
|
||
* 高度,仅 RASTER 有效
|
||
*/
|
||
height?: number;
|
||
/**
|
||
* 挤压高度
|
||
*/
|
||
vectorExtrudedHeight?: number;
|
||
/**
|
||
* 填充色
|
||
* @ignore
|
||
*/
|
||
fillColor?: string;
|
||
/**
|
||
* 旗标文字(仅旗标有效)
|
||
*/
|
||
flagText?: string;
|
||
/**
|
||
* 旗标大小(仅旗标有效)
|
||
*/
|
||
flagTextSize?: number;
|
||
/**
|
||
* 旗标文字间距(短字符有效)
|
||
*/
|
||
flagTextSpace?: number;
|
||
/**
|
||
* 旗标文字格式
|
||
*/
|
||
flagTextFont?: string;
|
||
/**
|
||
* 旗标文字颜色(仅旗标有效)
|
||
*/
|
||
flagTextColor?: string;
|
||
/**
|
||
* 旗标背景颜色(仅旗标有效)
|
||
*/
|
||
flagTextBgColor?: string;
|
||
/**
|
||
* 是否开启拖线(锚点为改参数设置为 true 时的位置)
|
||
*/
|
||
trailLineShow: boolean;
|
||
/**
|
||
* 拖线的颜色
|
||
*/
|
||
trailLineColor?: string;
|
||
/**
|
||
* 拖线的宽度
|
||
*/
|
||
trailLineWidth: number;
|
||
/**
|
||
* 是否开启拖动效果,仅在 trailLineShow 为true时有效
|
||
*/
|
||
enableTrailDrag: boolean;
|
||
/**
|
||
* 旗标内衬线宽度
|
||
*/
|
||
flagInnerStrokeWidth: number;
|
||
/**
|
||
* 旗标内衬线颜色
|
||
*/
|
||
flagInnerStrokeColor: string;
|
||
}
|
||
enum JBRenderModeEnum {
|
||
/**
|
||
* 矢量模式,当前仅支持 JBLineGraphic
|
||
*/
|
||
VECTOR = "VECTOR",
|
||
/**
|
||
* 栅格,当前支持 JBLineGraphic 与 JBPointGraphic
|
||
*/
|
||
RASTER = "RASTER",
|
||
/**
|
||
* billboard,当前仅支持 JBPointGraphic
|
||
*/
|
||
BILLBOARD = "BILLBOARD"
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 图标绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#popover'>标签</a>
|
||
*/
|
||
class LabelBillboardGraphic extends GraphicItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: LabelBillboardGraphicOpt;
|
||
/**
|
||
* 图标标绘类型
|
||
*/
|
||
protected _type: string;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let label = new GV.LabelBillboardGraphic({
|
||
* position: new GV.GeoPoint(-80.0, 34.0, 0.0),
|
||
* moveX: 0,
|
||
* moveY: -100
|
||
* });
|
||
* viewer.graphicLayer.add(label);
|
||
* ```
|
||
*/
|
||
constructor(option: LabelBillboardGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): any;
|
||
/**
|
||
* 更新画布
|
||
* @param move 文本矩形框中心与锚点位置的相对距离
|
||
*/
|
||
updateCanvas(move: any): void;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 位置
|
||
*/
|
||
position: any;
|
||
/**
|
||
* 图片
|
||
*/
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale: any;
|
||
/**
|
||
* 视角偏移[x,y,z] 空间坐标值 单位为米
|
||
*/
|
||
eyeOffset: any;
|
||
/**
|
||
* 像素偏移 [x,y] x:相对中心点屏幕横向偏移; y:相对中心点屏幕纵向偏移; 单位像素值
|
||
*/
|
||
/**
|
||
*沿视角方向旋转角度,单位弧度值
|
||
*/
|
||
rotation: any;
|
||
/**
|
||
* 颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
color: any;
|
||
scaleByDistance: any;
|
||
/**
|
||
* 大小是否以米为单位
|
||
*/
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference: any;
|
||
/**
|
||
* 画布宽度
|
||
*/
|
||
canvasWidth: any;
|
||
/**
|
||
* 画布高度
|
||
*/
|
||
/**
|
||
* 文本矩形框中心与锚点位置的相对距离X
|
||
*/
|
||
moveX: any;
|
||
/**
|
||
* 文本矩形框中心与锚点位置的相对距离Y
|
||
*/
|
||
moveY: any;
|
||
/**
|
||
* 文本
|
||
*/
|
||
text: any;
|
||
/**
|
||
* 字体大小
|
||
*/
|
||
fontSize: any;
|
||
/**
|
||
* 行间距
|
||
*/
|
||
lineHeight: any;
|
||
/**
|
||
* 顶部或底部箭头开口左顶点距离中心位置
|
||
*/
|
||
topbottomOpenningLeft: any;
|
||
/**
|
||
* 顶部或底部箭头开口右顶点距离中心位置
|
||
*/
|
||
topbottomOpenningRight: any;
|
||
/**
|
||
* 左部或右部箭头开口上顶点距离中心位置
|
||
*/
|
||
leftrightOpenningTop: any;
|
||
/**
|
||
* 左部或右部箭头开口下顶点距离中心位置
|
||
*/
|
||
leftrightOpenningBottom: any;
|
||
/**
|
||
* 字体颜色
|
||
*/
|
||
fontColor: any;
|
||
/**
|
||
* 显示范围 示例[near, far] 物体在near和far的相机距离之间显示; near和far的单位为米; 实例:[10,100]
|
||
*/
|
||
distanceDisplayCondition: Array<number>;
|
||
}
|
||
class LabelBillboardGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 位置 lon为经度, lat 为纬度, alt
|
||
* ```
|
||
* 示例代码
|
||
* let position = new GV.GeoPoint(-80.0, 34.0, 0.0)
|
||
* ```
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale?: number;
|
||
/**
|
||
* 视角偏移[x,y,z] 空间坐标值 单位为米
|
||
*/
|
||
eyeOffset?: Array<number>;
|
||
/**
|
||
* 像素偏移 [x,y] x:相对中心点屏幕横向偏移; y:相对中心点屏幕纵向偏移; 单位像素值
|
||
*/
|
||
/**
|
||
* 沿视角方向旋转角度,单位弧度值
|
||
*/
|
||
rotation?: number;
|
||
/**
|
||
* 颜色'#ff0000'
|
||
*/
|
||
color?: string;
|
||
scaleByDistance?: Array<number>;
|
||
/**
|
||
* 大小是否以米为单位
|
||
*/
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference?: String;
|
||
/**
|
||
* 显示范围 示例[near, far] 物体在near和far的相机距离之间显示; near和far的单位为米; 实例:[10,100]
|
||
*/
|
||
distanceDisplayCondition?: Array<number>;
|
||
/**
|
||
* 画布宽度
|
||
*/
|
||
canvasWidth?: number;
|
||
/**
|
||
* 画布高度
|
||
*/
|
||
/**
|
||
* 文本矩形框中心与锚点位置的相对距离X
|
||
*/
|
||
moveX?: number;
|
||
/**
|
||
* 文本矩形框中心与锚点位置的相对距离Y
|
||
*/
|
||
moveY?: number;
|
||
/**
|
||
* 文本
|
||
*/
|
||
text?: string;
|
||
/**
|
||
* 字号
|
||
*/
|
||
fontSize?: number;
|
||
/**
|
||
* 字体颜色
|
||
*/
|
||
fontColor?: string;
|
||
/**
|
||
* 行间距
|
||
*/
|
||
lineHeight?: number;
|
||
/**
|
||
* 顶部或底部箭头开口左顶点距离中心位置
|
||
*/
|
||
topbottomOpenningLeft?: number;
|
||
/**
|
||
* 顶部或底部箭头开口右顶点距离中心位置
|
||
*/
|
||
topbottomOpenningRight?: number;
|
||
/**
|
||
* 左部或右部箭头开口上顶点距离中心位置
|
||
*/
|
||
leftrightOpenningTop?: number;
|
||
/**
|
||
* 左部或右部箭头开口下顶点距离中心位置
|
||
*/
|
||
leftrightOpenningBottom?: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 文本绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#plottingText'>文本</a>
|
||
*/
|
||
class LabelGraphic extends GraphicPositionItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: LabelGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let labelGraphicOpt = new GV.LabelGraphicOpt();
|
||
* labelGraphicOpt.position = [83, 33, 500000];
|
||
* let labelGraphic = new GV.LabelGraphic(labelGraphicOpt);
|
||
* 或者
|
||
* let labelGraphic = new GV.LabelGraphic({...});
|
||
* ```
|
||
*/
|
||
constructor(option: LabelGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): any;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 文字
|
||
*/
|
||
text: any;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale: any;
|
||
/**
|
||
* 水平对齐 : 'left' 左对齐; 'center' 居中; 'right' 右对齐;
|
||
*/
|
||
horizontalOrigin: any;
|
||
/**
|
||
* 垂直对齐 : 'baseline'基线对齐; 'bottom' 底部对齐; 'center' 中间对齐; 'top' 顶部对齐
|
||
*/
|
||
verticalOrigin: any;
|
||
/**
|
||
* 视角偏移
|
||
*/
|
||
eyeOffset: any;
|
||
/**
|
||
* 像素偏移
|
||
*/
|
||
pixelOffset: any;
|
||
/**
|
||
* 轮廓线宽度
|
||
*/
|
||
outlineWidth: any;
|
||
/**
|
||
* 字体
|
||
*/
|
||
font: any;
|
||
/**
|
||
* 样式
|
||
*/
|
||
style: any;
|
||
/**
|
||
* 填充颜色
|
||
*/
|
||
fillColor: any;
|
||
/**
|
||
* 轮廓颜色
|
||
*/
|
||
outlineColor: any;
|
||
/**
|
||
* 背景颜色
|
||
*/
|
||
backgroundColor: any;
|
||
/**
|
||
* 根据距离计算缩放大小
|
||
*/
|
||
scaleByDistance: any;
|
||
/**
|
||
* 根据距离计算像素偏移
|
||
*/
|
||
pixelOffsetScaleByDistance: any;
|
||
/**
|
||
* 是否显示背景
|
||
*/
|
||
showBackground: any;
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference: any;
|
||
/**
|
||
* 根据距离变更透明度
|
||
*/
|
||
translucencyByDistance: any;
|
||
/**
|
||
* 是否深度检测
|
||
*/
|
||
isDepthTest: boolean;
|
||
/**
|
||
* 设置显示范围 示例[near, far]
|
||
* label.distanceDisplayCondition = [0,1000000]
|
||
*/
|
||
distanceDisplayCondition: Array<number>;
|
||
}
|
||
class LabelGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 文字内容
|
||
*/
|
||
text: String;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale?: number;
|
||
/**
|
||
* 水平对齐 : 'left' 左对齐; 'center' 居中; 'right' 右对齐;
|
||
*/
|
||
horizontalOrigin?: String;
|
||
/**
|
||
* 垂直对齐 : 'baseline'基线对齐; 'bottom' 底部对齐; 'center' 中间对齐; 'top' 顶部对齐
|
||
*/
|
||
verticalOrigin?: String;
|
||
/**
|
||
* 视角偏移[x,y,z] 空间坐标值 单位为米
|
||
*/
|
||
eyeOffset?: Array<number>;
|
||
/**
|
||
* 像素偏移 [x,y] x:相对中心点屏幕横向偏移; y:相对中心点屏幕纵向偏移; 单位像素值
|
||
*/
|
||
pixelOffset?: Array<number>;
|
||
/**
|
||
* 指定轮廓线宽度
|
||
*/
|
||
outlineWidth?: number;
|
||
/**
|
||
* css字体设置: 字体大小 字体名称
|
||
*/
|
||
font?: String;
|
||
/**
|
||
* 指定文字样式 :'fill' 只有填充,fill_and_outline 包含填充轮廓, outline 只有轮廓
|
||
*/
|
||
style?: String;
|
||
/**
|
||
* 填充颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
fillColor?: String;
|
||
/**
|
||
* 轮廓颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
outlineColor?: String;
|
||
/**
|
||
* 背景颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
backgroundColor?: String;
|
||
/**
|
||
* 根据距离视点范围和放大率范围计算放大倍数
|
||
*/
|
||
scaleByDistance?: Array<number>;
|
||
/**
|
||
* 根据距离视点范围和放大率范围计算像素偏移
|
||
*/
|
||
pixelOffsetScaleByDistance?: Array<number>;
|
||
/**
|
||
* 是否展示背景
|
||
*/
|
||
showBackground?: Boolean;
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference?: String;
|
||
/**
|
||
* 根据距离变更透明度
|
||
*/
|
||
translucencyByDistance?: number;
|
||
/**
|
||
* 是否深度检测
|
||
*/
|
||
isDepthTest?: boolean;
|
||
/**
|
||
* 显示范围 示例[near, far] 物体在near和far的相机距离之间显示; near和far的单位为米;
|
||
* 示例代码:labelGraphic.distanceDisplayCondition = [0,5000000]
|
||
*/
|
||
distanceDisplayCondition?: Array<number>;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 图标绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#popover'>标签</a>
|
||
*/
|
||
class LabelRectGraphic extends GraphicPositionItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: LabelRectGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let labelRect = new GV.LabelRectGraphic({
|
||
* position: new GV.GeoPoint(-80.0, 34.0, 0.0),
|
||
* text:"我是文本我是文本我是文本我是文本我是文本我是文本我是文本我是文本"
|
||
* });
|
||
* viewer.graphicLayer.add(labelRect);
|
||
* ```
|
||
*/
|
||
constructor(option: LabelRectGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): any;
|
||
/**
|
||
* 更新画布
|
||
* @param move 文本矩形框中心与锚点位置的相对距离
|
||
*/
|
||
updateCanvas(): void;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale: any;
|
||
/**
|
||
* 视角偏移[x,y,z] 空间坐标值 单位为米
|
||
*/
|
||
eyeOffset: any;
|
||
/**
|
||
*沿视角方向旋转角度,单位弧度值
|
||
*/
|
||
rotation: any;
|
||
/**
|
||
* 颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 大小是否以米为单位
|
||
*/
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference: any;
|
||
/**
|
||
* 画布宽度
|
||
*/
|
||
canvasWidth: any;
|
||
/**
|
||
* 文本
|
||
*/
|
||
text: any;
|
||
/**
|
||
* 字体
|
||
*/
|
||
font: any;
|
||
/**
|
||
* 字体大小
|
||
*/
|
||
fontSize: any;
|
||
/**
|
||
* 字体颜色
|
||
*/
|
||
fontColor: any;
|
||
/**
|
||
* 加粗
|
||
*/
|
||
bold: any;
|
||
/**
|
||
* 行间距
|
||
*/
|
||
lineHeight: any;
|
||
/**
|
||
* 显示范围 示例[near, far] 物体在near和far的相机距离之间显示; near和far的单位为米; 实例:[10,100]
|
||
*/
|
||
distanceDisplayCondition: any;
|
||
getEditor(viewer: Cesium.Viewer, editorMgr: EditorManager): PointEditor;
|
||
}
|
||
class LabelRectGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale?: number;
|
||
/**
|
||
* 视角偏移[x,y,z] 空间坐标值 单位为米
|
||
*/
|
||
eyeOffset?: Array<number>;
|
||
/**
|
||
* 像素偏移 [x,y] x:相对中心点屏幕横向偏移; y:相对中心点屏幕纵向偏移; 单位像素值
|
||
*/
|
||
/**
|
||
* 沿视角方向旋转角度,单位弧度值
|
||
*/
|
||
rotation?: number;
|
||
/**
|
||
* 颜色'#ff0000'
|
||
*/
|
||
color?: string;
|
||
/**
|
||
* 大小是否以米为单位
|
||
*/
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference?: String;
|
||
/**
|
||
* 显示范围 示例[near, far] 物体在near和far的相机距离之间显示; near和far的单位为米; 实例:[10,100]
|
||
*/
|
||
distanceDisplayCondition?: Array<number>;
|
||
/**
|
||
* 画布宽度
|
||
*/
|
||
canvasWidth?: number;
|
||
/**
|
||
* 文本
|
||
*/
|
||
text?: string;
|
||
/**
|
||
* 字体
|
||
*/
|
||
font?: string;
|
||
/**
|
||
* 字号
|
||
*/
|
||
fontSize?: number;
|
||
/**
|
||
* 字体颜色
|
||
*/
|
||
fontColor?: string;
|
||
/**
|
||
* 文字加粗
|
||
*/
|
||
bold?: boolean;
|
||
/**
|
||
* 行间距
|
||
*/
|
||
lineHeight?: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 模型绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#model'>模型</a>
|
||
*/
|
||
class ModelGraphic extends GraphicPositionItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: ModelGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let modelGraphicOpt = new GV.ModelGraphicOpt();
|
||
* modelGraphicOpt.position = [83, 33, 500000];
|
||
* let modelGraphic = new GV.ModelGraphic(ModelGraphicOpt);
|
||
* 或者
|
||
* let modelGraphic = new GV.ModelGraphic({...});
|
||
* ```
|
||
*/
|
||
constructor(option: ModelGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): any;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 模型地址路径
|
||
*/
|
||
url: any;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale: any;
|
||
/**
|
||
* 偏航
|
||
*/
|
||
heading: any;
|
||
/**
|
||
* 俯仰
|
||
*/
|
||
pitch: any;
|
||
/**
|
||
* 翻转
|
||
*/
|
||
roll: any;
|
||
/**
|
||
* 像素大小
|
||
*/
|
||
minimumPixelSize: any;
|
||
/**
|
||
* 缩放上界
|
||
*/
|
||
maximumScale: any;
|
||
/**
|
||
* 动画
|
||
*/
|
||
runAnimations: any;
|
||
/**
|
||
* 最后帧是否静止
|
||
*/
|
||
clampAnimations: any;
|
||
/**
|
||
* 模型轮廓颜色
|
||
*/
|
||
silhouetteColor: any;
|
||
/**
|
||
* 轮廓大小
|
||
*/
|
||
silhouetteSize: any;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 高度按照相对于什么
|
||
*/
|
||
heightReference: any;
|
||
}
|
||
/**
|
||
* 模型标绘参数类
|
||
*/
|
||
class ModelGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 模型路径
|
||
*/
|
||
url: String;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale?: number;
|
||
/**
|
||
* 偏航角围绕负z轴旋转
|
||
*/
|
||
heading?: number;
|
||
/**
|
||
* 俯仰角绕负y轴旋转
|
||
*/
|
||
pitch?: number;
|
||
/**
|
||
* 翻转角绕正x轴旋转
|
||
*/
|
||
roll?: number;
|
||
/**
|
||
* 颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
color?: String;
|
||
/**
|
||
* 指定模型的近似最小像素大小,与缩放无关
|
||
*/
|
||
minimumPixelSize: number;
|
||
/**
|
||
* 模型的最大比例尺寸。minimumPixelSize的上限
|
||
*/
|
||
maximumScale?: number;
|
||
/**
|
||
* 指定是否应该启动模型中指定的glTF动画。
|
||
*/
|
||
runAnimations?: Boolean;
|
||
/**
|
||
* 指定glTF动画是否应保留最后一个没有关键帧的持续时间姿势
|
||
*/
|
||
clampAnimations?: Boolean;
|
||
/**
|
||
* 模型轮廓颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
silhouetteColor?: String;
|
||
/**
|
||
* 指定轮廓的大小(以像素为单位)。
|
||
*/
|
||
silhouetteSize?: number;
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference?: String;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 3dTiles模型规范对象,用此规范对象可对 3dtiles 进行位置、角度的编辑以及序列化保存
|
||
* @see <a href='../../../examples/gallery/editor.html#edit3dTile'>3Dtiles 模型</a>
|
||
*/
|
||
class ObliqueGraphic extends GraphicItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: ObliqueGraphicOpt;
|
||
/**
|
||
* 图标标绘类型
|
||
*/
|
||
protected _type: string;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let obliqueGraphicOpt = new GV.ObliqueGraphicOpt();
|
||
* obliqueGraphicOpt.url = qxmoUrl;
|
||
* let tileset = new GV.ObliqueGraphic(obliqueGraphicOpt);
|
||
* 或者
|
||
* let tileset = new GV.ObliqueGraphic({
|
||
* url: qxmoUrl
|
||
* ...
|
||
* })
|
||
* ```
|
||
*/
|
||
constructor(option: ObliqueGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): any;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取中心点
|
||
*/
|
||
getCenterPosition(): GeoPoint;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 移动位置
|
||
*/
|
||
movePosition(offsetLon: any, offsetLat: any, offsetAlt: any): void;
|
||
/**
|
||
* 3dtiles模型地址路径
|
||
*/
|
||
url: any;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale: any;
|
||
/**
|
||
* 偏移位置
|
||
*/
|
||
offset: any;
|
||
/**
|
||
* 旋转角度
|
||
*/
|
||
rotate: any;
|
||
/**
|
||
* @ignore
|
||
* 颜色
|
||
*/
|
||
/**
|
||
* @ignore
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 是否正在编辑
|
||
*/
|
||
isEditing: any;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
readonly clampToGround: boolean;
|
||
}
|
||
/**
|
||
* 模型标绘参数类
|
||
*/
|
||
class ObliqueGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 倾斜摄影路径
|
||
*/
|
||
url: string;
|
||
/**
|
||
* @ignore
|
||
* 缩放大小
|
||
*/
|
||
scale?: number;
|
||
/**
|
||
* 偏移坐标 [x,y,z]
|
||
*/
|
||
offset?: Array<number>;
|
||
/**
|
||
* 旋转角度 [x,y,z] 轴
|
||
*/
|
||
rotate?: Array<number>;
|
||
/**
|
||
* @ignore
|
||
* 颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)',空则默认颜色
|
||
*/
|
||
color?: string;
|
||
/**
|
||
* 是否正在编辑
|
||
*/
|
||
isEditing?: boolean;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 抛物线
|
||
* @see <a href='../../../examples/gallery/editor.html#polylineArrow'>动态线</a>
|
||
*/
|
||
class ParabolaLineGraphic extends GraphicItem {
|
||
protected _opt: ParabolaLineGraphicOpt;
|
||
protected _type: string;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* ```
|
||
* 示例代码:
|
||
* let parabolaLine = new GV.ParabolaLineGraphic({
|
||
* positions:[new GV.GeoPoint(80,10,20000), new GV.GeoPoint(110,0,200000)],
|
||
* lineStyle: new GV.DynamicStyle({
|
||
* color: '#00FF99',
|
||
* icon: GV.DynamicIconEnum.Arrow,
|
||
* duration:1000
|
||
* }),
|
||
* width:5, //线宽
|
||
* factor: 50000,
|
||
* step: 50
|
||
* });
|
||
* graphicLayer.add(parabolaLine)
|
||
* ```
|
||
*/
|
||
constructor(option: ParabolaLineGraphic);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取最大控制点数量(编辑中的PolylineCreator使用,为无限大时可以省略)
|
||
*/
|
||
getMaxCtrlPosNum(): number;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 位置(只有前两个点位有效)
|
||
* ```
|
||
* 示例代码
|
||
* parabolaLine.positions = [new GV.GeoPoint(0,0,200000), new GV.GeoPoint(100,0,200000)]
|
||
* ```
|
||
*/
|
||
positions: any;
|
||
readonly interpolation: boolean;
|
||
/**
|
||
* 线宽 (单位:像素) (范围: >0 && <100)
|
||
* ```
|
||
* 示例代码
|
||
* parabolaLine.width = 10
|
||
* ```
|
||
*/
|
||
width: number;
|
||
/**
|
||
* 曲率(曲线的高度)(单位:米)(范围: >0 && <10000000)
|
||
* ```
|
||
* 示例代码
|
||
* parabolaLine.factor = 50000
|
||
* ```
|
||
*/
|
||
factor: number;
|
||
/**
|
||
* 点集数,抛物线细分插值数 (范围:>0 && <1000)
|
||
* ```
|
||
* parabolaLine.step = 50
|
||
* ```
|
||
*/
|
||
step: number;
|
||
readonly clampToGround: boolean;
|
||
/**
|
||
* 是否支持动态点修改(支持模式可能会对效率有点影响与当前加载数据量有关)
|
||
*/
|
||
dirty: boolean;
|
||
/**
|
||
* 线条样式
|
||
* 线条支持测样式参考
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* parabolaLine.lineStyle = new GV.DynamicStyle({//设置动态样式
|
||
* color: '#ffff00', //颜色
|
||
* icon: GV.DynamicIconEnum.Attack, //样式图表
|
||
* duration:800 //周期
|
||
* })
|
||
* ```
|
||
*/
|
||
lineStyle: ColorStyle | ArrowStyle | OutlineStyle | DashStyle | GlowStyle | DynamicStyle;
|
||
color: string;
|
||
/**
|
||
* @注意 程序内部调用
|
||
*
|
||
* 获取插值回调函数
|
||
* @param value
|
||
*/
|
||
getInterpolationCallback(value: any): any[];
|
||
}
|
||
/**
|
||
* 抛物线数据约束及默认值
|
||
*/
|
||
class ParabolaLineGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 线条样式
|
||
* 线条支持测样式参考
|
||
*/
|
||
lineStyle?: ColorStyle | ArrowStyle | OutlineStyle | DashStyle | GlowStyle | DynamicStyle;
|
||
/**
|
||
* 曲率
|
||
*/
|
||
factor?: number;
|
||
/**
|
||
* 点集数量
|
||
*/
|
||
step?: number;
|
||
/**
|
||
* 抛物线坐标前两位有效
|
||
*/
|
||
positions?: Array<GeoPoint>;
|
||
/**
|
||
* 线宽
|
||
*/
|
||
width?: number;
|
||
/**
|
||
* 是否动态更新(脏检查)
|
||
*/
|
||
dirty: boolean;
|
||
/**
|
||
* 是否贴地
|
||
*/
|
||
clampToGround?: boolean;
|
||
/**
|
||
* 是否内部插值,true为只接受两个控制点 ,内部插值 ,否则不插值,可接受多控制点
|
||
*/
|
||
interpolation?: boolean;
|
||
}
|
||
|
||
class PipelineBaseGraphic extends GraphicItem {
|
||
protected _opt: PipelineBaseGraphicOpt;
|
||
protected _rectangle: Cesium.Rectangle;
|
||
constructor(option: PipelineBaseGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
PipeType(): PipeType;
|
||
getCenterLine(): any;
|
||
/**
|
||
* 更新绘制
|
||
*/
|
||
updateRender(): void;
|
||
/**
|
||
* 地理外包矩形(注意:为方便计算,经纬度为角度值,而非弧度)
|
||
*/
|
||
readonly bounding: Cesium.Rectangle;
|
||
image: any;
|
||
color: any;
|
||
showOutline: any;
|
||
outlineColor: any;
|
||
/**
|
||
* 更新自身的外包矩形
|
||
* @param geoPoints 顶点坐标
|
||
*/
|
||
protected updateBounding(geoPoints: Array<GeoPoint>): void;
|
||
}
|
||
class PipelineBaseGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 纹理贴图
|
||
*/
|
||
image?: string;
|
||
/**
|
||
* 管道颜色(后续考虑使用纹理)
|
||
*/
|
||
color?: string;
|
||
/**
|
||
* 显示轮廓线
|
||
*/
|
||
showOutline?: boolean;
|
||
/**
|
||
* 轮廓线颜色
|
||
*/
|
||
outlineColor?: string;
|
||
}
|
||
enum PipeType {
|
||
PipeBase = 1,
|
||
PipelineStripGraphic = 2,
|
||
PipelineTurnGraphic = 3,
|
||
PipeTurnTwoGraphic = 4,
|
||
PipeTurnThreeGraphic = 5,
|
||
PipelineGraphic = 100
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 管道线
|
||
* @see <a href='../../../examples/gallery/editor.html#PipeLine'>标绘管道线</a>
|
||
*/
|
||
class PipelineGraphic extends PipelineBaseGraphic {
|
||
protected _opt: PipelineGraphicOpt;
|
||
protected _renderPara: {
|
||
lineSeg: Array<Cesium.Cartesian3>;
|
||
cornerSeg: Array<object>;
|
||
centerPts: Array<Cesium.Cartesian3>;
|
||
};
|
||
protected _type: string;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let polyline = new GV.PipelineGraphic({
|
||
* positions:[new GV.GeoPoint(0,0,200000), new GV.GeoPoint(100,0,200000)], //设置坐标
|
||
* radius: 10 //管道半径
|
||
* });
|
||
* viewer.graphicLayer.add(polyline); //添加到场景
|
||
* ```
|
||
*/
|
||
constructor(option: PipelineGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
PipeType(): PipeType;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 位置
|
||
* ```
|
||
* 示例代码
|
||
* polyline.positions = [new GV.GeoPoint(0,0,200000), new GV.GeoPoint(100,0,200000)]
|
||
* ```
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
radius: any;
|
||
shape: any;
|
||
/**
|
||
* 将连续线拆分成两个部分:直线段部分(pts)和拐点段部分(corners)
|
||
* @param cornerRadius 拐弯处的圆角半径(默认为管道直径)
|
||
*/
|
||
protected updateRenderPara(cornerRadius?: number): void;
|
||
/**
|
||
* 获取渲染所需参数
|
||
* 返回object对象:
|
||
* {
|
||
* lineSeg:Array<Cesium.Cartesian3>, //直线段部分顶点
|
||
* cornerSeg:Array<object>, //拐弯部分顶点
|
||
* centerPts:Array<Cesium.Cartesian3> //中心线顶点
|
||
* }
|
||
*/
|
||
getRenderPara(): {
|
||
lineSeg: Cesium.Cartesian3[];
|
||
cornerSeg: object[];
|
||
centerPts: Cesium.Cartesian3[];
|
||
};
|
||
getCenterLine(): any[];
|
||
}
|
||
enum SectionShape {
|
||
Circle = "circle",
|
||
Rect = "rect",
|
||
RoundRect = "roundRect"
|
||
}
|
||
class PipelineGraphicOpt extends PipelineBaseGraphicOpt {
|
||
/**
|
||
* 关键点信息
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 管道半径
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 截面形状
|
||
*/
|
||
shape: SectionShape;
|
||
}
|
||
|
||
class PipelineStripGraphic extends PipelineBaseGraphic {
|
||
private _headTopoNode;
|
||
private _tailTopoNode;
|
||
protected _opt: PipelineGraphicOpt;
|
||
protected _renderPara: {
|
||
geos: Array<GeoPoint>;
|
||
pts: Array<Cesium.Cartesian3>;
|
||
types: Array<boolean>;
|
||
};
|
||
protected _type: string;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let polyline = new GV.PipelineStripGraphic({
|
||
* positions:[new GV.GeoPoint(0,0,200000), new GV.GeoPoint(100,0,200000)], //设置坐标
|
||
* radius: 10 //管道半径
|
||
* });
|
||
* viewer.graphicLayer.add(polyline); //添加到场景
|
||
* ```
|
||
*/
|
||
constructor(option: PipelineGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
PipeType(): PipeType;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 位置
|
||
* ```
|
||
* 示例代码
|
||
* polyline.positions = [new GV.GeoPoint(0,0,200000), new GV.GeoPoint(100,0,200000)]
|
||
* ```
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
radius: any;
|
||
shape: any;
|
||
/**
|
||
* 头部拓扑节点
|
||
*/
|
||
headTopoNode: any;
|
||
/**
|
||
* 尾部拓扑节点
|
||
*/
|
||
tailTopoNode: any;
|
||
/**
|
||
* 将连续线拆分成两个部分:直线段部分(pts)和拐点段部分(corners)
|
||
* @param cornerRadius 拐弯处的圆角半径(默认为管道直径)
|
||
*/
|
||
private updateRenderPara;
|
||
/**
|
||
* 获取不受拓扑绘制影响的原始顶点
|
||
*/
|
||
getPositions(): any[];
|
||
/**
|
||
* 获取渲染所需参数,即中心线参数
|
||
* {
|
||
* geos:Array<GeoPoint>, //中心线地理坐标
|
||
* pts:Array<Cesium.Cartesian3>, //中心线世界坐标
|
||
* types:Array<boolean> //中心线类型(true表示直线段;false表示曲线段)
|
||
* }
|
||
*/
|
||
getRenderParas(): {
|
||
geos: GeoPoint[];
|
||
pts: Cesium.Cartesian3[];
|
||
types: boolean[];
|
||
};
|
||
getCenterLine(): any[];
|
||
updateRender(): void;
|
||
}
|
||
|
||
class PipelineTurnGraphic extends PipelineBaseGraphic {
|
||
protected _opt: PipelineTurnGraphicOpt;
|
||
constructor(option: PipelineTurnGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
PipeType(): PipeType;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
position: GeoPoint;
|
||
center: GeoPoint;
|
||
radius: any;
|
||
shape: any;
|
||
directions: Array<GeoPoint>;
|
||
protected updateRenderPara(cornerRadius?: number): void;
|
||
}
|
||
class PipelineTurnGraphicOpt extends PipelineBaseGraphicOpt {
|
||
/**
|
||
* 拐弯中心点
|
||
*/
|
||
center: GeoPoint;
|
||
/**
|
||
* 管道半径
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 截面形状
|
||
*/
|
||
shape: SectionShape;
|
||
/**
|
||
* 各方向线段终点,指的是存在于PipelineStripGraphic中的线段顶点
|
||
*/
|
||
directions: Array<GeoPoint>;
|
||
}
|
||
|
||
class PipeTurnThreeGraphic extends PipelineTurnGraphic {
|
||
protected _opt: PipelineTurnGraphicOpt;
|
||
/**
|
||
* index:PipelineStripGraphic对象在列表中的索引
|
||
* angle:与下一段相邻线的夹角(经纬网夹角,非准确夹角)
|
||
* pt:线段终点
|
||
* centerPts:插值后的完整中心线
|
||
* centerTypes:线段类型(true表示直线段;false表示曲线段),长度(线段数)比centerPts(顶点数)少1
|
||
*/
|
||
protected _turnArray: Array<{
|
||
index: number;
|
||
angle: number;
|
||
pt: GeoPoint;
|
||
centerPts: Array<Cesium.Cartesian3>;
|
||
centerTypes: Array<boolean>;
|
||
}>;
|
||
constructor(option: PipelineTurnGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
PipeType(): PipeType;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
protected updateRenderPara(cornerRadius?: number): void;
|
||
/**
|
||
* 获取渲染所需参数,即弯曲线参数数组
|
||
* 返回object{index: number, angle:number, pt:GeoPoint, centerPts:Array<Cesium.Cartesian3>, centerTypes: Array<boolean>对象的数组
|
||
* 每个object对象包含了某条线段与其逆时针方向的相邻线段的拐弯参数,具体参数含义如下:
|
||
* index:当前线段载体(PipelineStripGraphic对象)在列表中的索引
|
||
* angle:与相邻线的夹角(经纬网夹角,非准确夹角)
|
||
* pt:当前线段的终点
|
||
* centerPts:插值后的完整中心线
|
||
* centerTypes:线段类型(true表示直线段;false表示曲线段),长度(线段数)比centerPts(顶点数)少1
|
||
*/
|
||
getTurnArray(): {
|
||
index: number;
|
||
angle: number;
|
||
pt: GeoPoint;
|
||
centerPts: Cesium.Cartesian3[];
|
||
centerTypes: boolean[];
|
||
}[];
|
||
}
|
||
|
||
class PipeTurnTwoGraphic extends PipelineTurnGraphic {
|
||
protected _opt: PipelineTurnGraphicOpt;
|
||
protected _centerPts: Array<Cesium.Cartesian3>;
|
||
constructor(option: PipelineTurnGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
PipeType(): PipeType;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
protected updateRenderPara(cornerRadius?: number): void;
|
||
/**
|
||
* 获取渲染所需参数,即中心线
|
||
*/
|
||
getCenterPts(): Cesium.Cartesian3[];
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 点几何体绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#plottingPoint'>点</a>
|
||
*/
|
||
class PointGraphic extends GraphicPositionItem {
|
||
protected _opt: PointGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 点几何体构造方法
|
||
* ```
|
||
* 示例代码
|
||
* let point = new GV.PointGraphic({position:new GV.GeoPoint(10,10)});
|
||
* viewer.graphicLayer.add(point);
|
||
* ```
|
||
*/
|
||
constructor(option: PointGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 大小(单位:像素) (范围: >0 && <100)
|
||
*/
|
||
pixelSize: number;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 外边框颜色
|
||
*/
|
||
outlineColor: any;
|
||
/**
|
||
* 外边框宽度
|
||
*/
|
||
outlineWidth: any;
|
||
/**
|
||
* 高度按照相对于什么
|
||
*/
|
||
heightReference: any;
|
||
/**
|
||
* 根据距离计算缩放大小
|
||
*/
|
||
scaleByDistance: any;
|
||
/**
|
||
* 是否深度检测
|
||
*/
|
||
isDepthTest: boolean;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class PointGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 点的大小, (单位:像素) (范围: >0 && <500)
|
||
*/
|
||
pixelSize?: number;
|
||
/**
|
||
* 颜色 CssColor
|
||
*/
|
||
color?: string;
|
||
/**
|
||
* 外边框颜色宽度,(单位:像素) (范围: >0 && <500)
|
||
*/
|
||
outlineWidth?: number;
|
||
/**
|
||
* 外边框颜色 CssColor
|
||
*/
|
||
outlineColor?: string;
|
||
/**
|
||
* 根据距离视点范围和放大率范围计算放大倍数
|
||
*/
|
||
scaleByDistance?: Array<Number>;
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference?: string;
|
||
/**
|
||
* 是否深度检测
|
||
*/
|
||
isDepthTest?: boolean;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 基础面
|
||
* @see <a href='../../../examples/gallery/editor.html#polygon'>基础面</a>
|
||
*/
|
||
class PolygonGraphic extends GraphicItem {
|
||
protected _opt: PolygonGraphicOpt;
|
||
protected _type: string;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let polygon = new GV.PolygonGraphic({
|
||
* positions:[new GV.GeoPoint(0,10), new GV.GeoPoint(0,20),new GV.GeoPoint(10,20),new GV.GeoPoint(10,0)] //设置坐标
|
||
* holes:[[GV.GeoPoint(3,13), GV.GeoPoint(7,13), GV.GeoPoint(5,18)]] //带一个洞
|
||
* });
|
||
* viewer.graphicLayer.add(polygon); //添加到场景
|
||
* ```
|
||
*/
|
||
constructor(option: PolygonGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取最少控制点数量(编辑中的PolylineCreator使用,为2时可以省略)
|
||
*/
|
||
getMinCtrlPosNum(): number;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 位置
|
||
*/
|
||
positions: any;
|
||
holes: any;
|
||
/**
|
||
* 相对于椭球面的高度(clampToGround为true时无效)
|
||
*/
|
||
height: any;
|
||
/**
|
||
* 挤压面相对于椭球面的高度(clampToGround为true时无效)
|
||
*/
|
||
extrudedHeight: any;
|
||
/**
|
||
* 是否使用提供的材质填充多边形
|
||
*/
|
||
fill: any;
|
||
/**
|
||
* 填充色
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 多边形是否有边框
|
||
*/
|
||
outline: any;
|
||
/**
|
||
* 边框色
|
||
*/
|
||
outlineColor: any;
|
||
/**
|
||
* 轮廓宽度
|
||
*/
|
||
outlineWidth: any;
|
||
/**
|
||
* @只读 只有初始化是可以设置该属性(clampToGround为true时无效)
|
||
* @描述 指定是否使用每个点的高度,一般需要把 extrudedHeight 参数设置为0
|
||
* ```
|
||
* 参考示例
|
||
* let polygon = new GV.PolygonGraphic({
|
||
* positions:[new GV.GeoPoint(0,10,5000), new GV.GeoPoint(0,20,200000),new GV.GeoPoint(10,20,300000),new GV.GeoPoint(10,0,200000)], //设置坐标
|
||
* extrudedHeight : 0,
|
||
* perPositionHeight : true
|
||
* });
|
||
* viewer.graphicLayer.add(polygon); //添加到场景
|
||
* ```
|
||
*/
|
||
readonly perPositionHeight: boolean;
|
||
/**
|
||
* 挤压时打开顶部(clampToGround为true时无效)
|
||
* ```
|
||
* 示例代码
|
||
* let polygon = new GV.PolygonGraphic({
|
||
* positions:[new GV.GeoPoint(0,10, 100000), new GV.GeoPoint(0,20, 100000),new GV.GeoPoint(10,20, 100000),new GV.GeoPoint(10,0, 100000)], //设置坐标
|
||
* clampToGround : false,
|
||
* extrudedHeight : 500000.0,
|
||
* closeTop : false,
|
||
* closeBottom : false
|
||
* });
|
||
* viewer.graphicLayer.add(polygon); //添加到场景
|
||
* ```
|
||
*/
|
||
closeTop: any;
|
||
/**
|
||
* 挤压时打开底部(clampToGround为true时无效)
|
||
*/
|
||
closeBottom: any;
|
||
/**
|
||
* 是否贴地注意在贴地模式下
|
||
* height、extrudedHeight、perPositionHeight、closeTop、closeBottom参数无效
|
||
*/
|
||
clampToGround: boolean;
|
||
/**
|
||
* 是否支持动态点修改(支持模式可能会对效率有点影响与当前加载数据量有关)
|
||
*/
|
||
dirty: boolean;
|
||
movePosition(offsetLon?: number, offsetLat?: number, offsetAlt?: number): void;
|
||
/**
|
||
* 设置材质为影像播放,需要有 video 承载的 dom 元素
|
||
*/
|
||
videoElement: HTMLVideoElement;
|
||
/**
|
||
* 设置材质为影像播放,需要有 video 承载的 dom 元素
|
||
*/
|
||
stRotation: number;
|
||
/**
|
||
* video 是否绑定 viewer clock 时钟
|
||
*/
|
||
bindClock: boolean;
|
||
/**
|
||
* 材质方向重复 [x,y] x 方向重复数,y方向重复数
|
||
*/
|
||
repeat: Array<number>;
|
||
}
|
||
/**
|
||
* 多边形面数据约束及默认值
|
||
*/
|
||
class PolygonGraphicOpt extends GraphicItemOpt {
|
||
clampToGround?: boolean;
|
||
/**
|
||
* 多边形顶点
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 带洞多边形的洞形顶点数组,数组长度表示带洞的个数
|
||
*/
|
||
holes?: Array<Array<GeoPoint>>;
|
||
/**
|
||
* 高度
|
||
*/
|
||
height?: number;
|
||
/**
|
||
* 多边形的凸出面相对于椭球面的高度
|
||
*/
|
||
extrudedHeight?: number;
|
||
/**
|
||
* 是否填充
|
||
*/
|
||
fill?: boolean;
|
||
/**
|
||
* 填充色
|
||
*/
|
||
color?: string;
|
||
/**
|
||
* 是否有外边框
|
||
*/
|
||
outline?: boolean;
|
||
/**
|
||
* 外边框颜色
|
||
*/
|
||
outlineColor?: string;
|
||
/**
|
||
* 外边框线宽度
|
||
*/
|
||
outlineWidth?: number;
|
||
/**
|
||
* 是否使用每个位置的高度
|
||
*/
|
||
perPositionHeight?: boolean;
|
||
/**
|
||
* 是否关闭多边形顶部
|
||
*/
|
||
closeTop?: boolean;
|
||
/**
|
||
* 是否关闭多边形底部
|
||
*/
|
||
closeBottom?: boolean;
|
||
/**
|
||
* 是否动态更新(脏检查)
|
||
*/
|
||
dirty?: boolean;
|
||
/**
|
||
* 影像dom
|
||
*/
|
||
videoElement?: HTMLVideoElement;
|
||
/**
|
||
* 材质方向,以正北方向开始计算,单位度数
|
||
*/
|
||
stRotation?: number;
|
||
/**
|
||
* 是否绑定时钟
|
||
*/
|
||
bindClock?: boolean;
|
||
/**
|
||
* 视频块重复 [x,y] x 方向重复,y方向重复
|
||
*/
|
||
repeat?: Array<number>;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 基础线
|
||
* @see <a href='../../../examples/gallery/editor.html#plottingPointLine'>标绘点、线</a>
|
||
*/
|
||
class PolylineGraphic extends GraphicItem {
|
||
protected _opt: PolylineGraphicOpt;
|
||
protected _type: string;
|
||
private _interpolationCallback;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let polyline = new GV.PolylineGraphic({
|
||
* positions:[new GV.GeoPoint(0,0,200000), new GV.GeoPoint(100,0,200000)], //设置坐标
|
||
* lineStyle: new GV.ColorStyle({color: '#ffff00'}), //设置颜色
|
||
* width: 3, //设置宽度
|
||
* clampToGround: true //设置贴地
|
||
* });
|
||
* viewer.graphicLayer.add(polyline); //添加到场景
|
||
* ```
|
||
*/
|
||
constructor(option: PolylineGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 位置
|
||
* ```
|
||
* 示例代码
|
||
* polyline.positions = [new GV.GeoPoint(0,0,200000), new GV.GeoPoint(100,0,200000)]
|
||
* ```
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 弧线类型
|
||
* ```
|
||
* 示例代码
|
||
* polyline.arcType = GV.ArcTypeEnum.Geodesic
|
||
* ```
|
||
*/
|
||
arcType: ArcTypeEnum;
|
||
/**
|
||
* 是否贴地(注意当弧线类型参数为GV.ArcTypeEnum.None时贴地无效)
|
||
* ```
|
||
* 示例代码
|
||
* polyline.clampToGround = true;
|
||
* ```
|
||
*/
|
||
clampToGround: boolean;
|
||
/**
|
||
* 线宽 (单位:像素) (范围: >0 && <100)
|
||
* ```
|
||
* 示例代码
|
||
* polyline.width = 10
|
||
* ```
|
||
*/
|
||
width: number;
|
||
/**
|
||
* 是否支持动态点修改(支持模式可能会对效率有点影响与当前加载数据量有关)
|
||
*/
|
||
dirty: boolean;
|
||
/**
|
||
* 线条样式
|
||
* 线条支持测样式参考
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* polyline.lineStyle = new GV.DynamicStyle({//设置动态样式
|
||
* color: '#ffff00', //颜色
|
||
* icon: GV.DynamicIconEnum.Attack, //样式图表
|
||
* duration:800 //周期
|
||
* })
|
||
* ```
|
||
*/
|
||
lineStyle: ColorStyle | ArrowStyle | OutlineStyle | DashStyle | GlowStyle | DynamicStyle | TextureStyle;
|
||
color: string;
|
||
/**
|
||
* 设置插值回调函数
|
||
* @param callback
|
||
* @return
|
||
* ```
|
||
* 代码示例
|
||
* polyline.setInterpolationCallback((value)=>{
|
||
* return Calculate.getBezier(value) //根据当前点数据value生成贝塞尔点数据
|
||
* })
|
||
* ```
|
||
*/
|
||
setInterpolationCallback(callback: any): void;
|
||
/**
|
||
* 获取插值回调函数(程序内部调用)
|
||
* @param value
|
||
*/
|
||
getInterpolationCallback(value: Array<GeoPoint>): Array<GeoPoint> | Array<Cesium.Cartesian3>;
|
||
}
|
||
/**
|
||
* 折线数据约束及默认值
|
||
*/
|
||
class PolylineGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 线条样式
|
||
* 线条支持测样式参考
|
||
*/
|
||
lineStyle: ColorStyle | ArrowStyle | OutlineStyle | DashStyle | GlowStyle | DynamicStyle | TextureStyle;
|
||
/**
|
||
* 关键点信息
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 弧线类型
|
||
*/
|
||
arcType?: ArcTypeEnum;
|
||
/**
|
||
* 是否贴地
|
||
*/
|
||
clampToGround?: boolean;
|
||
/**
|
||
* 线型宽度
|
||
*/
|
||
width: number;
|
||
/**
|
||
* 是否动态更新(脏检查)
|
||
*/
|
||
dirty: boolean;
|
||
}
|
||
enum ArcTypeEnum {
|
||
/**
|
||
* 测地线
|
||
*/
|
||
Geodesic,
|
||
/**
|
||
* 空(该模式下的线为纯直线)
|
||
*/
|
||
None,
|
||
/**
|
||
* 恒向线
|
||
*/
|
||
Rhumb
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 气泡标签绘制对象
|
||
* @see <a href='../../../examples/gallery/editor.html#popover'>气泡标签</a>
|
||
*/
|
||
class PopoverGraphic extends GraphicPositionItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: PopoverGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let popoverGraphic = new GV.PopoverGraphic({
|
||
* position: new GV.GeoPoint(-75.59777, 40.03883, 100),
|
||
* text: "中科星图中科星图中科星图中科星图中科星图中科星图中科星图中科星图",
|
||
* shapeType: "pebbles",
|
||
* scale: 1.0,// 0.5
|
||
* horizontalOrigin: 'left',
|
||
* verticalOrigin: 'bottom',
|
||
* textTopMargin:'20px',
|
||
* textRightMargin:'31px',
|
||
* textLeftMargin:'31px'
|
||
* });
|
||
* ```
|
||
*/
|
||
constructor(option: PopoverGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): any;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 更新标签 注:在创建完成标签后,如果需要更改属性需要手动调用该方法
|
||
*/
|
||
updatePopoverCanvas(): void;
|
||
/**
|
||
* 底图形状
|
||
*/
|
||
shapeType: any;
|
||
/**
|
||
* 线颜色
|
||
*/
|
||
lineColor: any;
|
||
/**
|
||
* 线宽
|
||
*/
|
||
lineWidth: any;
|
||
/**
|
||
* 线型
|
||
*/
|
||
lineType: any;
|
||
/**
|
||
* 文本
|
||
*/
|
||
text: any;
|
||
/**
|
||
* 是否填充
|
||
*/
|
||
enableFill: any;
|
||
/**
|
||
* 填充色
|
||
*/
|
||
fillColor: any;
|
||
/**
|
||
* 标签字体
|
||
*/
|
||
labelFont: any;
|
||
/**
|
||
* 左部留空
|
||
*/
|
||
textLeftMargin: any;
|
||
/**
|
||
* 右部留空
|
||
*/
|
||
textRightMargin: any;
|
||
/**
|
||
* 顶部留空
|
||
*/
|
||
textTopMargin: any;
|
||
/**
|
||
* 底部留空
|
||
*/
|
||
textBottomMargin: any;
|
||
/**
|
||
* 文本对齐方式
|
||
*/
|
||
textAlign: any;
|
||
/**
|
||
* 标签字体颜色 red 红色 black 黑色 注:HTML style 颜色属性
|
||
*/
|
||
labelFontColor: any;
|
||
/**
|
||
* 标签字体大小
|
||
*/
|
||
labelFontSize: any;
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale: any;
|
||
/**
|
||
* 水平对齐方式: 'left' 左对齐; 'center' 居中; 'right' 右对齐;
|
||
*/
|
||
horizontalOrigin: any;
|
||
/**
|
||
* 垂直对齐方式 : 'baseline'基线对齐; 'bottom' 底部对齐; 'center' 中间对齐; 'top' 顶部对齐
|
||
*/
|
||
verticalOrigin: any;
|
||
/**
|
||
* 视角偏移[x,y,z] 空间坐标值 单位为米
|
||
*/
|
||
eyeOffset: any;
|
||
/**
|
||
* 像素偏移 [x,y] x:相对中心点屏幕横向偏移; y:相对中心点屏幕纵向偏移; 单位像素值
|
||
*/
|
||
pixelOffset: any;
|
||
/**
|
||
*沿视角方向旋转角度,单位弧度值
|
||
*/
|
||
rotation: any;
|
||
/**
|
||
* 宽度: 默认以像素为单位,当sizeInMeters参数为true是单位为米; 最小值大于0
|
||
*/
|
||
width: any;
|
||
/**
|
||
* 高度: 默认以像素为单位,当sizeInMeters参数为true是单位为米; 最小值大于0
|
||
*/
|
||
height: any;
|
||
/**
|
||
* 颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 大小是否以米为单位
|
||
*/
|
||
sizeInMeters: any;
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference: any;
|
||
}
|
||
class PopoverGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 缩放大小
|
||
*/
|
||
scale?: number;
|
||
/**
|
||
* 水平对齐 : 'left' 左对齐; 'center' 居中; 'right' 右对齐;
|
||
*/
|
||
horizontalOrigin?: String;
|
||
/**
|
||
* 垂直对齐 : 'baseline'基线对齐; 'bottom' 底部对齐; 'center' 中间对齐; 'top' 顶部对齐
|
||
*/
|
||
verticalOrigin?: String;
|
||
/**
|
||
* 视角偏移[x,y,z] 空间坐标值 单位为米
|
||
*/
|
||
eyeOffset?: Array<number>;
|
||
/**
|
||
* 像素偏移 [x,y] x:相对中心点屏幕横向偏移; y:相对中心点屏幕纵向偏移; 单位像素值
|
||
*/
|
||
pixelOffset?: Array<number>;
|
||
/**
|
||
* 沿视角方向旋转角度,单位弧度值
|
||
*/
|
||
rotation?: number;
|
||
/**
|
||
* 宽度: 默认以像素为单位,当sizeInMeters参数为true是单位为米; 最小值大于0
|
||
*/
|
||
width: number;
|
||
/**
|
||
* 高度: 默认以像素为单位,当sizeInMeters参数为true是单位为米; 最小值大于0
|
||
*/
|
||
height: number;
|
||
/**
|
||
* 颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
color?: String;
|
||
/**
|
||
* 大小是否以米为单位
|
||
*/
|
||
sizeInMeters?: Boolean;
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference?: String;
|
||
/**
|
||
* 底图类型 pebbles 鹅卵石风格 pebblesrect 鹅卵石方形风格 roundedrectangle 圆角矩形风格 ellipse 椭圆风格
|
||
*/
|
||
shapeType?: String;
|
||
/**
|
||
* 线颜色
|
||
*/
|
||
lineColor?: String;
|
||
/**
|
||
* 线宽
|
||
*/
|
||
lineWidth?: String;
|
||
/**
|
||
* 线型 line 直线 point 点 dottedLine 虚线 dottedAndPointLine 虚线加点
|
||
*/
|
||
lineType?: String;
|
||
/**
|
||
* 是否填充
|
||
*/
|
||
enableFill?: boolean;
|
||
/**
|
||
* 填充色
|
||
*/
|
||
fillColor?: String;
|
||
/**
|
||
* 标签内容
|
||
*/
|
||
text?: String;
|
||
/**
|
||
* 标签字体 Microsoft YaHei 微软雅黑 NSimSun 新宋体 KaiTi 楷体 等
|
||
*/
|
||
labelFont?: String;
|
||
/**
|
||
* 标签字体颜色 red 红色 black 黑色 注:HTML style 颜色属性
|
||
*/
|
||
labelFontColor?: String;
|
||
/**
|
||
* 标签字体大小
|
||
*/
|
||
labelFontSize?: String;
|
||
/**
|
||
* 左部留空
|
||
*/
|
||
textLeftMargin?: String;
|
||
/**
|
||
* 右部留空
|
||
*/
|
||
textRightMargin?: String;
|
||
/**
|
||
* 顶部留空
|
||
*/
|
||
textTopMargin?: String;
|
||
/**
|
||
* 底部留空
|
||
*/
|
||
textBottomMargin?: String;
|
||
/**
|
||
* 文本对齐方式 center left right
|
||
*/
|
||
textAlign?: String;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 雷达扫描波
|
||
* @see <a href='../../../examples/gallery/editor.html#radar'>雷达扫描波</a>
|
||
*/
|
||
class RadarGraphic extends GraphicPositionItem {
|
||
/**
|
||
* 初始化示例
|
||
* @param option 雷达扫描波
|
||
* ```
|
||
* 示例代码:
|
||
* let opt = new GV.RadarGraphicOpt();
|
||
* opt.position = new GV.GeoPoint(114, 32);
|
||
* let obj1 = new GV.RadarGraphic(opt);
|
||
* viewer.graphicLayer.add(obj1);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(option: RadarGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 设置外部颜色
|
||
* @param value 外部颜色
|
||
*/
|
||
/**
|
||
* 获取外部颜色
|
||
* @returns
|
||
*/
|
||
outerColor: string;
|
||
/**
|
||
* 设置外部透明度
|
||
* @param value 外部透明度
|
||
*/
|
||
/**
|
||
* 获取外部透明度
|
||
* @returns
|
||
*/
|
||
outerAlpha: number;
|
||
/**
|
||
* 设置内锥颜色
|
||
* @param value 内锥颜色
|
||
*/
|
||
/**
|
||
* 获取内锥颜色
|
||
* @returns
|
||
*/
|
||
innerColor: string;
|
||
/**
|
||
* 设置内锥透明度
|
||
* @param value 内锥透明度
|
||
*/
|
||
/**
|
||
* 获取内锥透明度
|
||
* @returns
|
||
*/
|
||
innerAlhpa: number;
|
||
/**
|
||
* 设置线条颜色
|
||
* @param value 线条颜色
|
||
*/
|
||
/**
|
||
* 获取线条颜色
|
||
* @returns
|
||
*/
|
||
lineColor: string;
|
||
/**
|
||
* 设置水平起始角度,取值范围小于endAngle - scanAngle - 1
|
||
* @param value 水平起始角度
|
||
*/
|
||
/**
|
||
* 获取水平起始角度
|
||
* @returns
|
||
*/
|
||
startAngle: number;
|
||
/**
|
||
* 设置水平终止角,取值范围大于startAngle + scanAngle + 1
|
||
* @param value 水平终止角
|
||
*/
|
||
/**
|
||
* 获取水平终止角
|
||
* @returns
|
||
*/
|
||
endAngle: number;
|
||
/**
|
||
* 设置垂直起始角,取值范围小于垂直终止角
|
||
* @param value 垂直起始角
|
||
*/
|
||
/**
|
||
* 获取垂直起始角
|
||
* @returns
|
||
*/
|
||
vStartAngle: number;
|
||
/**
|
||
* 设置垂直终止角,取值范围大于垂直起始角
|
||
* @param value 垂直终止角
|
||
*/
|
||
/**
|
||
* 获取垂直终止角
|
||
* @returns
|
||
*/
|
||
vEndAngle: number;
|
||
/**
|
||
* 设置扫面半径,单位米
|
||
* @param value 扫面半径
|
||
*/
|
||
/**
|
||
* 获取扫面半径
|
||
* @returns
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 设置扫描角度,取值范围必须小于endAngle - startAngle - 1
|
||
* @param value 扫描角度
|
||
*/
|
||
/**
|
||
* 获取扫描角度
|
||
* @returns
|
||
*/
|
||
scanAngle: number;
|
||
/**
|
||
* 设置扫描颜色
|
||
* @param value 扫描颜色
|
||
*/
|
||
/**
|
||
* 获取扫描颜色
|
||
* @returns
|
||
*/
|
||
scanColor: string;
|
||
/**
|
||
* 是否往复扫描
|
||
* @param value 标志位
|
||
*/
|
||
/**
|
||
* 获取标志位
|
||
* @returns
|
||
*/
|
||
scanReserve: boolean;
|
||
/**
|
||
* 设置扫描速度,单位:度/秒
|
||
* @param value 扫描速度
|
||
*/
|
||
/**
|
||
* 获取扫描速度
|
||
* @returns
|
||
*/
|
||
scanSpeed: number;
|
||
/**
|
||
* 是否显示扫描
|
||
* @param value 是否显示
|
||
*/
|
||
/**
|
||
* 获取扫描显隐
|
||
* @returns
|
||
*/
|
||
showScan: boolean;
|
||
/**
|
||
* 是否显示轮廓线
|
||
* @param value 是否显示
|
||
*/
|
||
/**
|
||
* 获取外轮廓线显隐
|
||
* @returns
|
||
*/
|
||
showLine: boolean;
|
||
/**
|
||
* 是否显示外轮廓
|
||
* @param value 是否显示
|
||
*/
|
||
/**
|
||
* 获取外轮廓显隐
|
||
* @returns
|
||
*/
|
||
showTriangle: boolean;
|
||
readonly fillScan: any;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class RadarGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 外部颜色
|
||
*/
|
||
outerColor?: string;
|
||
/**
|
||
* 外部透明度
|
||
*/
|
||
outerAlpha?: number;
|
||
/**
|
||
* 内锥颜色
|
||
*/
|
||
innerColor?: string;
|
||
/**
|
||
* 内锥透明度
|
||
*/
|
||
innerAlhpa?: number;
|
||
/**
|
||
* 水平起始角度
|
||
*/
|
||
startAngle?: number;
|
||
/**
|
||
* 水平终止角
|
||
*/
|
||
endAngle?: number;
|
||
/**
|
||
* 垂直起始角
|
||
*/
|
||
vStartAngle?: number;
|
||
/**
|
||
* 垂直终止角
|
||
*/
|
||
vEndAngle?: number;
|
||
/**
|
||
* 扫面半径,单位米
|
||
*/
|
||
radius?: number;
|
||
/**
|
||
* 扫描角度
|
||
*/
|
||
scanAngle?: number;
|
||
/**
|
||
* 扫描颜色
|
||
*/
|
||
scanColor?: string;
|
||
/**
|
||
* 往复扫描
|
||
*/
|
||
scanReserve?: boolean;
|
||
/**
|
||
* 扫描速度,一秒转多少度,越大转越快
|
||
*/
|
||
scanSpeed?: number;
|
||
/**
|
||
* 是否显示扫描
|
||
*/
|
||
showScan?: boolean;
|
||
/**
|
||
* 线条颜色
|
||
*/
|
||
lineColor?: string;
|
||
/**
|
||
* 是否显示外轮廓线
|
||
*/
|
||
showLine?: boolean;
|
||
/**
|
||
* 是否显示外轮廓
|
||
*/
|
||
showTriangle?: boolean;
|
||
/**
|
||
* 是否填充扫描
|
||
*/
|
||
fillScan?: boolean;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 矩形几何体
|
||
* @see <a href='../../../examples/gallery/editor.html#geometry'>矩形</a>
|
||
*/
|
||
class RectangleGraphic extends GraphicItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: RectangleGraphicOpt;
|
||
/**
|
||
* 图标标绘类型
|
||
*/
|
||
protected _type: string;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let rectangleGraphic = new GV.RectangleGraphic({...});
|
||
* ```
|
||
*/
|
||
constructor(option: RectangleGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 区域坐标
|
||
*/
|
||
coordinates: any;
|
||
/**
|
||
* 区域坐标
|
||
*/
|
||
positions: any;
|
||
/**
|
||
* 高度
|
||
*/
|
||
height: any;
|
||
/**
|
||
* 矩形相对于椭球面的高度
|
||
*/
|
||
heightReference: any;
|
||
/**
|
||
* 挤压面相对于椭球面的高度
|
||
*/
|
||
extrudedHeight: any;
|
||
/**
|
||
* 挤压面的相对参考:'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
extrudedHeightReference: any;
|
||
/**
|
||
* 是否填充
|
||
*/
|
||
fill: any;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: any;
|
||
image: any;
|
||
readonly transparent: Boolean;
|
||
/**
|
||
* 是否显示轮廓
|
||
*/
|
||
outline: any;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
outlineColor: any;
|
||
/**
|
||
* 是否投射或接收来自每个光源的阴影: 'cast_only' 仅投射阴影; 'disabled' 不会投射或接收阴影; 'enabled' 投射和接收阴影; 'receive_only' 仅接收阴影;
|
||
*/
|
||
shadows: any;
|
||
movePosition(offsetLon?: number, offsetLat?: number, offsetAlt?: number): void;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class RectangleGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 二维区域坐标 示例[west, south, east, north] west为最西经度, south 为最南纬度, east为最东经度, north为最北纬度;(即将废弃此接口)
|
||
*/
|
||
coordinates: Array<number>;
|
||
/**
|
||
* 二维区域对角坐标点
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 高度: 默认以像素为单位
|
||
*/
|
||
height?: number;
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference?: String;
|
||
/**
|
||
* 矩形的挤压面相对于椭球面的高度
|
||
*/
|
||
extrudedHeight?: number;
|
||
/**
|
||
* extrudedHeight的相对参考:'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
extrudedHeightReference?: String;
|
||
/**
|
||
* 是否填充提供的材质
|
||
*/
|
||
fill?: Boolean;
|
||
/**
|
||
* 填充颜色
|
||
*/
|
||
color?: String;
|
||
/**
|
||
* 填充图片
|
||
*/
|
||
image?: String;
|
||
/**
|
||
* 图片是否透明,仅在 image 有效时有用,默认 false
|
||
*/
|
||
transparent?: Boolean;
|
||
/**
|
||
* 是否轮廓
|
||
*/
|
||
outline?: Boolean;
|
||
/**
|
||
* 轮廓颜色
|
||
*/
|
||
outlineColor?: String;
|
||
/**
|
||
* 是否投射或接收来自每个光源的阴影: 'cast_only' 仅投射阴影; 'disabled' 不会投射或接收阴影; 'enabled' 投射和接收阴影; 'receive_only' 仅接收阴影;
|
||
*/
|
||
shadows?: String;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 扫描波
|
||
* @see <a href='../../../examples/gallery/editor.html#radarScan'>扫描波</a>
|
||
*/
|
||
class ScanGraphic extends GraphicPositionItem {
|
||
protected _opt: ScanGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 扫描波
|
||
* ```
|
||
* 示例代码:
|
||
* let opt = new GV.ScanGraphicOpt();
|
||
* opt.scanColor = 'rgba(255.0, 0.0, 0.0, 1)';
|
||
* opt.position = new GV.GeoPoint(80, 31.85, 0);
|
||
* opt.radius = 1500;
|
||
* radarScan = new GV.ScanGraphic(opt);
|
||
* viewer.graphicLayer.add(radarScan);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(option: ScanGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取扫描板颜色
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置扫描板颜色
|
||
* @param value 颜色
|
||
*/
|
||
scanColor: string;
|
||
/**
|
||
* 获取扫描波边框线颜色
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置扫描波边框线颜色
|
||
* @param value 颜色
|
||
*/
|
||
scanLineColor: string;
|
||
/**
|
||
* 获取扫描半径
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置扫描半径
|
||
* @param value 扫描半径
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 获取速度
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置速度
|
||
* @param val
|
||
*/
|
||
speed: number;
|
||
/**
|
||
* 获取线宽
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 获取线宽
|
||
* @param val 中心点位置
|
||
*/
|
||
lineWidth: number;
|
||
readonly clampToGround: true;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class ScanGraphicOpt extends GraphicPositionItemOpt {
|
||
/**扫描板颜色 */
|
||
scanColor?: string;
|
||
/**扫描波边框线颜色 */
|
||
scanLineColor?: string;
|
||
/**扫描半径 */
|
||
radius?: number;
|
||
/**扫描速度 范围 >0&&<=5 */
|
||
speed?: number;
|
||
/**扫描波边框线宽度 */
|
||
lineWidth?: number;
|
||
}
|
||
|
||
class ScreenTextGraphic extends GraphicItem {
|
||
protected _opt: ScreenTextGraphicOpt;
|
||
constructor(option: ScreenTextGraphicOpt);
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 显示/隐藏
|
||
*/
|
||
visible: boolean;
|
||
/**
|
||
* 屏幕坐标
|
||
*/
|
||
position: [number, number];
|
||
/**
|
||
* 宽度
|
||
*/
|
||
width: number;
|
||
/**
|
||
* 高度
|
||
*/
|
||
height: number;
|
||
/**
|
||
* 字体颜色
|
||
*/
|
||
fontColor: string;
|
||
/**
|
||
* 边框颜色
|
||
*/
|
||
outlineColor: string;
|
||
/**
|
||
* 边框样式
|
||
*/
|
||
outlineStyle: string;
|
||
/**
|
||
* 边框宽度
|
||
*/
|
||
outlineWidth: number;
|
||
/**
|
||
* 字体大小
|
||
*/
|
||
fontSize: number;
|
||
/**
|
||
* 字体样式
|
||
*/
|
||
fontFamily: string;
|
||
/**
|
||
* 字体粗细
|
||
*/
|
||
fontWeight: number;
|
||
/**
|
||
* 文本位置
|
||
*/
|
||
textAlign: string;
|
||
/**
|
||
* 背景图显示/隐藏
|
||
*/
|
||
isShowBackgroundImg: boolean;
|
||
/**
|
||
* 背景颜色
|
||
*/
|
||
backgroundColor: string;
|
||
/**
|
||
* 背景图片地址
|
||
*/
|
||
backgroundImgUrl: string;
|
||
/**
|
||
* 背景图片大小
|
||
*/
|
||
backgroundImgSize: string | [number, number];
|
||
/**
|
||
* 背景图片位置
|
||
*/
|
||
backgroundImgPos: string;
|
||
/**
|
||
* 背景图片是否重复
|
||
*/
|
||
backgroundImgRepeat: string;
|
||
/**
|
||
* 左侧边距
|
||
*/
|
||
paddingLeft: number;
|
||
/**
|
||
* 右侧边距
|
||
*/
|
||
paddingRight: number;
|
||
/**
|
||
* 顶部边距
|
||
*/
|
||
paddingTop: number;
|
||
/**
|
||
* 底部边距
|
||
*/
|
||
paddingBottom: number;
|
||
/**
|
||
* 行距
|
||
*/
|
||
lineHeight: number;
|
||
/**
|
||
* 层级
|
||
*/
|
||
zIndex: number;
|
||
/**
|
||
* 文本
|
||
*/
|
||
text: string;
|
||
toJson(): {
|
||
type: string;
|
||
id: any;
|
||
name: string;
|
||
extendInfo: any;
|
||
};
|
||
parseJson(option: any): void;
|
||
}
|
||
class ScreenTextGraphicOpt extends GraphicItemOpt {
|
||
position?: [number, number];
|
||
width?: number;
|
||
height?: number;
|
||
backgroundColor?: string;
|
||
outlineWidth?: number;
|
||
outlineColor?: string;
|
||
outlineStyle?: string;
|
||
fontSize?: number;
|
||
fontColor?: string;
|
||
fontFamily?: string;
|
||
fontWeight?: number;
|
||
textAlign?: string;
|
||
isShowBackgroundImg?: boolean;
|
||
backgroundImgUrl?: string;
|
||
backgroundImgSize?: string | [number, number];
|
||
backgroundImgPos?: string;
|
||
backgroundImgRepeat?: string;
|
||
paddingLeft?: number;
|
||
paddingRight?: number;
|
||
paddingTop?: number;
|
||
paddingBottom?: number;
|
||
lineHeight?: number;
|
||
zIndex?: number;
|
||
text?: string;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 动态扇形几何体
|
||
* @see <a href='../../../examples/gallery/editor.html#sectorSensor'>扇形动态波</a>
|
||
*/
|
||
class SectorGraphic extends GraphicItem {
|
||
protected _opt: SectorGraphicOpt;
|
||
protected _type: string;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 动态扇形几何体
|
||
* ```
|
||
* 示例代码:
|
||
* let sectorGraphicOpt=new GV.SectorGraphicOpt();
|
||
* let sector = new GV.SectorGraphic(sectorGraphicOpt);
|
||
* viewer.graphicLayer.add(sector);
|
||
* ```
|
||
*/
|
||
constructor(option: SectorGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 设置扇形顶点位置
|
||
* @param value 扇形顶点位置
|
||
*/
|
||
/**
|
||
* 获取扇形顶点位置
|
||
* @returns
|
||
*/
|
||
topPosition: GeoPoint;
|
||
/**
|
||
* 设置扇形底点位置
|
||
* @param value 扇形底点位置
|
||
*/
|
||
/**
|
||
* 获取扇形底点位置
|
||
* @returns
|
||
*/
|
||
bottomPosition: GeoPoint;
|
||
/**
|
||
* 获取扇形位置,返回底点位置
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置扇形位置
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 设置扇形开合角度
|
||
* @param value 扇形开合角度
|
||
*/
|
||
/**
|
||
* 获取扇形开合角度
|
||
* @returns
|
||
*/
|
||
fov: number;
|
||
/**
|
||
* 设置速度
|
||
* @param value 速度 范围1-5
|
||
*/
|
||
/**
|
||
* 获取速度
|
||
* @returns
|
||
*/
|
||
speed: number;
|
||
/**
|
||
* 设置条纹颜色
|
||
* @param value 条纹颜色
|
||
*/
|
||
/**
|
||
* 获取条纹颜色
|
||
* @returns
|
||
*/
|
||
evenConeColor: string;
|
||
/**
|
||
* 设置条纹颜色
|
||
* @param value 条纹颜色
|
||
*/
|
||
/**
|
||
* 获取条纹颜色
|
||
* @returns
|
||
*/
|
||
oddConeColor: string;
|
||
/**
|
||
* 获取旋转角度
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置旋转角度
|
||
* @param value 旋转角度
|
||
*/
|
||
rotation: number;
|
||
/**
|
||
* @ignore
|
||
* 获取最大控制点数量(编辑中的PolylineCreator使用,为无限大时可以省略)
|
||
*/
|
||
getMaxCtrlPosNum(): number;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class SectorGraphicOpt extends GraphicItemOpt {
|
||
/**顶点位置 */
|
||
topPosition?: GeoPoint;
|
||
/**底点位置 */
|
||
bottomPosition?: GeoPoint;
|
||
/**
|
||
* 开合角度
|
||
*/
|
||
fov?: number;
|
||
/**
|
||
* 速度 范围1-5
|
||
*/
|
||
speed?: number;
|
||
/**
|
||
* 条纹颜色
|
||
*/
|
||
evenConeColor?: string;
|
||
/**
|
||
* 条纹颜色
|
||
*/
|
||
oddConeColor?: string;
|
||
rotation?: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 传感器
|
||
* @see <a href='../../../examples/gallery/editor.html#sensor'>传感器半径</a>
|
||
*/
|
||
class SensorGraphic extends GraphicPositionItem {
|
||
protected _opt: SensorGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 传感器
|
||
* ```
|
||
* 示例代码:
|
||
* let opt = new GV.SensorGraphicOpt();
|
||
* opt.color = 'rgba(255,255,255,0.1)';
|
||
* opt.position = new GV.GeoPoint(0, 0, 0);
|
||
* let sensor = new GV.SensorGraphic(opt);
|
||
* viewer.graphicLayer.add(sensor);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(option: SensorGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 设置传感器的半径
|
||
* @param 传感器半径
|
||
*/
|
||
/**
|
||
* 获取传感器的半径
|
||
* @returns
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 设置传感器颜色
|
||
* @param value 传感器颜色
|
||
*/
|
||
/**
|
||
* 获取传感器颜色
|
||
* @returns
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 设置线的颜色
|
||
*/
|
||
/**
|
||
* 获取线的颜色
|
||
* @returns
|
||
*/
|
||
lineColor: string;
|
||
/**
|
||
* 获取水平半角
|
||
* @returns
|
||
*/
|
||
readonly xHalfAngle: number;
|
||
/**
|
||
* 获取垂直半角
|
||
* @returns
|
||
*/
|
||
readonly yHalfAngle: number;
|
||
/**
|
||
* 设置扫描面颜色
|
||
* @param value 扫描面颜色
|
||
*/
|
||
/**
|
||
* 获取扫描面颜色
|
||
* @returns
|
||
*/
|
||
scanPlaneColor: any;
|
||
/**
|
||
* 获取扫描面显隐
|
||
* @returns
|
||
*/
|
||
readonly showScanPlane: boolean;
|
||
/**
|
||
* 设置扫描面速率
|
||
* @param value 扫描面速率
|
||
*/
|
||
/**
|
||
* 获取扫描面速率
|
||
* @returns
|
||
*/
|
||
scanPlaneRate: any;
|
||
readonly clampToGround: true;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class SensorGraphicOpt extends GraphicPositionItemOpt {
|
||
/**半径 */
|
||
radius?: number;
|
||
/**扫描速率 */
|
||
scanPlaneRate?: number;
|
||
/**是否显示扫描面 */
|
||
showScanPlane?: boolean;
|
||
/**水平半角 */
|
||
xHalfAngle?: number;
|
||
/**垂直半角 */
|
||
yHalfAngle?: number;
|
||
/**扫描面颜色 */
|
||
scanPlaneColor?: string;
|
||
/**颜色 */
|
||
color?: string;
|
||
/**线颜色 */
|
||
lineColor?: string;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 球几何体
|
||
* @see <a href='../../../examples/gallery/editor.html#geometry'>球</a>
|
||
*/
|
||
class SphereGraphic extends GraphicPositionItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: SphereGraphicOpt;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let sphereGraphic = new GV.SphereGraphic({...});
|
||
* ```
|
||
*/
|
||
constructor(option: SphereGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 高度参考
|
||
*/
|
||
heightReference: any;
|
||
/**
|
||
* 半径
|
||
*/
|
||
radius: any;
|
||
/**
|
||
* 是否填充
|
||
*/
|
||
fill: any;
|
||
/**
|
||
* 材质
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 是否绘制轮廓线
|
||
*/
|
||
outline: any;
|
||
/**
|
||
* 轮廓线颜色
|
||
*/
|
||
outlineColor: any;
|
||
/**
|
||
* 轮廓线宽度
|
||
*/
|
||
outlineWidth: any;
|
||
/**
|
||
* 每个轮廓环的样本数,确定曲率的粒度
|
||
*/
|
||
subdivisions: any;
|
||
/**
|
||
* 堆栈数
|
||
*/
|
||
stackPartitions: any;
|
||
/**
|
||
* 径向切片数
|
||
*/
|
||
slicePartitions: any;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class SphereGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 高度参照: 'clamp_to_ground' 完全贴合地面; 'none' 高度与地形无关; 'relative_to_ground' 真实高度=地形高度+高度值
|
||
*/
|
||
heightReference?: String;
|
||
/**
|
||
* 半径 示例[x, y, z]
|
||
*/
|
||
radius?: number;
|
||
/**
|
||
* 是否填充提供的材质
|
||
*/
|
||
fill?: Boolean;
|
||
/**
|
||
* 填充材质
|
||
*/
|
||
color?: String;
|
||
/**
|
||
* 是否轮廓
|
||
*/
|
||
outline?: Boolean;
|
||
/**
|
||
* 轮廓颜色
|
||
*/
|
||
outlineColor?: String;
|
||
/**
|
||
* 轮廓宽度
|
||
*/
|
||
outlineWidth?: number;
|
||
/**
|
||
* 每个轮廓环的样本数,确定曲率的粒度
|
||
*/
|
||
subdivisions?: number;
|
||
/**
|
||
* 堆栈数
|
||
*/
|
||
stackPartitions?: number;
|
||
/**
|
||
* 径向切片数
|
||
*/
|
||
slicePartitions?: number;
|
||
}
|
||
|
||
/**
|
||
* 各类扩散圆的基类
|
||
* 子类:SpreadCircleLineGraphic
|
||
* 子类:SpreadCircleClampGraphic
|
||
* 子类:SpreadCircleRampGraphic
|
||
* 子类:SpreadCircleRingGraphic
|
||
*/
|
||
class SpreadCircleGraphic extends GraphicPositionItem {
|
||
constructor(opt: any);
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 周期
|
||
*/
|
||
duration: number;
|
||
/**
|
||
* 大小
|
||
*/
|
||
radius: number;
|
||
}
|
||
/**
|
||
* 各类扩散圆共性参数类
|
||
*/
|
||
class SpreadCircleGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 时延 单位秒
|
||
*/
|
||
duration: number;
|
||
/**
|
||
* 半径 单位:米
|
||
* 说明:视图为2D视图时,此参数无效,只能通过缩放调整大小
|
||
*/
|
||
radius: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 动态条纹线
|
||
* @see <a href='../../../examples/gallery/editor.html#stripeCircle'>条纹扩散</a>
|
||
*/
|
||
class SpreadCircleLineGraphic extends SpreadCircleGraphic {
|
||
/**
|
||
* 参数类
|
||
*/
|
||
protected _opt: SpreadCircleLineGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* ```
|
||
* 示例代码:
|
||
* let circleLine = new GV.SpreadCircleLineGraphic({
|
||
* color: 'rgba(255.0, 255.0, 0.0, 1)',
|
||
* position: new GV.GeoPoint(120.9484503004, 24.0156814236),
|
||
* duration: 2,
|
||
* radius: 1200
|
||
* });
|
||
* viewer.graphicLayer.add(circleLine)
|
||
* ```
|
||
*/
|
||
constructor(opt: SpreadCircleGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 是否贴地
|
||
*/
|
||
readonly clampToGround: boolean;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 渲染类型(不同类型采样的片元着色器不一样)
|
||
*/
|
||
renderType: SpreadCircleLineEnum;
|
||
}
|
||
class SpreadCircleLineGraphicOpt extends SpreadCircleGraphicOpt {
|
||
/**
|
||
* 渲染类型(不同类型采样的片元着色器不一样)
|
||
*/
|
||
renderType: SpreadCircleLineEnum;
|
||
}
|
||
enum SpreadCircleLineEnum {
|
||
'Multiple' = 0,
|
||
'Single' = 1
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 贴地扩散圆
|
||
* @see <a href='../../../examples/gallery/editor.html#circleLine'>贴地扩散圆</a>
|
||
*/
|
||
class SpreadCircleClampGraphic extends SpreadCircleGraphic {
|
||
/**
|
||
* 图标标绘类型
|
||
*/
|
||
protected _type: string;
|
||
/**
|
||
* 参数类
|
||
*/
|
||
protected _opt: SpreadCircleGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* ```
|
||
* 示例代码:
|
||
* let circleLine = new GV.SpreadCircleClampGraphic({
|
||
* color: 'rgba(255.0, 255.0, 0.0, 1)',
|
||
* position: new GV.GeoPoint(120.9484503004, 24.0156814236),
|
||
* duration: 2,
|
||
* radius: 1200
|
||
* });
|
||
* viewer.graphicLayer.add(circleLine)
|
||
* ```
|
||
*/
|
||
constructor(opt: SpreadCircleGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 是否贴地
|
||
*/
|
||
readonly clampToGround: boolean;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 渐变扩散圆
|
||
* @see <a href='../../../examples/gallery/editor.html#rampCircle'>渐变扩散圆</a>
|
||
*/
|
||
class SpreadCircleRampGraphic extends SpreadCircleGraphic {
|
||
/**
|
||
* 图标标绘类型
|
||
*/
|
||
protected _type: string;
|
||
/**
|
||
* 参数类
|
||
*/
|
||
protected _opt: SpreadCircleRampGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* ```
|
||
* 示例代码:
|
||
* let circleLine = new GV.SpreadCircleRampGraphic({
|
||
* color: 'rgba(255.0, 255.0, 0.0, 1)',
|
||
* position: new GV.GeoPoint(120.9484503004, 24.0156814236),
|
||
* duration: 2,
|
||
* radius: 1200
|
||
* });
|
||
* viewer.graphicLayer.add(circleLine)
|
||
* ```
|
||
*/
|
||
constructor(opt: SpreadCircleRampGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 是否贴地
|
||
*/
|
||
readonly clampToGround: boolean;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 线颜色
|
||
*/
|
||
lineColor: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
}
|
||
class SpreadCircleRampGraphicOpt extends SpreadCircleGraphicOpt {
|
||
/**
|
||
* 线颜色
|
||
*/
|
||
lineColor: string;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 扩散圆
|
||
* @see <a href='../../../examples/gallery/editor.html#spreadCircle'>扩散圆</a>
|
||
*/
|
||
class SpreadCircleRingGraphic extends SpreadCircleGraphic {
|
||
/**
|
||
* 参数类
|
||
*/
|
||
protected _opt: SpreadCircleRingGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* ```
|
||
* 示例代码:
|
||
* let circleLine = new GV.SpreadCircleRingGraphic({
|
||
* color: 'rgba(252, 0, 32)',
|
||
* position: new GV.GeoPoint(120.9484503004, 24.0156814236),
|
||
* height: 10,
|
||
* radius: 220,
|
||
* count: 1,
|
||
* speed: 10.0
|
||
* });
|
||
* viewer.graphicLayer.add(circleLine)
|
||
* ```
|
||
*/
|
||
constructor(opt: SpreadCircleRingGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 高度
|
||
*/
|
||
height: number;
|
||
/**
|
||
* 圆环数量
|
||
*/
|
||
count: number;
|
||
/**
|
||
* 扩散速度
|
||
*/
|
||
speed: number;
|
||
/**
|
||
* 渲染类型(不同类型采样的片元着色器不一样)
|
||
*/
|
||
renderType: SpreadCircleRingEnum;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
}
|
||
class SpreadCircleRingGraphicOpt extends SpreadCircleGraphicOpt {
|
||
/**
|
||
* 渲染类型(不同类型采样的片元着色器不一样)
|
||
*/
|
||
renderType: SpreadCircleRingEnum;
|
||
/**
|
||
* 高度
|
||
*/
|
||
height: number;
|
||
/**
|
||
* 圆环数量
|
||
*/
|
||
count: number;
|
||
/**
|
||
* 扩散速度
|
||
*/
|
||
speed: number;
|
||
}
|
||
enum SpreadCircleRingEnum {
|
||
'Solid' = 0,
|
||
'Ramp' = 1,
|
||
'Strip' = 2
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 扩散波
|
||
* @see <a href='../../../examples/gallery/editor.html#circleScan'>扩散波</a>
|
||
*/
|
||
class SpreadGraphic extends GraphicPositionItem {
|
||
protected _opt: SpreadGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 扩散波
|
||
* ```
|
||
* 示例代码:
|
||
* let opt = new GV.SpreadGraphicOpt();
|
||
* opt.scanColor = 'rgba(255.0, 0.0, 0.0, 1)';
|
||
* opt.position = new GV.GeoPoint(80, 31.85, 0);
|
||
* opt.radius = 1500;
|
||
* circleScan = new GV.SpreadGraphic(opt);
|
||
* viewer.graphicLayer.add(circleScan);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(option: SpreadGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 是否贴地
|
||
*/
|
||
readonly clampToGround: boolean;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取扩散颜色
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置扩散颜色
|
||
* @param value 颜色
|
||
*/
|
||
spreadColor: string;
|
||
/**
|
||
* 获取扩散半径
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置扩散半径
|
||
* @param value 扫描半径
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 获取扩散速度
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置扩散速度
|
||
* @param value 范围 1-10
|
||
*/
|
||
speed: number;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class SpreadGraphicOpt extends GraphicPositionItemOpt {
|
||
/**扫描颜色 */
|
||
spreadColor?: string;
|
||
/**扩散半径 */
|
||
radius?: number;
|
||
/**扩散速度 范围 1-10 */
|
||
speed?: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 三角网
|
||
* @see <a href='../../../examples/gallery/editor.html#efficientTriangles'>空间网</a>
|
||
*/
|
||
class TriangleMeshGraphic extends GraphicItem {
|
||
protected _opt: TriangleMeshGraphicOpt;
|
||
protected _type: string;
|
||
/**
|
||
* 初始化示例
|
||
* @param option
|
||
* ```
|
||
* let urlArr = ['test10.json', 'test15.json'];
|
||
* let draw = [];
|
||
* for (let i = 0; i < urlArr.length; i++) {
|
||
* fetch('../data/radar/' + urlArr[i])
|
||
* .then(function (response) {
|
||
* return response.json();
|
||
* })
|
||
* .then(data => {
|
||
* let opt = new GV.TriangleMeshGraphicOpt();
|
||
* opt.color = '#00CED1';
|
||
* opt.dataSource = { points: data.points, indices: data.indices };
|
||
* let TMesh = new GV.TriangleMeshGraphic(opt);
|
||
* let obj = viewer.graphicLayer.add(TMesh)
|
||
* draw.push(obj);
|
||
* });
|
||
* }
|
||
* ```
|
||
*/
|
||
constructor(option: TriangleMeshGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 数据源:
|
||
* points 为[经度,纬度,高...]点集数组 或者 url
|
||
* 例:
|
||
* points = [102,33,5000,116,39,54411]
|
||
*/
|
||
dataSource: any;
|
||
/**
|
||
* 颜色
|
||
* 默认值:'#00CED1'
|
||
* ```
|
||
* 示例代码:
|
||
* Tmesh.color = '#fff'
|
||
* ```
|
||
*/
|
||
color: any;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class TriangleMeshGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 数据源:
|
||
* dataSource = {
|
||
* points: [102,33,5000,116,39,54411...],
|
||
* indices:[0,2,3,5...]
|
||
* }
|
||
* points 为[经度,纬度,高...]点集数组
|
||
* indices 为点的索引
|
||
*/
|
||
dataSource: {
|
||
points: Array<number>;
|
||
indices: Array<number>;
|
||
};
|
||
/**
|
||
* 颜色
|
||
* 默认值:'#00CED1'
|
||
*/
|
||
color?: string;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 截圆锥体
|
||
* @see <a href='../../../examples/gallery/editor.html#truncatedCone'>截圆锥体</a>
|
||
*/
|
||
class TruncatedConeGraphic extends GraphicPositionItem {
|
||
protected _opt: TruncatedConeGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 截圆锥体
|
||
* ```
|
||
* 示例代码:
|
||
* let opt = new GV.TruncatedConeGraphicOpt();
|
||
* opt.position = new GV.GeoPoint(80, 31.85, 0);
|
||
* opt.color = 'rgba(72,155,176,0.8)';
|
||
* truncatedCone = new GV.TruncatedConeGraphic(opt);
|
||
* viewer.graphicLayer.add(truncatedCone);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(option: TruncatedConeGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 是否贴地
|
||
*/
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 底部内圆半径(即旋转动态圆)
|
||
*/
|
||
innerRadius: number;
|
||
/**
|
||
* 底部外圆半径(即静止双环圆)
|
||
*/
|
||
outerRadius: number;
|
||
/**
|
||
* 内锥顶部半径
|
||
*/
|
||
innerTopRadius: number;
|
||
/**
|
||
* 内锥底部半径
|
||
*/
|
||
innerBottomRadius: number;
|
||
/**
|
||
* 外锥高度
|
||
*/
|
||
innerHeight: number;
|
||
/**
|
||
* 外锥顶部半径
|
||
*/
|
||
outerTopRadius: number;
|
||
/**
|
||
* 外锥底部半径
|
||
*/
|
||
outerBottomRadius: number;
|
||
/**
|
||
* 外锥高度
|
||
*/
|
||
outerHeight: number;
|
||
}
|
||
class TruncatedConeGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 底部内圆半径(即旋转动态圆)
|
||
*/
|
||
innerRadius: number;
|
||
/**
|
||
* 底部外圆半径(即静止双环圆)
|
||
*/
|
||
outerRadius: number;
|
||
/**
|
||
* 内锥顶部半径
|
||
*/
|
||
innerTopRadius: number;
|
||
/**
|
||
* 内锥底部半径
|
||
*/
|
||
innerBottomRadius: number;
|
||
/**
|
||
* 内锥高度
|
||
*/
|
||
innerHeight: number;
|
||
/**
|
||
* 外锥顶部半径
|
||
*/
|
||
outerTopRadius: number;
|
||
/**
|
||
* 外锥底部半径
|
||
*/
|
||
outerBottomRadius: number;
|
||
/**
|
||
* 外锥高度
|
||
*/
|
||
outerHeight: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 截圆锥体粒子特效标绘
|
||
* @see <a href='../../../examples/gallery/editor.html#truncatedConeParticle'>截圆锥粒子标绘</a>
|
||
*/
|
||
class TruncatedConeParticleGraphic extends GraphicPositionItem {
|
||
protected _opt: TruncatedConeParticleGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 截圆锥体粒子特效标绘
|
||
* ```
|
||
* 示例代码:
|
||
* let opt = new GV.TruncatedConeParticleGraphicOpt();
|
||
* opt.position = new GV.GeoPoint(80, 31.85, 0);
|
||
* opt.color = 'rgba(72,155,176,0.8)';
|
||
*
|
||
* truncatedCone = new GV.TruncatedConeParticleGraphic(opt);
|
||
* viewer.graphicLayer.add(truncatedCone);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(option: TruncatedConeParticleGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 是否贴地
|
||
*/
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 基底圆半径数组(按照从上到下的顺序排列)
|
||
*/
|
||
radiusArray: Array<number>;
|
||
/**
|
||
* 基底圆之间的高度差
|
||
*/
|
||
deltaHeight: number;
|
||
/**
|
||
* 锥顶圆半径
|
||
*/
|
||
topRadius: number;
|
||
/**
|
||
* 锥底圆半径
|
||
*/
|
||
bottomRadius: number;
|
||
/**
|
||
* 锥体高度
|
||
*/
|
||
height: number;
|
||
}
|
||
class TruncatedConeParticleGraphicOpt extends GraphicPositionItemOpt {
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 基底圆半径数组(按照从上到下的顺序排列)
|
||
*/
|
||
radiusArray: Array<number>;
|
||
/**
|
||
* 基底圆之间的高度差
|
||
*/
|
||
deltaHeight: number;
|
||
/**
|
||
* 锥顶圆半径
|
||
*/
|
||
topRadius: number;
|
||
/**
|
||
* 锥底圆半径
|
||
*/
|
||
bottomRadius: number;
|
||
/**
|
||
* 锥体高度
|
||
*/
|
||
height: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 管道线几何体
|
||
* @see <a href='../../../examples/gallery/editor.html#geometry'>管道</a>
|
||
*/
|
||
class VolumePolylineGraphic extends GraphicItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: VolumePolylineGraphicOpt;
|
||
/**
|
||
* 管道标绘类型
|
||
*/
|
||
protected _type: string;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let volumePolylineGraphic = new GV.VolumePolylineGraphic({...});
|
||
* ```
|
||
*/
|
||
constructor(option: VolumePolylineGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 位置
|
||
*/
|
||
positions: any;
|
||
/**
|
||
* 形状
|
||
*/
|
||
shape: any;
|
||
/**
|
||
* 拐角类型
|
||
*/
|
||
cornerType: any;
|
||
/**
|
||
* 填充
|
||
*/
|
||
fill: any;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 轮廓
|
||
*/
|
||
outline: any;
|
||
outlineColor: any;
|
||
outlineWidth: any;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class VolumePolylineGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 位置 lon为经度, lat 为纬度, alt为高度
|
||
* ```
|
||
* 示例代码
|
||
* GV.GeoPoint.unpackArray([
|
||
* [-80.0, 34.0, 0.0],
|
||
* [-80.0, 40.0, 100000.0],
|
||
* [-84.0, 40.0, 0.0]
|
||
* ])
|
||
* ```
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 定义要挤出的形状的位置数组
|
||
* ```
|
||
* 示例代码
|
||
* GV.GeoPoint.unpackArray([
|
||
* [-50000, -50000],
|
||
* [50000, -50000],
|
||
* [50000, 50000],
|
||
* [-50000, 50000]
|
||
* ])
|
||
* ```
|
||
*/
|
||
shape: Array<GeoPoint>;
|
||
/**
|
||
* 指定角落样式 : 'beveled' 拐角被修剪; 'mitered' 拐角点是相邻边的交点; 'rounded' 角落边缘光滑
|
||
*/
|
||
cornerType?: String;
|
||
/**
|
||
* 指定是否进行填充 : true or false
|
||
*/
|
||
fill?: Boolean;
|
||
/**
|
||
* 颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
color?: String;
|
||
/**
|
||
* 指定是否显示轮廓 : true or false
|
||
*/
|
||
outline?: Boolean;
|
||
/**
|
||
* 轮廓颜色: 参考颜色示例'#ff0000'或'rgba(255,0,0,1)'
|
||
*/
|
||
outlineColor?: String;
|
||
/**
|
||
* 指定轮廓线宽度
|
||
*/
|
||
outlineWidth?: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 墙几何体
|
||
* @see <a href='../../../examples/gallery/editor.html#geometry'>墙</a>
|
||
*/
|
||
class WallGraphic extends GraphicItem {
|
||
/**
|
||
* 标绘参数
|
||
*/
|
||
protected _opt: WallGraphicOpt;
|
||
/**
|
||
* 墙标绘类型
|
||
*/
|
||
protected _type: string;
|
||
/**
|
||
* 构造函数
|
||
* @param option 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let wallGraphic = new GV.WallGraphic({...});
|
||
* ```
|
||
*/
|
||
constructor(option: WallGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 位置
|
||
*/
|
||
positions: any;
|
||
/**
|
||
* 高度数组
|
||
*/
|
||
maximumHeights: any;
|
||
/**
|
||
* 底部数组
|
||
*/
|
||
minimumHeights: any;
|
||
/**
|
||
* 填充
|
||
*/
|
||
fill: any;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: any;
|
||
/**
|
||
* 是否显示轮廓
|
||
*/
|
||
outline: any;
|
||
outlineColor: any;
|
||
outlineWidth: any;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class WallGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 位置 lon为经度, lat 为纬度, alt为高度
|
||
* ```
|
||
* 示例代码
|
||
* GV.GeoPoint.unpackArray([
|
||
* [-115.0, 34.0],
|
||
* [-112.5, 34.0],
|
||
* [-110.0, 34.0],
|
||
* [-107.5, 34.0],
|
||
* [-105.0, 34.0],
|
||
* [-102.5, 34.0],
|
||
* [-100.0, 34.0],
|
||
* [-97.5, 34.0],
|
||
* [-95.0, 34.0],
|
||
* [-92.5, 34.0],
|
||
* [-90.0, 34.0]
|
||
* ])
|
||
* ```
|
||
*/
|
||
positions: Array<GeoPoint>;
|
||
/**
|
||
* 指定用于墙顶的高度数组,而不是每个位置的高度.[100000, 200000, 100000, 200000, 100000, 200000 ...]
|
||
*/
|
||
maximumHeights: Array<number>;
|
||
/**
|
||
* 指定要用于墙的底部而不是地球表面的高度数组.[0, 100000, 0, 100000, 0, 100000, 0,...]
|
||
*/
|
||
minimumHeights: Array<number>;
|
||
/**
|
||
* 指定是否进行填充 : true or false
|
||
*/
|
||
fill?: Boolean;
|
||
/**
|
||
* 颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
color?: String;
|
||
/**
|
||
* 指定是否显示轮廓 : true or false
|
||
*/
|
||
outline?: Boolean;
|
||
/**
|
||
* 轮廓颜色: 参考颜色示例'#ff0000'或'rgba(1,0,0,1)'
|
||
*/
|
||
outlineColor?: String;
|
||
/**
|
||
* 指定轮廓线宽度
|
||
*/
|
||
outlineWidth?: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 水面模拟
|
||
* @see <a href='../../../examples/gallery/editor.html#waterPrimitive' target="_blank">水面模拟</a>
|
||
*/
|
||
class WaterFaceGraphic extends GraphicItem {
|
||
protected _opt: WaterFaceGraphicOpt;
|
||
protected _type: string;
|
||
/**
|
||
* 构造函数
|
||
* @param {WaterFaceGraphicOpt} options 参数对象
|
||
* ```
|
||
* //示例
|
||
* const polygon=new Cesium.PolygonGeometry(
|
||
* Cesium.Cartesian3.fromDegreesArray([100,30,110,30,110,40,100,40])
|
||
* )
|
||
* const waterOpt=new GV.WaterFaceGraphicOpt();
|
||
* waterOpt.waterPolygon=polygon;
|
||
* waterOpt.waterColor=Cesium.Color.BLUE;
|
||
* const water = new GV.WaterFaceGraphic(opt)
|
||
viewer.graphicLayer.add(water);
|
||
* ```
|
||
*/
|
||
constructor(options: WaterFaceGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 所有item的基类方法,外部无需调用
|
||
* 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 水面颜色
|
||
* @example
|
||
* water.waterColor=Cesium.Color.BLUE;
|
||
*/
|
||
waterColor: Cesium.Color;
|
||
/**
|
||
* 波纹大小
|
||
*/
|
||
waveWidth: Number;
|
||
/**
|
||
* 流动方向,单位:度
|
||
*/
|
||
flowDirection: Number;
|
||
/**
|
||
* 流动速度
|
||
*/
|
||
flowSpeed: Number;
|
||
readonly normalTexture: String;
|
||
/**
|
||
* 定义了水面范围
|
||
* @readonly
|
||
*/
|
||
readonly waterPolygon: Cesium.PolygonGeometry;
|
||
}
|
||
class WaterFaceGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 水面颜色
|
||
*/
|
||
waterColor: Cesium.Color;
|
||
/**
|
||
* 波纹大小
|
||
*/
|
||
waveWidth: Number;
|
||
/**
|
||
* 水流方向,单位:度
|
||
*/
|
||
flowDirection: Number;
|
||
/**
|
||
* 水流速度
|
||
*/
|
||
flowSpeed: Number;
|
||
/**
|
||
* 法线贴图
|
||
*/
|
||
normalTexture: String;
|
||
/**
|
||
* 水面范围
|
||
*/
|
||
waterPolygon: Cesium.PolygonGeometry;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 水面效果
|
||
* @see <a href='../../../examples/gallery/editor.html#water'>水面效果</a>
|
||
*/
|
||
class WaterGraphic extends GraphicItem {
|
||
protected _opt: WaterGraphicOpt;
|
||
protected _type: string;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 水面效果
|
||
* ```
|
||
* 示例代码:
|
||
* var position = [0, 0,0, 40.0,40, 40.0,40, 0];
|
||
* var holes = [[5, 5, 6, 5, 6, 6, 5, 6],[15, 15, 15, 25, 25, 25, 25, 15]];
|
||
* let waterOpt = new GV.WaterGraphicOpt();
|
||
* waterOpt.pointsList = position;
|
||
* waterOpt.holes = holes;
|
||
* let water = new GV.WaterGraphic(waterOpt);
|
||
* viewer.graphicLayer.add(water);
|
||
* ```
|
||
*/
|
||
constructor(option: WaterGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取流动频率
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置流动频率
|
||
* @param value 流动频率
|
||
*/
|
||
frequency: number;
|
||
/**
|
||
* 获取水面底色
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置水面底色
|
||
* @param val 水面底色 示例:'#177BD9'或'rgba(100, 0.3, 0.6,1)'
|
||
*/
|
||
baseWaterColor: string;
|
||
/**
|
||
* 获取流动速度
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置流动速度
|
||
* @param val 流动速度
|
||
*/
|
||
animationSpeed: number;
|
||
/**
|
||
* 获取振幅
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置振幅
|
||
* @param val 振幅
|
||
*/
|
||
amplitude: number;
|
||
/**
|
||
* 获取高光强度
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置高光强度
|
||
* @param val 高光强度
|
||
*/
|
||
specularIntensity: number;
|
||
/**
|
||
* 获取挖洞数据
|
||
* @returns
|
||
*/
|
||
readonly holes: number[][];
|
||
/**
|
||
* 获取顶点数据
|
||
* @returns
|
||
*/
|
||
readonly pointsList: number[];
|
||
readonly mode: string;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class WaterGraphicOpt extends GraphicItemOpt {
|
||
/**
|
||
* 水面顶点数据
|
||
*/
|
||
pointsList: Array<number>;
|
||
/**
|
||
* 挖洞数据
|
||
*/
|
||
holes?: Array<Array<number>>;
|
||
/**
|
||
* 流动频率
|
||
*/
|
||
frequency?: number;
|
||
/**
|
||
* 流动速度
|
||
*/
|
||
animationSpeed?: number;
|
||
/**
|
||
* 流动振幅
|
||
*/
|
||
amplitude?: number;
|
||
/**
|
||
* 高光强度
|
||
*/
|
||
specularIntensity?: number;
|
||
/**
|
||
* 水面底色
|
||
*/
|
||
baseWaterColor?: string;
|
||
/**
|
||
* 水面底色
|
||
*/
|
||
mode?: string;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 雨、雪模拟
|
||
* @see <a href='../../../examples/gallery/editor.html#weatherPack'>雨、雪模拟</a>
|
||
*/
|
||
class WeatherGraphic extends GraphicItem {
|
||
protected _opt: WeatherGraphicOpt;
|
||
/**
|
||
* 初始化示例
|
||
* @param option 雨、雪模拟
|
||
* ```
|
||
* 示例代码:
|
||
* let weatherGraphicOpt = new GV.WeatherGraphicOpt();
|
||
* weatherGraphicOpt.position = new GV.GeoPoint(110.20, 34.55, 3000);
|
||
* weatherGraphicOpt.range = 20000;
|
||
* weatherGraphicOpt.weatherType = 'rain';
|
||
* var weatherGraphic = new GV.WeatherGraphic(weatherGraphicOpt);
|
||
* viewer.graphicLayer.add(weatherGraphic);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(option: WeatherGraphicOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
init(father: GraphicGroup): void;
|
||
/**
|
||
* 获取天气类型
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置天气类型
|
||
* @param value 天气类型
|
||
*/
|
||
weatherType: string;
|
||
/**
|
||
* 获取位置
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置位置
|
||
* @param value 位置
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 获取范围
|
||
* @returns
|
||
*/
|
||
/**
|
||
* 设置范围
|
||
* @param value 范围
|
||
*/
|
||
range: number;
|
||
}
|
||
/**
|
||
* 数据约束及默认值
|
||
*/
|
||
class WeatherGraphicOpt extends GraphicItemOpt {
|
||
/**天气类型 rain 或 snow*/
|
||
weatherType: string;
|
||
/**位置 */
|
||
position: GeoPoint;
|
||
/**影响范围 */
|
||
range: number;
|
||
}
|
||
|
||
/// <reference path="../../../../src/Types/cesium.d.ts" />
|
||
/**
|
||
* @类别 无需创建,初始化球时自动创建并且与球对应的类</br>
|
||
* @描述 几何绘制对象总入口,提供了绘制添加,查询,选取等能力
|
||
*/
|
||
class GraphicLayer extends Event {
|
||
_viewer: Cesium.Viewer;
|
||
private _dataRoot;
|
||
private _ignoreRoot;
|
||
private _renderRoot;
|
||
private _creatorManager;
|
||
private _editorManager;
|
||
private _pipelineManager;
|
||
constructor(viewer: Cesium.Viewer);
|
||
private _initCreatorManager;
|
||
/**
|
||
* @description: 标绘创建时与鼠标的偏移量
|
||
* @param {number} x 沿x轴偏移的像素值或百分比,如果是数字则按像素处理
|
||
* @param {number} y 沿y轴偏移的像素值或百分比,如果是数字则按像素处理
|
||
* @return {*}
|
||
*/
|
||
setViewOffset(x: number | string, y: number | string): void;
|
||
/**
|
||
* 内部渲染对象使用
|
||
*/
|
||
getRenderRoot(): {
|
||
entityRoot: Cesium.EntityCollection;
|
||
primitiveRoot: Cesium.PrimitiveCollection;
|
||
postProcessStages: any;
|
||
billboardCollection: Cesium.BillboardCollection;
|
||
labelCollection: Cesium.LabelCollection;
|
||
htmlItemCollection: HtmlItemCollection;
|
||
};
|
||
editOpen(): void;
|
||
editClose(): void;
|
||
readonly isEditting: boolean;
|
||
/**
|
||
* 开启创建
|
||
* @param itemOpt 创建对象参数
|
||
* @param group 要加入的组节点
|
||
*/
|
||
create(itemOpt: any, group?: GraphicGroup, finishCallback?: any): GraphicItem;
|
||
/**
|
||
* 设置创建器/编辑器是否显示文本标签
|
||
* @param vis 是否显示
|
||
*/
|
||
setEditorLabelVisible(vis: boolean): void;
|
||
/**
|
||
* 设置创建器/编辑器文本标签是否将经纬度格式化为度分秒格式
|
||
* @param b 是否格式化(true:格式化度分秒)
|
||
*/
|
||
setEditorLabelFormat(b: boolean): void;
|
||
/**
|
||
* 设置编辑管理器
|
||
*/
|
||
getEditorManager(): EditorManager;
|
||
/**
|
||
* 设置编辑对象
|
||
*/
|
||
setEditItem(item: GraphicItem): void;
|
||
/**
|
||
* 获取编辑对象
|
||
*/
|
||
getEditItem(): GraphicItem;
|
||
/**
|
||
* 设置编辑器按钮所在的dom
|
||
*/
|
||
setEditorElement(element: Element): void;
|
||
/**
|
||
* 监听编辑对象实时变化
|
||
*/
|
||
onEditItemRealTimeChange(fun: any): void;
|
||
/**
|
||
* 取消监听编辑对象实时变化
|
||
*/
|
||
offEditItemRealTimeChange(): void;
|
||
/**
|
||
* 监听编辑对象变化
|
||
*/
|
||
onEditItemChange(fun: any): Function;
|
||
/**
|
||
* 取消监听编辑对象变化
|
||
*/
|
||
offEditItemChange(fun: any): void;
|
||
/**
|
||
* 监听编辑器点击事件
|
||
*/
|
||
onEditorClick(fun: any): void;
|
||
/**
|
||
* 取消编辑器点击事件
|
||
*/
|
||
offEditorClick(): void;
|
||
/**
|
||
* 获取数据根节点
|
||
*/
|
||
getRoot(): GraphicGroup;
|
||
/**
|
||
* 获取忽略根节点(该节点不会随整个场景反序列化)
|
||
*/
|
||
getIgnoreRoot(): GraphicGroup;
|
||
/**
|
||
* 获取管道管理单例类
|
||
*/
|
||
getPipelineManager(): PipelineManager;
|
||
/**
|
||
* 添加一个新节点
|
||
* @param node 绘制数据对象或组对象
|
||
* @returns
|
||
* ```
|
||
* 示例代码
|
||
* //添加绘制数据对象
|
||
* let obj = new GV.CylinderDynamicGraphic({
|
||
* topPosition: new GV.GeoPoint(0,0,200000),
|
||
* bottomPosition: new GV.GeoPoint(0,0,0)
|
||
* })
|
||
* viewer.graphicLayer.add(obj);
|
||
*
|
||
* //添加组对象并在组对象中添加标绘
|
||
* let group = new GV.GraphicGroup();
|
||
* viewer.graphicLayer.add(group);
|
||
*
|
||
* let polyline = new GV.PolylineGraphic({
|
||
* positions:[new GV.GeoPoint(0,0,200000), new GV.GeoPoint(100,0,200000)],
|
||
* lineStyle: new GV.ColorStyle({color: '#ffff00'}),
|
||
* width: 3,
|
||
* });
|
||
* group.add(polyline);
|
||
* ```
|
||
*/
|
||
add(node: GraphicGroup | GraphicItem): GraphicGroup | GraphicItem;
|
||
addByJson(json: any): any;
|
||
/**
|
||
* 导出json数据
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 导入json数据
|
||
*/
|
||
fromJson(json: object): GraphicGroup;
|
||
/**
|
||
* 移除一个节点
|
||
* @param node 绘制数据对象或组对象
|
||
* @return
|
||
* ```
|
||
* 示例代码
|
||
* viewer.graphicLayer.remove(node)
|
||
* ```
|
||
*/
|
||
remove(node: GraphicGroup | GraphicItem): GraphicGroup | GraphicItem;
|
||
/**
|
||
* 清除所对象
|
||
*/
|
||
clear(): void;
|
||
/**
|
||
* 根据ID获取对象
|
||
* @param id
|
||
* @return
|
||
*/
|
||
getById(id: string): any;
|
||
/**
|
||
* 根据ID获取对象
|
||
* @param id
|
||
* @return
|
||
*/
|
||
getIgnoreById(id: string): any;
|
||
/**
|
||
* 根据名称获取对象
|
||
*
|
||
* @param name
|
||
* @return
|
||
*/
|
||
getNodeByName(name: string): (GraphicItem | GraphicGroup)[];
|
||
private _pickObjGetId;
|
||
/**
|
||
* 拾取对象 返回plot对象
|
||
* @param {Function} callback 回调函数
|
||
*/
|
||
pickRect(x: number, y: number, width: number, height: number): Array<GraphicItem>;
|
||
/**
|
||
* 根据屏幕坐标获取绘制对象数组
|
||
* @param x
|
||
* @param y
|
||
*/
|
||
pickByCoordinate2(x: number, y: number): Array<GraphicItem>;
|
||
/**
|
||
* 根据屏幕坐标获取最上层绘制对象
|
||
* @param x 屏幕坐标x
|
||
* @param y 屏幕坐标y
|
||
* @return
|
||
*/
|
||
pickByCoordinate(x: number, y: number): GraphicItem;
|
||
/**
|
||
* 根据屏幕坐标获取最上层绘制对象
|
||
* @param x 屏幕坐标x
|
||
* @param y 屏幕坐标y
|
||
* @return
|
||
*/
|
||
pickIgnoreByCoordinate(x: number, y: number): GraphicItem;
|
||
/**
|
||
* 计算多个求交结果
|
||
*/
|
||
/**
|
||
*
|
||
* @param x
|
||
* @param y
|
||
* @param type ''|Ignore对数据根节点求交
|
||
*/
|
||
private _pickByCoordinate2;
|
||
private _pickByCoordinate;
|
||
private _pickSpecialGraphic;
|
||
/**
|
||
* 获取多边形内的标绘对象(目前仅支持单一坐标标绘)
|
||
* @param positions 多边形位置点
|
||
* @return 标会对象数组
|
||
* @see <a href='../../../examples/gallery/editor.html#getItemsInPolygon'>获取区域内标绘对象</a>
|
||
*/
|
||
getItemsInPolygon(positions: Array<GeoPoint>): Array<GraphicItem>;
|
||
}
|
||
|
||
/// <reference path="../../../../../src/Types/cesium.d.ts" />
|
||
class AttractPointRender extends RenderPositionObject {
|
||
private _appearance1;
|
||
private _appearance2;
|
||
private _appearance3;
|
||
private _appearance4;
|
||
private _primitive1;
|
||
private _primitive2;
|
||
private _primitive3;
|
||
private _primitive4;
|
||
private _buildGeometry;
|
||
private partTwoScale;
|
||
private offset;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 更新回调
|
||
*/
|
||
protected dataUpdate(): void;
|
||
readonly renderType: RenderTypeEnum;
|
||
private createPartOneImage;
|
||
private getPartOneMs;
|
||
private createPartTwoImage;
|
||
private getPartTwoMs;
|
||
private getPartThreeMs;
|
||
private getPartFourMs;
|
||
getModelMatrix(): Cesium.Matrix4;
|
||
protected getOffsetModelMatrix(): Cesium.Matrix4;
|
||
private createAppearance;
|
||
private createPrimitive;
|
||
update(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class BindedCylinder extends RenderPositionObject {
|
||
private _appearance;
|
||
private _circleData;
|
||
private _matrix;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
readonly renderType: RenderTypeEnum;
|
||
update(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**计算单位圆周坐标值 */
|
||
private calculateCircleData;
|
||
/**
|
||
* 创建Appearance
|
||
*/
|
||
private createAppearance;
|
||
/**
|
||
* 创建几何体
|
||
* @param height
|
||
* @param angle
|
||
*/
|
||
private createGeometry;
|
||
/**
|
||
* 创建vao需要数据
|
||
* @param topPosArr
|
||
* @param bottomPosArr
|
||
* @param slice
|
||
*/
|
||
private createGeometeryAttribute;
|
||
/**
|
||
* 创建Primitive
|
||
* @param postionsTemp
|
||
* @param stsTemp
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 更新旋转矩阵
|
||
*/
|
||
private createModelMatrix;
|
||
}
|
||
|
||
class BlastRender extends RenderPositionObject {
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
computeModelMatrix(position: any): any;
|
||
computeEmitterModelMatrix(): Cesium.Matrix4;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 标牌
|
||
*/
|
||
class Bubble extends RenderObject {
|
||
_container: HTMLDivElement;
|
||
_rootNode: HTMLDivElement;
|
||
_parentNode: HTMLDivElement;
|
||
_panelNode: HTMLDivElement;
|
||
_lineNode: HTMLDivElement;
|
||
_renderVisible: boolean;
|
||
_anchorOffset: {
|
||
x: number;
|
||
y: number;
|
||
};
|
||
_panelOffset: {
|
||
x: number;
|
||
y: number;
|
||
};
|
||
_diagonalPanelOffset: {
|
||
x: number;
|
||
y: number;
|
||
};
|
||
private _isMouseDown;
|
||
private _downX;
|
||
private _downY;
|
||
private _bottomX;
|
||
private _bottomY;
|
||
private _bubbleEvent;
|
||
private _fnDown;
|
||
private _fnUp;
|
||
private _fnMove;
|
||
private _fnStart;
|
||
private _fnTMove;
|
||
private _fnEnd;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 清除
|
||
*/
|
||
clear(): void;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
/**
|
||
* 判断坐标点是否可见(支持二三维)
|
||
* @param point 坐标点
|
||
* @param viewer 球
|
||
*/
|
||
pointIsVisible(point: GeoPoint, viewer: Cesium.Viewer): boolean;
|
||
/**
|
||
* 渲染前回调函数
|
||
*/
|
||
private _preRender;
|
||
/**
|
||
* 根据锚点屏幕坐标绘制
|
||
* @param offsetX
|
||
* @param offsetY
|
||
*/
|
||
private _updateDiv;
|
||
private _getDiagonalPanelOffset;
|
||
/**
|
||
* 更新线
|
||
* @param object
|
||
* @param bindNode
|
||
* @returns 点在第几象限
|
||
*/
|
||
private _updateLinePosition;
|
||
/**
|
||
* 设置moveDiv的位置 防止位置超出范围
|
||
* @param x 相对于父容器的x坐标
|
||
* @param y 相对于父容器的y坐标
|
||
*/
|
||
_updatePanelPosition(x: any, y: any): void;
|
||
/**
|
||
* 控制显隐
|
||
* @param visible
|
||
*/
|
||
private _showDiv;
|
||
/**
|
||
* 初始化dom元素
|
||
*/
|
||
private _initDom;
|
||
/**
|
||
* 创建DOM方法
|
||
*/
|
||
private _createDom;
|
||
/**
|
||
*
|
||
* @param val
|
||
*/
|
||
private _getDivOffsetOfBody;
|
||
/**
|
||
* 获取DOM
|
||
*/
|
||
private _getDom;
|
||
private _mouseDown;
|
||
private _mouseMove;
|
||
private _mouseUp;
|
||
private _touchStart;
|
||
private _touchMove;
|
||
private _touchEnd;
|
||
/**
|
||
* 移除DOM元素
|
||
* @param _element
|
||
*/
|
||
private _removeElement;
|
||
/**
|
||
* 事件绑定
|
||
*/
|
||
private _bindEvent;
|
||
/**
|
||
* 事件移除
|
||
*/
|
||
private _removeEvent;
|
||
}
|
||
|
||
/**
|
||
* 图标渲染对象
|
||
*/
|
||
class CesiumBillboard extends RenderPositionObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
private _dealResProps;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 圆柱圆锥渲染对象
|
||
*/
|
||
class CesiumCylinder extends RenderPositionObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
private _getOrientation;
|
||
private _dealResProps;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 渲染对象
|
||
*/
|
||
class CesiumEllipse extends RenderPositionObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
private _dealResProps;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 椭球体渲染对象
|
||
*/
|
||
class CesiumEllipsoid extends RenderPositionObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
private _dealResProps;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 标签渲染对象
|
||
*/
|
||
class CesiumLabel extends RenderPositionObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
private _dealResProps;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 图标渲染对象
|
||
*/
|
||
class CesiumLabelBillboard extends RenderObject {
|
||
readonly renderType: RenderTypeEnum;
|
||
private _root;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 创建画布并初始化画布内容
|
||
*/
|
||
private createCanvas;
|
||
/**
|
||
* 更新画布
|
||
* @param move 文本矩形框中心的屏幕坐标
|
||
*/
|
||
updateCanvas(move: any): HTMLCanvasElement;
|
||
/**
|
||
* 文本适配
|
||
* @param ctx
|
||
* @param content
|
||
* @param drawX
|
||
* @param drawY
|
||
* @param textOpt
|
||
*/
|
||
textPrewrap(ctx: any, content: any, drawX: any, drawY: any, textOpt: any): void;
|
||
/**
|
||
* 清除
|
||
*/
|
||
clear(): void;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 图标渲染对象
|
||
*/
|
||
class CesiumLabelRect extends RenderPositionObject {
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
private updateCanvas;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 标签渲染对象
|
||
*/
|
||
class CesiumModel extends RenderPositionObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
private getOrientation;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
private _dealResProps;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 标签渲染对象
|
||
*/
|
||
class CesiumOblique extends RenderObject {
|
||
/**
|
||
* @ignore
|
||
*/
|
||
private _originTransform;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
private updateOffset;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
private updateRotate;
|
||
}
|
||
|
||
class CesiumPoint extends RenderPositionObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
update(): void;
|
||
private _dealResProps;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
class CesiumPolygon extends RenderObject {
|
||
_positions: any[];
|
||
private _originProps;
|
||
private _resProps;
|
||
private _synchronizer;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
update(): void;
|
||
private _dealResProps;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
getRenderPositions(): any[];
|
||
getRenderHoles(): any[];
|
||
}
|
||
|
||
class CesiumPolyline extends RenderObject {
|
||
_positions: any[];
|
||
private _originProps;
|
||
private _resProps;
|
||
private _cameraChange;
|
||
private _length;
|
||
readonly renderType: RenderTypeEnum;
|
||
static _onSceneModeChange: any;
|
||
static _parabolaLines: any[];
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
private addCameraListener;
|
||
private removeCameraListener;
|
||
/**
|
||
* 计算并且更新纹理重复次数
|
||
*/
|
||
private updateTextureTimes;
|
||
private calculateLength;
|
||
update(): void;
|
||
getRenderPositions(): any[];
|
||
private _dealResProps;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
* 气泡标签渲染对象
|
||
*/
|
||
class CesiumPopover extends RenderPositionObject {
|
||
readonly renderType: RenderTypeEnum;
|
||
private billboardCanvas;
|
||
private flag;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
updateCanvas(): void;
|
||
private updateCanvasCallBack;
|
||
/**
|
||
* 创建html标签
|
||
* @param shapeType 形状
|
||
* @param text 文字
|
||
*/
|
||
private createHTMLElement;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 图标渲染对象
|
||
*/
|
||
class CesiumRectangle extends RenderObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
*
|
||
*/
|
||
private getCoordinates;
|
||
calcCoordinates(data: any): Cesium.Rectangle;
|
||
private _dealResProps;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 图标渲染对象
|
||
*/
|
||
class CesiumSphere extends RenderPositionObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
private _dealResProps;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 图标渲染对象
|
||
*/
|
||
class CesiumVolumePolyline extends RenderObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
readonly renderType: RenderTypeEnum;
|
||
starPositions(arms: any, rOuter: any, rInner: any): any[];
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
getShape(value: any): any[];
|
||
private getCornerType;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
private _dealResProps;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 图标渲染对象
|
||
*/
|
||
class CesiumWall extends RenderObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
private _dealResProps;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
class CircularRender extends RenderPositionObject {
|
||
private _appearance;
|
||
readonly renderType: RenderTypeEnum;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
update(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**
|
||
* 设置材质
|
||
*/
|
||
private createMaterial;
|
||
/**
|
||
* 绘制图形
|
||
*/
|
||
private createPrimitive;
|
||
}
|
||
|
||
/**
|
||
* 文字标签渲染对象
|
||
*/
|
||
class CustomLabelRender extends RenderPositionObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
private pinBuilder;
|
||
private image;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 更新全部属性
|
||
*/
|
||
update(): void;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
private _dealResProps;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class CylinderSensor extends RenderObject {
|
||
private _circleData;
|
||
private _currentOffset;
|
||
private _distance;
|
||
private _geometry;
|
||
private _appearance;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
listenerFun: () => void;
|
||
private calculateRepeat;
|
||
update(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**计算单位圆周坐标值 */
|
||
private calculateCircleData;
|
||
/**
|
||
* 获得世界坐标系下位置
|
||
*/
|
||
private createVertex;
|
||
/**
|
||
* 创建attribute
|
||
* @param topPosArr 顶面顶点数据
|
||
* @param bottomPosArr 底面顶点数据
|
||
*/
|
||
private createGeometeryAttribute;
|
||
/**
|
||
* 创建网格体
|
||
* @param postionsTemp 顶点数据
|
||
* @param stsTemp 纹理数据
|
||
*/
|
||
private createGrometry;
|
||
private getTopPosition;
|
||
private getBottomPosition;
|
||
/**
|
||
* 创建材质
|
||
*/
|
||
private createMaterial;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 创建变换矩阵
|
||
*/
|
||
private createGeometryMatrix;
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
* 仪表盘效果
|
||
*/
|
||
class DashBoardEffect extends RenderPositionObject {
|
||
private polygonAppearance;
|
||
private polygonGeometry;
|
||
private polygonPrimitive;
|
||
private angle;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 创建网格体
|
||
*/
|
||
private createGeometry;
|
||
/**
|
||
* 创建材质
|
||
*/
|
||
private createAppearence;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 片源着色器方法
|
||
*/
|
||
private getMS;
|
||
private createGeometryMatrix;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class DynamicRippleEffect extends RenderPositionObject {
|
||
dataOptions: any;
|
||
private _originProps;
|
||
private _resProps;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
private _dealResProps;
|
||
/**
|
||
*
|
||
* 编辑状态改变,属性赋值方式改变
|
||
*/
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class FireRender extends RenderPositionObject {
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
getSrcByType(): string;
|
||
computeModelMatrix(position: any): any;
|
||
computeEmitterModelMatrix(): Cesium.Matrix4;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
class Flag extends RenderObject {
|
||
_state: string;
|
||
_canvasInfo: {
|
||
canvas: Element;
|
||
canvasWidth: number;
|
||
canvasHeight: number;
|
||
offsetAnchor: [number, number];
|
||
offsetInflection: [number, number];
|
||
flagpoleLeftTop: [number, number];
|
||
flagpoleRightTop: [number, number];
|
||
flagpoleLeftBottom: [number, number];
|
||
flagpoleRightBottom: [number, number];
|
||
};
|
||
_root: any;
|
||
readonly renderType: RenderTypeEnum;
|
||
getCanvasInfo(): {
|
||
canvas: Element;
|
||
canvasWidth: number;
|
||
canvasHeight: number;
|
||
offsetAnchor: [number, number];
|
||
offsetInflection: [number, number];
|
||
flagpoleLeftTop: [number, number];
|
||
flagpoleRightTop: [number, number];
|
||
flagpoleLeftBottom: [number, number];
|
||
flagpoleRightBottom: [number, number];
|
||
};
|
||
private createCanvas;
|
||
private _createCanvas;
|
||
private _calculatedLabelSize;
|
||
private _calculatedcanvasCoordinates;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
update(): void;
|
||
updateCanvas(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class FlowWallRender extends RenderObject {
|
||
private appearance;
|
||
private speed;
|
||
readonly renderType: RenderTypeEnum;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 创建材质
|
||
*/
|
||
private createMaterial;
|
||
private getSource;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class GradientSector extends RenderObject {
|
||
private _geometry;
|
||
private _appearance;
|
||
private _radius;
|
||
private _sliceUnit;
|
||
readonly renderType: RenderTypeEnum;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
update(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**
|
||
* 创建attribute
|
||
*/
|
||
private createGeometeryAttribute;
|
||
/**
|
||
* 创建网格体
|
||
* @param postionsTemp 顶点数据
|
||
* @param stsTemp 纹理数据
|
||
*/
|
||
private createGrometry;
|
||
/**
|
||
* 创建材质
|
||
*/
|
||
private createMaterial;
|
||
/**
|
||
* 片源着色器方法
|
||
*/
|
||
private getMS;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 创建变换矩阵
|
||
*/
|
||
private createGeometryMatrix;
|
||
clear(): void;
|
||
}
|
||
|
||
class HtmlElementDrag {
|
||
private dragElement;
|
||
private container;
|
||
private dragX;
|
||
private dragY;
|
||
private mouseDownX;
|
||
private mouseDownY;
|
||
private isMouseDown;
|
||
private _mouseDownCallback;
|
||
private _mouseMoveCallback;
|
||
private _mouseUpCallback;
|
||
constructor();
|
||
onMouseDown(e: MouseEvent, dragElement: HTMLElement, container: HTMLElement): void;
|
||
mouseDownCallback: (e: MouseEvent) => void;
|
||
mouseMoveCallback: (e: MouseEvent, dragX: number, dragY: number) => void;
|
||
mouseUpCallback: (e: MouseEvent) => void;
|
||
onMouseMove(e: any): void;
|
||
onMouseUp(e: any): void;
|
||
static getPosition(element: HTMLElement): [number, number];
|
||
static getElementSize(element: HTMLElement): [number, number];
|
||
}
|
||
|
||
class HtmlItem {
|
||
protected _id: string;
|
||
protected _name: string;
|
||
protected _element: HTMLElement;
|
||
protected _container: HTMLElement;
|
||
constructor(container: HTMLElement, element?: HTMLElement | HtmlItemOpt);
|
||
getType(): string;
|
||
static readonly type: string;
|
||
id: string;
|
||
name: string;
|
||
element: HTMLElement;
|
||
protected initElement(elementOpt?: HTMLElement | HtmlItemOpt): void;
|
||
}
|
||
class HtmlItemOpt {
|
||
type: string;
|
||
name?: string;
|
||
width?: number;
|
||
height?: number;
|
||
}
|
||
|
||
class HtmlItemCollection {
|
||
private _id;
|
||
private _name;
|
||
private _htmlCollection;
|
||
private _htmlContainer;
|
||
private _container;
|
||
private _viewer;
|
||
constructor(viewer: GeoCanvas | Cesium.Viewer);
|
||
readonly id: string;
|
||
readonly values: HtmlItem[];
|
||
name: string;
|
||
readonly container: HTMLElement;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 添加
|
||
*/
|
||
add(item: any): HtmlItem;
|
||
/**
|
||
* 删除
|
||
*/
|
||
remove(htmlItem: HtmlItem): void;
|
||
/**
|
||
* 清空
|
||
*/
|
||
removeAll(): void;
|
||
/**
|
||
* 根据id删除
|
||
*/
|
||
removeById(id: string): void;
|
||
/**
|
||
* 根据id获取对象
|
||
*/
|
||
getById(id: string): HtmlItem;
|
||
/**
|
||
* 是否包含该对象
|
||
*/
|
||
contains(htmlItem: any): boolean;
|
||
private insertCssSheet;
|
||
}
|
||
|
||
class ScreenTextItem extends HtmlItem {
|
||
private _childElement;
|
||
private _dragElement;
|
||
private _childElementMargin;
|
||
private _isEditting;
|
||
private _parentContainer;
|
||
private _onMouseDown;
|
||
private _onMouseChangeSize;
|
||
private _onMouseChangePos;
|
||
private _onTextChange;
|
||
constructor(container: HTMLElement, element?: HTMLElement | ScreenTextItemOpt);
|
||
getType(): string;
|
||
static readonly type: string;
|
||
readonly isEditting: boolean;
|
||
childElement: HTMLElement;
|
||
readonly text: string;
|
||
protected initElement(elementOpt?: HTMLElement | ScreenTextItemOpt): void;
|
||
setTop(value: number): void;
|
||
setLeft(value: number): void;
|
||
setWidth(value: number): void;
|
||
setHeight(value: number): void;
|
||
setMargin(value: number): void;
|
||
setProperty(propertyName: any, value: any): void;
|
||
setSelectState(isOpen: any): void;
|
||
onMouseDown: (e?: MouseEvent) => void;
|
||
onMouseChangeSize: (e: MouseEvent, dragX: number, dragY: number) => void;
|
||
onMouseChangePos: (e: MouseEvent, dragX: number, dragY: number) => void;
|
||
onTextChange: (e: KeyboardEvent, content: string) => void;
|
||
openEdit(): void;
|
||
closeEdit(): void;
|
||
private _initDragElement;
|
||
}
|
||
class ScreenTextItemOpt extends HtmlItemOpt {
|
||
type: string;
|
||
name?: string;
|
||
left?: number;
|
||
top?: number;
|
||
width?: number;
|
||
height?: number;
|
||
color?: string;
|
||
borderColor?: string;
|
||
borderStyle?: string;
|
||
borderWidth?: number;
|
||
backgroundColor?: string;
|
||
fontSize?: number;
|
||
fontFamily?: string;
|
||
fontWeight?: number;
|
||
textAlign?: string;
|
||
backgroundImage?: string;
|
||
backgroundSize?: string;
|
||
backgroundPosition?: string;
|
||
paddingLeft?: number;
|
||
paddingRight?: number;
|
||
paddingTop?: number;
|
||
paddingBottom?: number;
|
||
lineHeight?: number;
|
||
zIndex?: number;
|
||
text?: string;
|
||
position: string;
|
||
display: string;
|
||
backgroundRepeat?: string;
|
||
}
|
||
|
||
class Icon {
|
||
protected _position: Cesium.Cartesian3;
|
||
protected _radius: Number;
|
||
protected _numberOfLines: Number;
|
||
protected _color: any;
|
||
protected _duration: Number;
|
||
protected _image: any;
|
||
protected entity: any;
|
||
protected viewer: any;
|
||
protected options: any;
|
||
constructor(options?: {});
|
||
color: any;
|
||
position: Cesium.Cartesian3;
|
||
radius: Number;
|
||
numberOfLines: Number;
|
||
duration: Number;
|
||
image: any;
|
||
updateMaterial(type: any, value: any): void;
|
||
createEntity(): void;
|
||
addTo(viewer: any): void;
|
||
exists(): boolean;
|
||
remove(): void;
|
||
zoomTo(): void;
|
||
}
|
||
|
||
class Icon2 extends Icon {
|
||
constructor(options?: {});
|
||
createEntity(): Cesium.Entity;
|
||
}
|
||
|
||
class CircleIconRender extends CircleRender {
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 获取材质的片元着色器
|
||
*/
|
||
protected getMaterialFS(): string;
|
||
/**
|
||
* 创建材质对象
|
||
*/
|
||
protected getMaterial(): Cesium.Material;
|
||
}
|
||
|
||
class CircleRender extends RenderPositionObject {
|
||
private _buildGeometry;
|
||
private _time;
|
||
protected _appearance: Cesium.Appearance;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 获取类型
|
||
* @readonly
|
||
* @type {RenderTypeEnum}
|
||
*/
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 帧回调
|
||
*/
|
||
protected dataUpdate(): void;
|
||
/**
|
||
* 获取材质的片元着色器
|
||
*/
|
||
protected getMaterialFS(): string;
|
||
/**
|
||
* 创建材质对象,子类可以重写
|
||
*/
|
||
protected getMaterial(): any;
|
||
/**
|
||
* 创建Appearence
|
||
*/
|
||
protected createAppearence(): void;
|
||
private getFS;
|
||
private getVS;
|
||
protected getMatrix(): Cesium.Matrix4;
|
||
protected createPolygonGeometry(): any;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
protected createPrimitive(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
class IconMaterialProperty {
|
||
protected _image: any;
|
||
protected _duration: any;
|
||
protected _color: any;
|
||
protected _numberOfLines: Number;
|
||
definitionChanged: any;
|
||
protected _time: any;
|
||
constructor(options?: {});
|
||
image: any;
|
||
duration: any;
|
||
numberOfLines: Number;
|
||
color: any;
|
||
isConstant(): Boolean;
|
||
translucent(): boolean;
|
||
equals(other: any): boolean;
|
||
getValue(time: any, result?: {}): {};
|
||
}
|
||
|
||
class Icon6 extends Icon {
|
||
private _gradient;
|
||
private _centerColor;
|
||
constructor(options?: {});
|
||
gradient: any;
|
||
centerColor: any;
|
||
/**
|
||
* @override
|
||
*/
|
||
radius: number;
|
||
createEntity(): Cesium.Entity;
|
||
}
|
||
|
||
class WarnIconRender extends CircleRender {
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 获取材质的片元着色器
|
||
*/
|
||
protected getMaterialFS(): string;
|
||
/**
|
||
* 创建材质对象,子类可以重写
|
||
*/
|
||
protected getMaterial(): Cesium.Material;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
class Icon8 extends Icon {
|
||
private _gradient;
|
||
constructor(options?: {});
|
||
gradient: any;
|
||
createEntity(): Cesium.Entity;
|
||
}
|
||
|
||
class WaveIconRender extends CircleRender {
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 获取材质的片元着色器
|
||
*/
|
||
protected getMaterialFS(): string;
|
||
/**
|
||
* 创建材质对象,子类可以重写
|
||
*/
|
||
protected getMaterial(): Cesium.Material;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
class IconRender extends RenderPositionObject {
|
||
readonly renderType: RenderTypeEnum;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
init(): void;
|
||
update(): void;
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class JBLineRender extends RenderObject {
|
||
/**数据源 */
|
||
result: any[];
|
||
/**线 */
|
||
linePrimitive: Cesium.Primitive;
|
||
/**填充网格体 */
|
||
fillPrimitive: Cesium.Primitive;
|
||
/**拉高网格体 */
|
||
supplementPrimitive: Cesium.Primitive;
|
||
/**线的材质 */
|
||
lineAppearance: Cesium.PolylineMaterialAppearance;
|
||
/**填充网格体材质 */
|
||
fillAppearance: Cesium.Appearance;
|
||
/**拉高网格体材质 */
|
||
supplementAppearance: Cesium.Appearance;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 创建JB线
|
||
*/
|
||
private create;
|
||
/**
|
||
* 数组去重
|
||
* @param arr
|
||
*/
|
||
private unique;
|
||
/**
|
||
* 对数据添加高度信息
|
||
*/
|
||
private addHeight;
|
||
/**
|
||
* 创建线
|
||
*/
|
||
private createLine;
|
||
/**
|
||
* 创建矢量填充
|
||
*/
|
||
private createFill;
|
||
/**
|
||
* 创建拉高网格体
|
||
*/
|
||
private createSupplement;
|
||
/**
|
||
* 创建填充纹理图
|
||
*/
|
||
private getColorRamp;
|
||
/**
|
||
* 获取数据
|
||
*/
|
||
private getData;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
class JBPointRender extends RenderObject {
|
||
_positions: any[];
|
||
_svgStr: any;
|
||
ent: any;
|
||
_image: string;
|
||
_appearance: Cesium.MaterialAppearance;
|
||
_label: any;
|
||
_rectangleInstance: any;
|
||
_labelCollect: any;
|
||
_objE: HTMLDivElement;
|
||
svgCode: string;
|
||
billboard: any;
|
||
_vectorPrimitiveCollection: any[];
|
||
flagCode: any[];
|
||
private svgHelper;
|
||
private trailLineStartPosition;
|
||
private trailLineStartGeoPosition;
|
||
private trailLineEndPosition;
|
||
private billboardCollection;
|
||
private originImgWidth;
|
||
private originImgHeight;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 时刻更新连接线
|
||
* @ignore
|
||
*/
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 绘制billboard
|
||
* @param data
|
||
*/
|
||
renderByBillboard(data: any): void;
|
||
/**
|
||
* @ignore
|
||
* 获取拖线的 canvas
|
||
*/
|
||
private updateTrailLineCanvas;
|
||
/**
|
||
* @ignore
|
||
* 获取图标拖线正确连接点
|
||
*/
|
||
private getTrailEndPoint;
|
||
/**
|
||
* 栅格方式渲染
|
||
* @param data
|
||
*/
|
||
renderByGrid(data: any): void;
|
||
/**
|
||
* 创建Appearence
|
||
*/
|
||
createAppearence(): Cesium.PerInstanceColorAppearance;
|
||
/**
|
||
* 矢量形式渲染
|
||
* @param data
|
||
*/
|
||
renderByVector(data: any): void;
|
||
/**
|
||
* 通过军标码加载
|
||
* @param data
|
||
*/
|
||
JBLoad(data: any): void;
|
||
/**
|
||
* 分析threejs svgLoader解析后的svg数据
|
||
* @param shape
|
||
* @param data
|
||
*/
|
||
analysis(shape: any, data: any): void;
|
||
/**
|
||
*
|
||
* @param holesRes 多边形边框
|
||
* @param height 整体高度
|
||
* @param extrudedHeight 挤压高度
|
||
* @param color 边框色
|
||
* @param holes 洞
|
||
* @param holesColor 洞的颜色
|
||
*/
|
||
createVector(holesRes: any, height: any, extrudedHeight: any, color: any, holes?: any, holesColor?: any): void;
|
||
/**
|
||
* 计算点标洞口位置信息
|
||
* @param holes
|
||
* @param position
|
||
*/
|
||
calcholes(holes: any, position: any): any;
|
||
update(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
updateHole(holes: any, color: any): any;
|
||
modifySvg(code: any, color: any, strokeWidth: any, strokeColor: any, callback: any): void;
|
||
parseDom(arg: any): NodeListOf<Element>;
|
||
getSVG(): string;
|
||
SVG(svg: any): string;
|
||
clear(): void;
|
||
/**
|
||
* @ignore
|
||
* 根据特殊标绘计算应该有的偏移
|
||
* PS:参考标准 JB 需求表
|
||
*/
|
||
getCurrectOffset(): number[];
|
||
}
|
||
|
||
class Corner {
|
||
pos: Cesium.Cartesian3;
|
||
center: Cesium.Cartesian3;
|
||
radius: number;
|
||
pre: Cesium.Cartesian3;
|
||
nxt: Cesium.Cartesian3;
|
||
circleNum: number;
|
||
constructor(opt: any);
|
||
}
|
||
class CirclePipeCornerGeometry extends PipelineGeometry {
|
||
private _corners;
|
||
/**
|
||
* 构建圆管转角的顶点、纹理、法线属性数据
|
||
* ● center
|
||
* /┊
|
||
* // ┊radius
|
||
* / / ┊
|
||
* pre \/___┊
|
||
* pos nxt
|
||
* @param cornerArray 圆管转角的数组
|
||
* @param radius 圆管的半径
|
||
*/
|
||
constructor(cornerArray: Array<Corner>, radius: number, shape: SectionShape);
|
||
protected building(): void;
|
||
getCorners(): Corner[];
|
||
getLineIndices(): any[];
|
||
getTriangleIndices(): any[];
|
||
}
|
||
|
||
class CirclePipelineGeometry extends PipelineGeometry {
|
||
private _pts;
|
||
/**
|
||
* 构建圆管的顶点、纹理、法线属性数据
|
||
* @param pts 顶点成对出现,即pts是由线段组成,数组长度是偶数
|
||
* @param radius 圆管的半径
|
||
*/
|
||
constructor(pts: Array<Cesium.Cartesian3>, radius: number, shape: SectionShape);
|
||
protected building(): void;
|
||
getLineIndices(): any[];
|
||
getTriangleIndices(): any[];
|
||
}
|
||
|
||
class PipelineBaseRender extends RenderObject {
|
||
protected _primitiveLines: Cesium.Primitive;
|
||
protected _lineApp: Cesium.MaterialAppearance;
|
||
protected _polyApp: Cesium.MaterialAppearance;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
clear(): void;
|
||
/**
|
||
* 创建线对象的appearance
|
||
* @param c
|
||
*/
|
||
protected createLineAppearance(c: Cesium.Color): any;
|
||
/**
|
||
* 创建面对象的appearance
|
||
* @param c
|
||
* @param image
|
||
*/
|
||
protected createPolyAppearance(c: Cesium.Color, image: string): any;
|
||
/**
|
||
* 片源着色器方法
|
||
*/
|
||
private getMS1;
|
||
/**
|
||
* 片源着色器方法
|
||
*/
|
||
private getMS2;
|
||
/**
|
||
* 根据提供的数据构建geometry对象
|
||
* @param vertexs 顶点数据
|
||
* @param nors 法线数据
|
||
* @param sts 纹理数据
|
||
* @param inds 索引数据
|
||
* @param type 图形类型(Cesium.PrimitiveType.LINES、Cesium.PrimitiveType.TRIANGLES)
|
||
*/
|
||
protected createGeometry(vertexs: any, nors: any, sts: any, inds: any, type: any): Cesium.Geometry;
|
||
protected createLineGeometry(): any[];
|
||
protected createTriangleGeometry(): any[];
|
||
protected createPrimitiveLine(): void;
|
||
protected createPrimitive(): void;
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
class Corner {
|
||
pos: Cesium.Cartesian3;
|
||
center: Cesium.Cartesian3;
|
||
radius: number;
|
||
pre: Cesium.Cartesian3;
|
||
nxt: Cesium.Cartesian3;
|
||
arc: Array<Cesium.Cartesian3>;
|
||
circleNum: number;
|
||
constructor(opt: any);
|
||
}
|
||
class PipelineCornerGeometry extends PipelineGeometry {
|
||
private _corners;
|
||
/**
|
||
* 构建圆管转角的顶点、纹理、法线属性数据
|
||
* ● center
|
||
* /┊
|
||
* // ┊radius
|
||
* / / ┊
|
||
* pre \/___┊
|
||
* pos nxt
|
||
* @param cornerArray 圆管转角的数组
|
||
* @param radius 圆管的半径
|
||
*/
|
||
constructor(cornerArray: Array<Corner>, radius: number, shape: SectionShape);
|
||
protected building(): void;
|
||
getCorners(): Corner[];
|
||
getLineIndices(): any[];
|
||
getTriangleIndices(): any[];
|
||
}
|
||
|
||
class PipelineGeometry {
|
||
protected _radius: number;
|
||
protected _shape: SectionShape;
|
||
protected _shapePtsNum: number;
|
||
protected _vertex: Array<Cesium.Cartesian3>;
|
||
protected _texture: Array<Cesium.Cartesian2>;
|
||
protected _normals: Array<Cesium.Cartesian3>;
|
||
constructor(radius: number, shape: SectionShape);
|
||
protected building(): void;
|
||
/**
|
||
* 矩阵(preMatrix)叠加另一个矩阵(一个从向量v(0, -1, 0)旋转到向量dir方向的矩阵) ------注意:某些特殊情况下还需要优化
|
||
* @param preMatrix
|
||
* @param dir
|
||
*/
|
||
protected getRotateMatrix(preMatrix: any, dir: any): any;
|
||
radius: number;
|
||
getVertex(): Cesium.Cartesian3[];
|
||
getTexture(): Cesium.Cartesian2[];
|
||
getNormal(): Cesium.Cartesian3[];
|
||
getShapePtsNum(): number;
|
||
getLineIndices(): any;
|
||
getTriangleIndices(): any;
|
||
createLineGeometry(): Cesium.Geometry;
|
||
createTriangleGeometry(): Cesium.Geometry;
|
||
}
|
||
|
||
/// <reference path="../../../../../../src/Types/cesium.d.ts" />
|
||
/**
|
||
* 管道线渲染对象
|
||
*/
|
||
class PipelineRender extends PipelineBaseRender {
|
||
private _circlePts;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
private getAngle;
|
||
private getStartAngle;
|
||
protected createLineGeometry(): any[];
|
||
protected createLineGeometry_(): Cesium.Geometry[];
|
||
private combineVertex;
|
||
protected createTriangleGeometry(): any[];
|
||
protected createTriangleGeometry_(): Cesium.Geometry[];
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
class PipelineSegGeometry extends PipelineGeometry {
|
||
private _pts;
|
||
/**
|
||
* 构建直线段管的顶点、纹理、法线属性数据
|
||
* @param pts 顶点成对出现,即pts是由线段组成,数组长度是偶数
|
||
* @param radius 管的半径
|
||
*/
|
||
constructor(pts: Array<Cesium.Cartesian3>, radius: number, shape: SectionShape);
|
||
protected building(): void;
|
||
getLineIndices(): any[];
|
||
getTriangleIndices(): any[];
|
||
}
|
||
|
||
class PipelineStripGeometry extends PipelineGeometry {
|
||
/** 渲染所需的中心线参数
|
||
* {
|
||
* geos:Array<GeoPoint>, //中心线地理坐标
|
||
* pts:Array<Cesium.Cartesian3>, //中心线世界坐标
|
||
* types:Array<boolean> //中心线类型(true表示直线段;false表示曲线段)
|
||
* }
|
||
*/
|
||
private _paras;
|
||
private _shapeNum;
|
||
/**
|
||
* 构建连续线管的顶点、纹理、法线属性数据
|
||
* @param pts 连续线段的顶点
|
||
* @param radius 管的半径
|
||
*/
|
||
constructor(para: {
|
||
geos: Array<GeoPoint>;
|
||
pts: Array<Cesium.Cartesian3>;
|
||
types: Array<boolean>;
|
||
}, radius: number, shape: SectionShape);
|
||
protected building(): void;
|
||
getLineIndices(): any[];
|
||
getTriangleIndices(): any[];
|
||
}
|
||
|
||
/**
|
||
* 管道线渲染对象
|
||
*/
|
||
class PipelineStripRender extends PipelineBaseRender {
|
||
protected _geometry: PipelineStripGeometry;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
private buildGeometry;
|
||
protected createLineGeometry(): any[];
|
||
protected createTriangleGeometry(): any[];
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
class PipelineTurnGeometry extends PipelineGeometry {
|
||
private _pts;
|
||
/**
|
||
* 构建两线拐弯处的顶点、纹理、法线属性数据
|
||
* @param pts 连续线段的顶点
|
||
* @param radius 管的半径
|
||
*/
|
||
constructor(pts: Array<Cesium.Cartesian3>, radius: number, shape: SectionShape);
|
||
protected building(): void;
|
||
getLineIndices(): any[];
|
||
getTriangleIndices(): any[];
|
||
}
|
||
|
||
class PipelineTurnPartGeometry extends PipelineGeometry {
|
||
private _pts;
|
||
private _types;
|
||
private _shapeNum;
|
||
protected _topAttributes: {
|
||
vertex: Array<Cesium.Cartesian3>;
|
||
texture: Array<Cesium.Cartesian2>;
|
||
normals: Array<Cesium.Cartesian3>;
|
||
types: Array<boolean>;
|
||
};
|
||
protected _bottomAttributes: {
|
||
vertex: Array<Cesium.Cartesian3>;
|
||
texture: Array<Cesium.Cartesian2>;
|
||
normals: Array<Cesium.Cartesian3>;
|
||
types: Array<boolean>;
|
||
};
|
||
/**
|
||
* 构建两线拐弯内侧面的顶点、纹理、法线属性数据
|
||
* @param pts 连续线段的顶点
|
||
* @param radius 管的半径
|
||
*/
|
||
constructor(pts: Array<Cesium.Cartesian3>, types: Array<boolean>, radius: number, shape: SectionShape);
|
||
protected building(): void;
|
||
getLineIndices(): any[];
|
||
getTriangleIndices(): any[];
|
||
getTopAttributes(): {
|
||
vertex: Cesium.Cartesian3[];
|
||
texture: Cesium.Cartesian2[];
|
||
normals: Cesium.Cartesian3[];
|
||
types: boolean[];
|
||
};
|
||
getBottomAttributes(): {
|
||
vertex: Cesium.Cartesian3[];
|
||
texture: Cesium.Cartesian2[];
|
||
normals: Cesium.Cartesian3[];
|
||
types: boolean[];
|
||
};
|
||
}
|
||
|
||
class PipeMath {
|
||
/**
|
||
* 获取单位圆顶点(结果顶点中的z分量表示纹理偏移量)
|
||
* @param span 等分角度
|
||
*/
|
||
static getCircle(span?: number): any[];
|
||
/**
|
||
* 获取单位半圆顶点(结果顶点中的z分量表示纹理偏移量)
|
||
* @param span 等分角度
|
||
*/
|
||
static getCirclePart(span?: number): any[];
|
||
/**
|
||
* 获取单位矩形(外接圆半径为1.0,结果顶点中的z分量表示纹理偏移量)
|
||
*/
|
||
static getRect(): any[];
|
||
/**
|
||
* 获取单位半矩形(外接圆半径为1.0,结果顶点中的z分量表示纹理偏移量)
|
||
*/
|
||
static getRectPart(): any[];
|
||
/**
|
||
* 获取2d单位圆角矩形(外接圆半径为1.0,结果顶点中的z分量表示纹理偏移量)
|
||
* @param roundAngle 圆角的角度
|
||
*/
|
||
static getRoundRect(roundAngle?: number): any[];
|
||
/**
|
||
* 获取2d单位半个圆角矩形(外接圆半径为1.0,结果顶点中的z分量表示纹理偏移量)
|
||
* @param roundAngle 圆角的角度
|
||
*/
|
||
static getRoundRectPart(roundAngle?: number): any[];
|
||
/**
|
||
* 获取2d单位圆弧顶点
|
||
* @param beginAngle 起始角度
|
||
* @param allAngle 圆弧总角度
|
||
* @param span 等分角度
|
||
*/
|
||
static getPartCircle2D(beginAngle: number, allAngle?: number, span?: number): any[];
|
||
static getShapePts(shape: SectionShape): any;
|
||
static getShapePartPts(shape: SectionShape): any;
|
||
/**
|
||
* 计算向量a朝向量b方向旋转angle角度的旋转矩阵
|
||
* @param a 向量a
|
||
* @param b 向量b
|
||
* @param angle 旋转角度(不设置时,默认为a与b之间的夹角,是角度值而非弧度值)
|
||
*/
|
||
static getRotateMatrix(a: Cesium.Cartesian3, b: Cesium.Cartesian3, angle?: number): Cesium.Matrix3;
|
||
/**
|
||
* 根据拐弯圆心和前后切点,计算拐弯曲线,返回Array<Cesium.Cartesian3>
|
||
* @param preTangency 前切点
|
||
* @param pt 拐弯顶点
|
||
* @param nxtTangency 后切点
|
||
* @param center 拐弯圆心点
|
||
*/
|
||
static getCornerCenterLine(preTangency: Cesium.Cartesian3, pt: Cesium.Cartesian3, nxtTangency: Cesium.Cartesian3, center: Cesium.Cartesian3): any[];
|
||
/**
|
||
* 计算圆角参数,即计算圆角圆心、前向切点、后向切点三参数
|
||
* @param pre 拐弯起始点
|
||
* @param pos 拐弯点
|
||
* @param nxt 拐弯结束点
|
||
* @param r 圆角半径
|
||
*/
|
||
static getRoundParas(pre: Cesium.Cartesian3, pos: Cesium.Cartesian3, nxt: Cesium.Cartesian3, r: number): {
|
||
center: Cesium.Cartesian3;
|
||
preTangency: Cesium.Cartesian3;
|
||
nxtTangency: Cesium.Cartesian3;
|
||
};
|
||
/**
|
||
* 判断两个矩形是否有交集
|
||
* @param rect 比较的矩形
|
||
* @param other 被比较的矩形
|
||
* @return true:有相交; false:不相交
|
||
*/
|
||
static isRectIntersect(rect: Cesium.Rectangle, other: Cesium.Rectangle): boolean;
|
||
/**
|
||
* 判断线段p1p2与线段p3p4共线的14种情况(仅供isLineIntersect函数使用)
|
||
* @param v 向量:p3p4
|
||
* @param a 向量:p3p1
|
||
* @param b 向量:p3p2
|
||
*/
|
||
private static sameLine2;
|
||
/**
|
||
* 判断线段p1p2与线段p3p4共线的14种情况(仅供isLineIntersect函数使用)
|
||
* @param v 向量:p1p2
|
||
* @param a 向量:p1p3
|
||
* @param b 向量:p1p4
|
||
*/
|
||
private static sameLine1;
|
||
/**
|
||
* 判断两条直线段是否相交
|
||
* @param p1 直线段1起始点
|
||
* @param p2 直线段1终止点
|
||
* @param p3 直线段2起始点
|
||
* @param p4 直线段2终止点
|
||
* @return 0:不相交;1:相交于中间点;2:p1与p3重合;3:p2与p3重合;4:p1与p4重合;5:p2与p4重合;
|
||
* 6:交点p3在p1p2线上;7:交点p4在p1p2线上;8:交点p1在p3p4线上;9:交点p2在p3p4线上;
|
||
* 10:共线(14种情况)
|
||
*/
|
||
static isLineIntersect(p1: GeoPoint, p2: GeoPoint, p3: GeoPoint, p4: GeoPoint): 0 | 2 | 1 | 3 | 10 | 7 | 6 | 5 | 4 | 8 | 9;
|
||
/**
|
||
* 求线段p1p2与线段p3p4的交点(前提条件是,两条线段必须相交)
|
||
* @param p1 线段p1p2的起始点
|
||
* @param p2 线段p1p2的终止点
|
||
* @param p3 线段p3p4的起始点
|
||
* @param p4 线段p3p4的终止点
|
||
*/
|
||
static getLineIntersect(p1: GeoPoint, p2: GeoPoint, p3: GeoPoint, p4: GeoPoint): GeoPoint;
|
||
/**
|
||
* 判断两个地理坐标是否相等
|
||
* @param pt
|
||
* @param other
|
||
*/
|
||
static isEqual(pt: GeoPoint, other: GeoPoint): boolean;
|
||
/**
|
||
* 判断线段p1p2与线段p3p4是否平行
|
||
* @param p1
|
||
* @param p2
|
||
* @param p3
|
||
* @param p4
|
||
* @return true:表示平行;false:表示不平行
|
||
*/
|
||
static isParallel(p1: GeoPoint, p2: GeoPoint, p3: GeoPoint, p4: GeoPoint): boolean;
|
||
}
|
||
|
||
/**
|
||
* 管道两线拐弯部分渲染对象
|
||
*/
|
||
class PipeTurnThreeRender extends PipelineBaseRender {
|
||
private _creatorArray;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
private isRight;
|
||
private isLeft;
|
||
private getAngle;
|
||
/**
|
||
* 获取顶点数据,纹理数据,法线数据,返回顶点索引数组
|
||
* @param attributeArr
|
||
* @param vertexs 顶点数据
|
||
* @param nors 法线数据
|
||
* @param sts 纹理数据
|
||
* @return 返回一个数组(长度为拐弯个数*2),数组中的每个元素是一个object对象
|
||
* {
|
||
* indexArr:Array<number>, //半个拐弯顶点索引
|
||
* hasArc: boolean //拐弯线段中是否包含曲线段
|
||
* }
|
||
*/
|
||
private getAttributes;
|
||
private buildLineIndexByArray;
|
||
private buildTriangleIndexByArray;
|
||
/**
|
||
* 根据拐弯顶点索引以及顶点数据,计算线段索引数据
|
||
* @param partIndexArr 拐弯顶点索引数组(数组中的每个元素为半个拐弯顶点索引数组)
|
||
* @param vertexs 顶点数据
|
||
*/
|
||
private getLineIndexArray;
|
||
/**
|
||
* 根据拐弯顶点索引以及顶点数据,计算三角面的索引数据
|
||
* @param partIndexArr 拐弯顶点索引数组(数组中的每个元素为半个拐弯顶点索引数组)
|
||
* @param vertexs 顶点数据
|
||
* @param isLine 是否为三角面的线段索引,默认为false,表示为三角面索引
|
||
*/
|
||
private getIndexArray;
|
||
private createGeometryCreator;
|
||
protected createLineGeometry(): any[];
|
||
protected createTriangleGeometry(): any[];
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
/**
|
||
* 管道两线拐弯部分渲染对象
|
||
*/
|
||
class PipeTurnTwoRender extends PipelineBaseRender {
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
protected createLineGeometry(): any[];
|
||
protected createTriangleGeometry(): any[];
|
||
/**
|
||
* 更新属性
|
||
* @param attrName 属性名
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
class GxPrimitivePolyline {
|
||
private vertexShader;
|
||
private fragmentShader;
|
||
private viewer;
|
||
private positionArr;
|
||
private colorArr;
|
||
private indiceArr;
|
||
/**
|
||
* 通过参数组成的Geomerty
|
||
*/
|
||
geometry: Cesium.Geometry;
|
||
/**
|
||
* 三角网Appearance
|
||
*/
|
||
appearance: Cesium.Appearance;
|
||
/**
|
||
* 构造函数
|
||
* @param viewer 球
|
||
* @param Cartesians 位置数组,三个点构成一个面
|
||
* @param Colors 颜色数组,长度必须为Cartesians的4倍[1][1][1][0],4位为一个顶点的颜色
|
||
*/
|
||
constructor(viewer: Cesium.Viewer, Cartesians: Array<Cesium.Cartesian3>, Colors: Array<number>);
|
||
private CreateGeometry;
|
||
private CreateAppearence;
|
||
private getVS;
|
||
private getFS;
|
||
}
|
||
|
||
/**
|
||
* 三角网绘制
|
||
*/
|
||
class GxPrimitiveTriangles {
|
||
private vertexShader;
|
||
private fragmentShader;
|
||
private viewer;
|
||
private positionArr;
|
||
private colorArr;
|
||
private indiceArr;
|
||
/**
|
||
* 通过参数组成的Geomerty
|
||
*/
|
||
geometry: Cesium.Geometry;
|
||
/**
|
||
* 三角网Appearance
|
||
*/
|
||
appearance: Cesium.Appearance;
|
||
/**
|
||
* 构造函数
|
||
* @param viewer 球
|
||
* @param Cartesians 位置数组,三个点构成一个面
|
||
* @param Colors 颜色数组,长度必须为Cartesians的4倍[1][1][1][0],4位为一个顶点的颜色
|
||
*/
|
||
constructor(viewer: Cesium.Viewer, Cartesians: Array<Cesium.Cartesian3>, Colors: Array<number>);
|
||
private CreateGeometry;
|
||
private CreateAppearence;
|
||
private getVS;
|
||
private getFS;
|
||
}
|
||
|
||
class RadarNodeRender extends RenderPositionObject {
|
||
private _sphereVertex;
|
||
private _sphereTriangle;
|
||
private _sphereLines;
|
||
private _sphereCone;
|
||
private _scanPlane;
|
||
private _primitiveOut;
|
||
private _primitiveLine;
|
||
private _primitiveCone;
|
||
private _primitiveScan;
|
||
private _primitiveScanLine;
|
||
private _posMatrix;
|
||
private _lastTime;
|
||
private _rotateAngle;
|
||
private _isReserve;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
readonly renderType: RenderTypeEnum;
|
||
init(): void;
|
||
/**
|
||
* 更新回调
|
||
*/
|
||
protected dataUpdate(): void;
|
||
/**
|
||
* 计算Geometry,只有控制角度和半径发生改变时才需要调用此函数重新计算
|
||
*/
|
||
private createGeometry;
|
||
/**
|
||
* 创建Primitive,只有颜色和位置发生改变时才需要调用此函数重新创建
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 绘制外罩面
|
||
*/
|
||
private createOutPrimitive;
|
||
/**
|
||
* 绘制外罩线
|
||
*/
|
||
private createLinePrimitive;
|
||
/**
|
||
* 绘制内锥及侧面
|
||
*/
|
||
private createConePrimitive;
|
||
/**
|
||
* 绘制扫描板
|
||
*/
|
||
private createScanPrimitive;
|
||
private getModelMatrix;
|
||
private getScanModelMatrix;
|
||
/**
|
||
* 属性更新
|
||
* @param attrName
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class RadarRender extends RenderObject {
|
||
private primitivePolyline;
|
||
private primitiveTriangles;
|
||
private scanPrimitivePolyline;
|
||
private scanPrimitiveTriangles;
|
||
isPrimitive: boolean;
|
||
private radarOption;
|
||
private _position;
|
||
private angle;
|
||
private isReserve;
|
||
private lastTime;
|
||
readonly renderType: RenderTypeEnum;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化
|
||
*/
|
||
init(): void;
|
||
listenerFun: () => void;
|
||
position: GeoPoint;
|
||
private create;
|
||
private createScan;
|
||
private originalMatrix;
|
||
private updateModelMatrix;
|
||
private createPrimitive;
|
||
/**
|
||
* 更新外观,在修改属性之后
|
||
*/
|
||
update(): void;
|
||
/**
|
||
* 属性更新
|
||
* @param attrName
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**
|
||
* 清除
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
class ScanPlane {
|
||
geometry: Cesium.Geometry;
|
||
geometryLines: Cesium.Geometry;
|
||
appearance: Cesium.Appearance;
|
||
appearanceLines: Cesium.Appearance;
|
||
private positions;
|
||
private colors;
|
||
private indices;
|
||
private _obj;
|
||
constructor(obj: SphereVertex);
|
||
createAppearance(c: Cesium.Color): any;
|
||
/**
|
||
* 片源着色器方法
|
||
*/
|
||
private getMS;
|
||
private createLineAppearance;
|
||
private getFS;
|
||
private getVS;
|
||
createGeometry(fileScan: boolean): void;
|
||
createLineGeometry_1(): void;
|
||
createLineGeometry(c: Cesium.Color): void;
|
||
}
|
||
|
||
class SphereCone {
|
||
geometry: Cesium.Geometry;
|
||
appearance: Cesium.Appearance;
|
||
private _obj;
|
||
constructor(obj: SphereVertex);
|
||
createAppearance(c: Cesium.Color): any;
|
||
/**
|
||
* 片源着色器方法
|
||
*/
|
||
private getMS;
|
||
createGeometry(): void;
|
||
}
|
||
|
||
class SphereLines {
|
||
geometry: Cesium.Geometry;
|
||
appearance: Cesium.Appearance;
|
||
private _obj;
|
||
constructor(obj: SphereVertex);
|
||
createAppearance(c: Cesium.Color): any;
|
||
/**
|
||
* 片源着色器方法
|
||
*/
|
||
private getMS;
|
||
createGeometry(): void;
|
||
}
|
||
|
||
class SphereTriangles {
|
||
geometry: Cesium.Geometry;
|
||
appearance: Cesium.Appearance;
|
||
private _obj;
|
||
constructor(obj: SphereVertex);
|
||
createAppearance(c: Cesium.Color): any;
|
||
/**
|
||
* 片源着色器方法
|
||
*/
|
||
private getMS;
|
||
createGeometry(): void;
|
||
}
|
||
|
||
class SphereVertex {
|
||
private _radius;
|
||
private _horStart;
|
||
private _horEnd;
|
||
private _verStart;
|
||
private _verEnd;
|
||
private _thick;
|
||
private _slice;
|
||
private _pts;
|
||
private _texs;
|
||
private _normals;
|
||
private _hNum;
|
||
private _vNum;
|
||
private _ptsScan;
|
||
private _texScan;
|
||
private _norScan;
|
||
private _hNumScan;
|
||
private _offset;
|
||
constructor(radius: number, horStart: number, horEnd: number, verStart: number, verEnd: number, thick: number);
|
||
setParas(radius: number, horStart: number, horEnd: number, verStart: number, verEnd: number, thick: number): void;
|
||
offset: Cesium.Cartesian3;
|
||
/**
|
||
* 计算所有的顶点及纹理坐标
|
||
*/
|
||
private calculateVertexAndTextures;
|
||
/**
|
||
* 获取顶点坐标数组,顶点个数为:(horizonNumber + 1) * (verticalNumber + 1)
|
||
*/
|
||
readonly vertexs: any[];
|
||
/**
|
||
* 获取纹理坐标数组
|
||
*/
|
||
readonly textures: any[];
|
||
/**
|
||
* 获取法线向量数组
|
||
*/
|
||
readonly normals: any[];
|
||
/**
|
||
* 获取横向分段数量
|
||
*/
|
||
readonly horizonNumber: number;
|
||
/**
|
||
* 获取纵向分段数量
|
||
*/
|
||
readonly verticalNumber: number;
|
||
/**
|
||
* 获取扫描板顶点坐标数组
|
||
*/
|
||
readonly vertexScan: any[];
|
||
/**
|
||
* 获取扫描板纹理坐标数组
|
||
*/
|
||
readonly textureScan: any[];
|
||
/**
|
||
* 获取扫描板法线向量数组
|
||
*/
|
||
readonly normalScan: any[];
|
||
/**
|
||
* 获取扫描板横向分段数量
|
||
*/
|
||
readonly horizonNumberScan: number;
|
||
}
|
||
|
||
/**
|
||
* 标绘渲染对象虚方法
|
||
*/
|
||
class RenderObject {
|
||
_renderObj: any;
|
||
_dataItem: GraphicItem;
|
||
_renderRoot: any;
|
||
_viewer: Cesium.Viewer;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
readonly renderType: RenderTypeEnum;
|
||
readonly renderObj: any;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 清理
|
||
*/
|
||
clear(): void;
|
||
/**
|
||
* 整体更新
|
||
*/
|
||
update(framestate: any): void;
|
||
/**
|
||
* 属性更新(为提高效率)
|
||
*/
|
||
updateAttribute(attrName: string): void;
|
||
}
|
||
enum RenderTypeEnum {
|
||
Entity = "entity",
|
||
Primitive = "Primitive",
|
||
PostProcess = "PostProcess",
|
||
Lable = "Lable",
|
||
Billboard = "Billboard",
|
||
DrawCombination = "DrawCombination",
|
||
HtmlItem = "html"
|
||
}
|
||
|
||
/**
|
||
* 点标绘的绘制虚基类,提供更新回调机制处理位置绑定
|
||
*/
|
||
class RenderPositionObject extends RenderObject {
|
||
protected _listener: Function;
|
||
protected _needClock: boolean;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 添加更新回调,自动执行dataUpdate成员函数执行更新(当位置绑定对象时,会自动添加此回调)
|
||
* @param b 当位置绑定关系取消时,是否继续保持此回调,执行dataUpdate成员函数
|
||
*/
|
||
addUpdateCallback(b?: boolean): void;
|
||
removeUpdateCallback(): void;
|
||
/**
|
||
* 更新回调(实现位置绑定)
|
||
*/
|
||
protected dataUpdate(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: string): void;
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
* 渲染工具对象
|
||
*/
|
||
class RenderUtils {
|
||
constructor();
|
||
static getPositions(value: Array<GeoPoint>): any[];
|
||
static getRadii(value: any): Cesium.Cartesian3;
|
||
static getRectangleDegress(value: any): Cesium.Rectangle;
|
||
static getImage(value: any, transparent?: Boolean): Cesium.ImageMaterialProperty;
|
||
static getClassificationType(value: any): any;
|
||
static getShadows(value: any): any;
|
||
static getGranularity(value: any): number;
|
||
static getColor(value: any): Cesium.Color;
|
||
static getDynamicColor(value: String): Cesium.CallbackProperty;
|
||
static getDynamicValue(value: any): Cesium.CallbackProperty;
|
||
static getPosition(value: GeoPoint): Cesium.Cartesian3;
|
||
static getNearFarScalar(value: any): Cesium.NearFarScalar;
|
||
static getDynamicNearFarScalar(value: any): Cesium.CallbackProperty;
|
||
static getDistanceDisplayCondition(value: any): Cesium.DistanceDisplayCondition;
|
||
static getDynamicDistanceDisplayCondition(value: any): Cesium.CallbackProperty;
|
||
static getCartesian2(value: any): Cesium.Cartesian2;
|
||
static getVerticalOrigin(str: any): any;
|
||
/**
|
||
* 水平对齐方式
|
||
*/
|
||
static getHorizontalOrigin(str: any): any;
|
||
static getHeightReference(str: any): any;
|
||
static getStyle(value: any): number;
|
||
static getPositionDegrees(value: any): Cesium.Cartesian3;
|
||
static getCartesian3(value: any): Cesium.Cartesian3;
|
||
static getOrientation(position: any, hpr: any): any;
|
||
static getHpr(heading: any, pitch: any, roll: any): Cesium.HeadingPitchRoll;
|
||
static getHeading(value: any): number;
|
||
}
|
||
|
||
class ScanEffect extends RenderPositionObject {
|
||
private polygonAppearance;
|
||
private polylineAppearance;
|
||
private polygonGeometry;
|
||
private polylineGeometry;
|
||
private polygonPrimitive;
|
||
private polylinePrimitive;
|
||
private angle;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
protected dataUpdate(): void;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 创建网格体
|
||
*/
|
||
private createGeometry;
|
||
/**
|
||
* 创建材质
|
||
*/
|
||
private createAppearence;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 片源着色器方法
|
||
*/
|
||
private getMS;
|
||
private createGeometryMatrix;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class ScreenTextRender extends RenderObject {
|
||
private _originProps;
|
||
private _resProps;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
readonly renderType: RenderTypeEnum;
|
||
init(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
private _dealResProps;
|
||
getHtmlText(): any;
|
||
updateAttributeForEditing(): void;
|
||
private _updateAllProp;
|
||
}
|
||
|
||
class SectorSensor extends RenderObject {
|
||
private _geometry;
|
||
private _appearance;
|
||
private _radius;
|
||
readonly renderType: RenderTypeEnum;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
listenerFun: () => void;
|
||
update(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**
|
||
* 创建attribute
|
||
*/
|
||
private createGeometeryAttribute;
|
||
/**
|
||
* 创建网格体
|
||
* @param postionsTemp 顶点数据
|
||
* @param stsTemp 纹理数据
|
||
*/
|
||
private createGrometry;
|
||
/**
|
||
* 创建材质
|
||
*/
|
||
private createMaterial;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 创建变换矩阵
|
||
*/
|
||
private createGeometryMatrix;
|
||
clear(): void;
|
||
}
|
||
|
||
class SensorRender extends RenderPositionObject {
|
||
dataOptions: any;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
update(): void;
|
||
}
|
||
|
||
class SpreadCircleClampRender extends SpreadCircleRender {
|
||
private _animation;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
protected clampToGround(): boolean;
|
||
protected onViewChanged(): void;
|
||
protected dataUpdate(): void;
|
||
/**
|
||
* 动画函数
|
||
*/
|
||
private animate;
|
||
/**
|
||
* 获取材质片元着色器
|
||
*/
|
||
protected getMaterialFS(): string;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**
|
||
* 删除
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
class SpreadCircleLineRender extends SpreadCircleRender {
|
||
private _renderType;
|
||
private _animation;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
protected clampToGround(): boolean;
|
||
protected onViewChanged(): void;
|
||
protected dataUpdate(): void;
|
||
/**
|
||
* 动画函数
|
||
*/
|
||
private animate;
|
||
/**
|
||
* 材质片元着色器
|
||
*/
|
||
protected getMaterialFS(): any;
|
||
protected getMultipleFs(): string;
|
||
protected getSingleFs(): string;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**
|
||
* 删除
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
class SpreadCircleRampRender extends SpreadCircleRender {
|
||
private _animation;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
protected clampToGround(): boolean;
|
||
protected onViewChanged(): void;
|
||
protected dataUpdate(): void;
|
||
/**
|
||
* 动画函数
|
||
*/
|
||
private animate;
|
||
protected getMaterial(): Cesium.Material;
|
||
/**
|
||
* 获取片源着色器
|
||
*/
|
||
protected getMaterialFS(): string;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**
|
||
* 删除
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
* 各类扩散圆的绘制虚基类
|
||
* 子类:SpreadCircleLineRender
|
||
* 子类:SpreadCircleClampRender
|
||
* 子类:SpreadCircleRampRender
|
||
* 子类:SpreadCircleRingRender
|
||
*/
|
||
class SpreadCircleRender extends RenderPositionObject {
|
||
protected _duration: number;
|
||
private _buildGeometry;
|
||
private _viewChange;
|
||
protected _offset: Cesium.Cartesian3;
|
||
protected _appearance: Cesium.Appearance;
|
||
protected _groundPrimitive: Cesium.GroundPrimitive;
|
||
protected _primitive: Cesium.Primitive;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
protected onViewChanged(): void;
|
||
/**
|
||
* 获取类型
|
||
* @readonly
|
||
* @type {RenderTypeEnum}
|
||
*/
|
||
readonly renderType: RenderTypeEnum;
|
||
protected clampToGround(): boolean;
|
||
/**
|
||
* 获取材质的片元着色器,若子类不重写getMaterial函数,则子类需要实现此函数
|
||
*/
|
||
protected getMaterialFS(): string;
|
||
/**
|
||
* 创建材质对象,子类可以重写
|
||
*/
|
||
protected getMaterial(): Cesium.Material;
|
||
/**
|
||
* 创建Appearence
|
||
*/
|
||
protected createAppearence(): void;
|
||
private getFS;
|
||
private getVS;
|
||
protected getMatrix(): Cesium.Matrix4;
|
||
protected createGeometry3D(): Cesium.Geometry;
|
||
protected createPolygonGeometry(): any;
|
||
/**
|
||
* 创建二维视图下几何体
|
||
*/
|
||
protected createGeometry2D(): Cesium.Geometry;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
protected createPrimitive(clamp: boolean): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**
|
||
* 删除
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
class SpreadCircleRingRender extends SpreadCircleRender {
|
||
private _renderType;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
protected onViewChanged(): void;
|
||
/**
|
||
* 帧回调
|
||
*/
|
||
protected dataUpdate(): void;
|
||
protected getMaterial(): Cesium.Material;
|
||
/**
|
||
* 着色器代码段
|
||
*/
|
||
private getSolidFs;
|
||
/**
|
||
* 获取片源着色器
|
||
*/
|
||
protected getRampFs(): string;
|
||
/**
|
||
* 着色器代码段
|
||
*/
|
||
private getStripFs;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**
|
||
* 删除
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
class SpreadEffect extends RenderPositionObject {
|
||
/**位置 */
|
||
private position;
|
||
/**半径 */
|
||
private radius;
|
||
/**颜色 */
|
||
private spreadColor;
|
||
/**网格体 */
|
||
private spreadGeometry;
|
||
/**材质 */
|
||
private spreadAppearance;
|
||
private scale;
|
||
private speed;
|
||
readonly renderType: RenderTypeEnum;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
protected dataUpdate(): void;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 创建网格体
|
||
*/
|
||
private createGeometry;
|
||
private createGeometryMatrix;
|
||
/**
|
||
* 创建材质
|
||
*/
|
||
private createAppearence;
|
||
/**
|
||
* 片源着色器方法
|
||
*/
|
||
private getMS;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class TriangleMesh extends RenderObject {
|
||
_indices: number[];
|
||
readonly renderType: RenderTypeEnum;
|
||
_triPrimitive: any;
|
||
_viewer: any;
|
||
_points: Array<number>;
|
||
_color: string;
|
||
init(): void;
|
||
create(): void;
|
||
formatData(): {
|
||
points: number[];
|
||
indices: number[];
|
||
colors: Float32Array;
|
||
};
|
||
/**
|
||
*
|
||
* @param {*} inputs // minX,minY,maxX,maxY,png[string/url]
|
||
* @param {*} callback // instance obj
|
||
*/
|
||
draw_triangles(inputs: any, callback: any): void;
|
||
getVS(): string;
|
||
getFS(): string;
|
||
createAppearance(): Cesium.Appearance;
|
||
clear(): void;
|
||
update(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
}
|
||
|
||
class TruncatedConeParticleRender extends RenderPositionObject {
|
||
private _appearance1;
|
||
private _appearance2;
|
||
private _appearance3;
|
||
private _buildGeometry;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 获取类型
|
||
* @readonly
|
||
* @type {RenderTypeEnum}
|
||
*/
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
private createCirclesImage;
|
||
private createConeImage;
|
||
protected createAppearence(): void;
|
||
protected createPrimitive(): void;
|
||
private createParticleGeometry;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class TruncatedConeRender extends RenderPositionObject {
|
||
private _appearance1;
|
||
private _appearance2;
|
||
private _appearance3;
|
||
private _buildGeometry;
|
||
constructor(item: GraphicItem, renderRoot: GraphicLayer);
|
||
/**
|
||
* 获取类型
|
||
* @readonly
|
||
* @type {RenderTypeEnum}
|
||
*/
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
protected dataUpdate(): void;
|
||
private createPartOneImage;
|
||
private createPartTwoImage;
|
||
private createPartThreeImage;
|
||
protected createAppearence(): void;
|
||
protected createPrimitive(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
}
|
||
|
||
class WaterEffect extends RenderObject {
|
||
private _fragmentShader;
|
||
private _appearance;
|
||
private _geometry;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 修改片源着色器
|
||
* @return {string} 片源着色器
|
||
*/
|
||
private fSWaterFace;
|
||
/**
|
||
* 创建材质
|
||
* @returns 材质
|
||
*/
|
||
private createAppearence;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
clear(): void;
|
||
/**
|
||
* 法向量图
|
||
* @return {string} 图片资源
|
||
*/
|
||
private normalMap;
|
||
}
|
||
|
||
class WaterFace extends RenderObject {
|
||
_pointsToCartographic: any;
|
||
_waterColor: any;
|
||
_refractColor: any;
|
||
_reflectColor: any;
|
||
_waveWidth: any;
|
||
_flowDirection: any;
|
||
_flowSpeed: any;
|
||
_normalTexture: any;
|
||
_m_startTime: any;
|
||
_reflectCamera: any;
|
||
_reflectPassState: any;
|
||
_initialized: Boolean;
|
||
_drawCommand: any;
|
||
_visible: Boolean;
|
||
_waterPolygon: any;
|
||
_zFactor: any;
|
||
_lonMin: any;
|
||
_latMin: any;
|
||
_waterCenterPos: any;
|
||
m_spNormalTexture: any;
|
||
_fScale: any;
|
||
invWorldViewMatrix: any;
|
||
modelMatrix: any;
|
||
modelViewMatrix: any;
|
||
modeiViewProjection: any;
|
||
_fElapse: any;
|
||
_frameTime: any;
|
||
_flowAngle: any;
|
||
_uniformMap: any;
|
||
_waterGeometry: any;
|
||
constructor(options: WaterFaceItem, renderRoot?: GraphicLayer);
|
||
init(): void;
|
||
updateAttribute(key: any): void;
|
||
readonly renderType: RenderTypeEnum;
|
||
waterPolygon: any;
|
||
waterColor: any;
|
||
flowSpeed: any;
|
||
flowDirection: any;
|
||
waveWidth: any;
|
||
visible: Boolean;
|
||
computeBoundingRectangle(): void;
|
||
initialize(framestate: any): void;
|
||
update(frameState: any): void;
|
||
updateReflectTexture(frameState: any): void;
|
||
renderColorTexture(frameState: any, passState: any, camera: any): void;
|
||
destroy(): void;
|
||
}
|
||
|
||
class WeatherParticle extends RenderObject {
|
||
private _rainVelocity;
|
||
private _snowVelocity;
|
||
private _weatherType;
|
||
readonly renderType: RenderTypeEnum;
|
||
/**
|
||
* 初始化方法
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 属性更新
|
||
*/
|
||
updateAttribute(attrName: any): void;
|
||
/**
|
||
* 创建粒子系统
|
||
* @returns
|
||
*/
|
||
private createParticle;
|
||
/**
|
||
* 创建雪的发生器矩阵
|
||
*/
|
||
private computeEmitterMatrix;
|
||
/**
|
||
* 更新函数
|
||
* @param {any} 粒子对象
|
||
*/
|
||
private updateParticle;
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
* @注意 用户不需要示例化
|
||
* @描述 线样式基类
|
||
*/
|
||
class BaseLineStyle {
|
||
protected _material: any;
|
||
/**
|
||
*@注意 内部实现使用
|
||
*序列化
|
||
*/
|
||
toJson(): void;
|
||
/**
|
||
* @注意 内部实现使用
|
||
*/
|
||
getMaterial(): any;
|
||
}
|
||
/**
|
||
* @注意 内部使用
|
||
* @描述 线样式构造器
|
||
*/
|
||
class LineStyle {
|
||
static createStyle(opt: any): ColorStyle | ArrowStyle | OutlineStyle | DashStyle | GlowStyle | DynamicStyle | TextureStyle;
|
||
}
|
||
/**
|
||
* 颜色样式
|
||
*/
|
||
class ColorStyle extends BaseLineStyle {
|
||
private _color;
|
||
constructor(any: any);
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: any;
|
||
/**
|
||
* @注意
|
||
*/
|
||
getMaterial(): any;
|
||
toJson(): {
|
||
type: PolylineStyleEnum;
|
||
color: string;
|
||
};
|
||
}
|
||
/**
|
||
* 箭头
|
||
*/
|
||
class ArrowStyle extends BaseLineStyle {
|
||
private _color;
|
||
constructor(any: any);
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: any;
|
||
/**
|
||
*@注意 内部实现使用
|
||
*序列化
|
||
*/
|
||
toJson(): {
|
||
type: PolylineStyleEnum;
|
||
color: string;
|
||
};
|
||
}
|
||
/**
|
||
* 外边框线
|
||
*/
|
||
class OutlineStyle extends BaseLineStyle {
|
||
private _color;
|
||
private _outlineWidth;
|
||
private _outlineColor;
|
||
constructor(any: any);
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 外边框宽度
|
||
*/
|
||
outlineWidth: number;
|
||
/**
|
||
* 外边框颜色
|
||
*/
|
||
outlineColor: string;
|
||
/**
|
||
*@注意 内部实现使用
|
||
*序列化
|
||
*/
|
||
toJson(): {
|
||
type: PolylineStyleEnum;
|
||
color: string;
|
||
outlineColor: string;
|
||
outlineWidth: number;
|
||
};
|
||
}
|
||
/**
|
||
* 虚线
|
||
*/
|
||
class DashStyle extends BaseLineStyle {
|
||
private _color;
|
||
private _gapColor;
|
||
private _dashLength;
|
||
private _dashPattern;
|
||
constructor(any: any);
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 中间颜色
|
||
*/
|
||
gapColor: string;
|
||
/**
|
||
* pixel中的虚线模式的长度
|
||
*/
|
||
dashLength: number;
|
||
/**
|
||
* 短划线16位模式
|
||
*/
|
||
dashPattern: number;
|
||
/**
|
||
*@注意 内部实现使用
|
||
*序列化
|
||
*/
|
||
toJson(): {
|
||
type: PolylineStyleEnum;
|
||
color: string;
|
||
gapColor: string;
|
||
dashPattern: number;
|
||
dashLength: number;
|
||
};
|
||
}
|
||
/**
|
||
* 发光线
|
||
*/
|
||
class GlowStyle extends BaseLineStyle {
|
||
private _color;
|
||
private _glowPower;
|
||
private _taperPower;
|
||
constructor(any: any);
|
||
/**
|
||
* 颜色值
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 发光强度占总线宽的百分比
|
||
*/
|
||
glowPower: number;
|
||
/**
|
||
* 指定逐渐减小效果的强度,以总线长度的百分比表示。如果为1.0或更高,则不使用锥度效果。
|
||
*/
|
||
taperPower: number;
|
||
/**
|
||
*@注意 内部实现使用
|
||
*序列化
|
||
*/
|
||
toJson(): {
|
||
type: PolylineStyleEnum;
|
||
color: string;
|
||
taperPower: number;
|
||
glowPower: number;
|
||
};
|
||
}
|
||
/**
|
||
* 动态线
|
||
*/
|
||
class DynamicStyle extends BaseLineStyle {
|
||
private _icon;
|
||
private _color;
|
||
private _duration;
|
||
private _update;
|
||
constructor(any: any);
|
||
private _updateMaterial;
|
||
/**
|
||
*@注意 内部实现使用
|
||
*序列化
|
||
*/
|
||
setUpdate(value: any): void;
|
||
/**
|
||
* 动态线的图案
|
||
*/
|
||
icon: DynamicIconEnum;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 跟新周期(渲染多少次执行一次渲染)
|
||
*/
|
||
duration: number;
|
||
/**
|
||
*@注意 内部实现使用
|
||
*序列化
|
||
*/
|
||
toJson(): {
|
||
type: PolylineStyleEnum;
|
||
icon: DynamicIconEnum;
|
||
color: string;
|
||
duration: number;
|
||
};
|
||
}
|
||
class TextureStyle extends BaseLineStyle {
|
||
private _icon;
|
||
private _color;
|
||
private _revert;
|
||
private _dynamic;
|
||
private _speed;
|
||
private _update;
|
||
constructor(any: any);
|
||
private _updateMaterial;
|
||
/**
|
||
*@注意 内部实现使用
|
||
*序列化
|
||
*/
|
||
setUpdate(value: any): void;
|
||
/**
|
||
* 线的图案
|
||
*/
|
||
icon: TextureIconEnum;
|
||
/**
|
||
* 纹理是否动态偏移(流动效果,默认:false)
|
||
*/
|
||
dynamic: boolean;
|
||
/**
|
||
* 纹理偏移速度(流动效果独有,默认:1.0)
|
||
*/
|
||
speed: number;
|
||
/**
|
||
* 颜色
|
||
*/
|
||
color: string;
|
||
/**
|
||
*@注意 内部实现使用
|
||
*序列化
|
||
*/
|
||
toJson(): {
|
||
type: PolylineStyleEnum;
|
||
icon: TextureIconEnum;
|
||
color: string;
|
||
};
|
||
}
|
||
/**
|
||
* 动态线图案枚举
|
||
*/
|
||
enum DynamicIconEnum {
|
||
Arrow = "arrow",
|
||
Pulse = "pulse",
|
||
Trail = "trail",
|
||
Attack = "attack"
|
||
}
|
||
/**
|
||
* 纹理线图片枚举
|
||
*/
|
||
enum TextureIconEnum {
|
||
/**
|
||
* 铁丝网
|
||
*/
|
||
WireNetting = "WireNetting",
|
||
/**
|
||
* 铁栅栏
|
||
*/
|
||
IronBar = "IronBar",
|
||
/**
|
||
* 脉冲线
|
||
*/
|
||
LinkPulse = "LinkPulse"
|
||
}
|
||
/**
|
||
* 线样式枚举
|
||
*/
|
||
enum PolylineStyleEnum {
|
||
/**
|
||
* 颜色
|
||
*/
|
||
Color = "Color",
|
||
/**
|
||
* 箭头
|
||
*/
|
||
Arrow = "PolylineArrow",
|
||
/**
|
||
* 虚线
|
||
*/
|
||
Dash = "PolylineDash",
|
||
/**
|
||
* 发光线
|
||
*/
|
||
Glow = "PolylineGlow",
|
||
/**
|
||
* 边框线
|
||
*/
|
||
Outline = "PolylineOutline",
|
||
/**
|
||
* 动态线
|
||
*/
|
||
Dynamic = "Dynamic",
|
||
/**
|
||
* 纹理线,线条由图片自适应重复贴图
|
||
*/
|
||
Texture = "Texture"
|
||
}
|
||
|
||
class PipelineManager extends Layer {
|
||
protected _viewer: Cesium.Viewer;
|
||
protected _graphicLayer: GraphicLayer;
|
||
protected _itemList: Array<PipelineBaseGraphic>;
|
||
protected _topoList: Array<TopologyNode>;
|
||
protected _idNum: number;
|
||
protected _cameraControl: FirstPersonControl;
|
||
constructor(viewer: Cesium.Viewer, layer: GraphicLayer);
|
||
private deleteGraphicLine;
|
||
private searchTopoNode;
|
||
private updateTopoNode;
|
||
private copyLine;
|
||
private processBreakupByPoint;
|
||
private processBreakup;
|
||
private processHead;
|
||
private processTail;
|
||
/**
|
||
* 两条管道计算拓扑关系
|
||
* @param item
|
||
* @param ohter
|
||
*/
|
||
private building;
|
||
/**
|
||
* 针对单条管道构建与之相关的拓扑关系
|
||
* @param item 构建拓扑的管道
|
||
*/
|
||
buildTopologySingle(item: PipelineStripGraphic): void;
|
||
/**
|
||
* 所有管道构建拓扑关系
|
||
* @param needClear 是否清除已有的拓扑关系(默认:false), true:表示在原有的拓扑关系上更新/新增
|
||
*/
|
||
buildTopology(needClear?: boolean): void;
|
||
/**
|
||
* 清除所有拓扑关系
|
||
*/
|
||
clearTopology(): void;
|
||
/**
|
||
* 更新绘制所有拓扑节点
|
||
*/
|
||
updatePipeTurnGraphic(): void;
|
||
flyToPipeline(line: PipelineStripGraphic): void;
|
||
exitFly(): void;
|
||
}
|
||
|
||
/**
|
||
* 拓扑节点类
|
||
*/
|
||
class TopologyNode {
|
||
protected _graphicLayer: GraphicLayer;
|
||
protected _id: any;
|
||
protected _geo: GeoPoint;
|
||
protected _position: Cesium.Cartesian3;
|
||
protected _lines: Array<PipelineStripGraphic>;
|
||
protected _isHeads: Array<boolean>;
|
||
protected _graphic: PipelineTurnGraphic;
|
||
constructor(id: number, layer: GraphicLayer, pt: GeoPoint);
|
||
readonly id: any;
|
||
readonly geo: GeoPoint;
|
||
readonly pos: Cesium.Cartesian3;
|
||
readonly graphic: PipelineTurnGraphic;
|
||
getTopoLines(): PipelineStripGraphic[];
|
||
getIsHeads(): boolean[];
|
||
/**
|
||
* 判断拓扑节点是否包含(连结)此线条
|
||
* @param item 被判断的线条
|
||
*/
|
||
has(item: PipelineStripGraphic): boolean;
|
||
/**
|
||
* 线段添加拓扑关系
|
||
* @param item 被添加拓扑关系的线段对象
|
||
* @param isHead 是否为线段首点(false表示尾点)
|
||
*/
|
||
addTopoLine(item: PipelineStripGraphic, isHead: boolean): void;
|
||
/**
|
||
* 线段移除拓扑关系
|
||
* @param item 被移除拓扑关系的线段对象
|
||
* @param isHead 是否为线段首点(false表示尾点)
|
||
*/
|
||
removeTopoLine(item: PipelineStripGraphic, isHead: boolean): void;
|
||
/**
|
||
* 恢复线段顶点数据(因拓扑节点绘制导致的线段顶点内缩)
|
||
* @param item 被恢复的线段对象
|
||
* @param isHead 是否为线段首点(false表示尾点)
|
||
*/
|
||
recovery(item: PipelineStripGraphic, isHead: boolean): void;
|
||
/**
|
||
* 清除拓扑节点的绘制
|
||
*/
|
||
clear(): void;
|
||
/**
|
||
* 创建或者更新拓扑点部位的绘制渲染
|
||
*/
|
||
createOrUpdateGraphic(): void;
|
||
private createTurnTwo;
|
||
private updateTurnTwo;
|
||
private createTurnThree;
|
||
private updateTurnThree;
|
||
}
|
||
|
||
/**
|
||
* UrlTemplate影像
|
||
*/
|
||
class ArcGisImagery extends ImageryItem {
|
||
private _renderObj;
|
||
private _imageLayer;
|
||
private _option;
|
||
protected _type: string;
|
||
constructor(option: ArcGisImageryOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
static readonly type: string;
|
||
initItem(imageLayer: ImageLayer): void;
|
||
destroyItem(): void;
|
||
getRenderObject(): Cesium.ImageryLayer;
|
||
parseOption(option: any): void;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 解析json对象
|
||
*/
|
||
parseJson(option: any): void;
|
||
}
|
||
class ArcGisImageryOpt {
|
||
/**
|
||
* 影像路径
|
||
*/
|
||
url: string;
|
||
}
|
||
|
||
/**
|
||
* @类型 Cesium扩展类
|
||
* @描述 百度地图数据驱动类
|
||
* @see <a href='../../../examples/gallery/editor.html#baiduImagery'>示例</a>
|
||
*/
|
||
class BaiduImageryProvider {
|
||
private _errorEvent;
|
||
private _tileWidth;
|
||
private _tileHeight;
|
||
private _maximumLevel;
|
||
private _minimumLevel;
|
||
private _tilingScheme;
|
||
private _rectangle;
|
||
private _tileDiscardPolicy;
|
||
private _credit;
|
||
private _readyPromise;
|
||
private _resource;
|
||
constructor(options: any);
|
||
private readonly url;
|
||
private readonly proxy;
|
||
private readonly tileWidth;
|
||
private readonly tileHeight;
|
||
private readonly maximumLevel;
|
||
private readonly minimumLevel;
|
||
private readonly tilingScheme;
|
||
private readonly tileDiscardPolicy;
|
||
private readonly rectangle;
|
||
private readonly errorEvent;
|
||
private readonly ready;
|
||
private readonly readyPromise;
|
||
private readonly credit;
|
||
private requestImage;
|
||
}
|
||
|
||
/**
|
||
* UrlTemplate影像
|
||
*/
|
||
class BingImagery extends ImageryItem {
|
||
private _renderObj;
|
||
private _imageLayer;
|
||
private _option;
|
||
private _type;
|
||
constructor(option: BingImageryOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
static readonly type: string;
|
||
initItem(imageLayer: ImageLayer): void;
|
||
destroyItem(): void;
|
||
getRenderObject(): Cesium.ImageryLayer;
|
||
parseOption(option: any): void;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 解析json对象
|
||
*/
|
||
parseJson(option: any): void;
|
||
}
|
||
class BingImageryOpt {
|
||
/**
|
||
* 影像路径
|
||
*/
|
||
url: string;
|
||
/**
|
||
* 影像路径
|
||
*/
|
||
key: string;
|
||
}
|
||
|
||
class ImageLayer extends Layer {
|
||
_viewer: Cesium.Viewer;
|
||
_renderItemList: any[];
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**
|
||
* 添加对象
|
||
* @param item
|
||
*/
|
||
add(item: Item): Item;
|
||
/**
|
||
* 删除对象
|
||
* @param
|
||
*/
|
||
remove(itemid: string): Item;
|
||
/**
|
||
* 下降一层如果当前是最底层将不再下降
|
||
* @param image 需要操作的影像对象
|
||
*/
|
||
lower(image: ImageryItem): void;
|
||
/**
|
||
* 降至最底层
|
||
* @param image 需要操作的影像对象
|
||
*/
|
||
lowerToBottom(image: ImageryItem): void;
|
||
/**
|
||
* 上升一层
|
||
* @param image 需要操作的影像对象
|
||
*/
|
||
raise(image: ImageryItem): void;
|
||
/**
|
||
* 上升到最顶层
|
||
* @param image 需要操作的影像对象
|
||
*/
|
||
raiseToTop(image: ImageryItem): void;
|
||
/**
|
||
* 解析json
|
||
* @param json 解析
|
||
*/
|
||
parseJson(json: any): void;
|
||
getItemList(): Item[];
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): Cesium.ImageryLayerCollection;
|
||
getRenderItemById(id: string): any;
|
||
}
|
||
/**
|
||
* 投影方式
|
||
*/
|
||
enum TilingSchemeE {
|
||
/**
|
||
* web墨卡托投影
|
||
*/
|
||
WebMercator = 1,
|
||
/**
|
||
* Wgs84投影
|
||
*/
|
||
Geographic = 2
|
||
}
|
||
/**
|
||
* 投影方式
|
||
*/
|
||
class TilingSchemeParse {
|
||
static getTilingScheme(e: TilingSchemeE): Cesium.TilingScheme;
|
||
}
|
||
|
||
class ImageryItem extends Item {
|
||
getRenderObject(): Cesium.ImageryLayer;
|
||
}
|
||
|
||
/**
|
||
* OSM影像
|
||
*/
|
||
class OSMImagery extends ImageryItem {
|
||
private _renderObj;
|
||
private _imageLayer;
|
||
private _option;
|
||
private _type;
|
||
constructor(option: OSMImageryOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
static readonly type: string;
|
||
initItem(imageLayer: ImageLayer): void;
|
||
destroyItem(): void;
|
||
getRenderObject(): Cesium.ImageryLayer;
|
||
parseOption(option: any): void;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 解析json对象
|
||
*/
|
||
parseJson(option: any): void;
|
||
}
|
||
class OSMImageryOpt {
|
||
/**
|
||
* 影像路径
|
||
*/
|
||
url: string;
|
||
/**
|
||
* 最大层级
|
||
*/
|
||
maximumLevel: number;
|
||
}
|
||
|
||
/**
|
||
* UrlTemplate影像
|
||
*/
|
||
class UrlTemplateImagery extends ImageryItem {
|
||
private _renderObj;
|
||
private _imageLayer;
|
||
private _option;
|
||
private _type;
|
||
constructor(option: UrlTemplateImageryOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
static readonly type: string;
|
||
initItem(imageLayer: ImageLayer): void;
|
||
destroyItem(): void;
|
||
getRenderObject(): Cesium.ImageryLayer;
|
||
parseOption(option: any): void;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 解析json对象
|
||
*/
|
||
parseJson(option: any): void;
|
||
}
|
||
class UrlTemplateImageryOpt {
|
||
/**
|
||
* 影像路径
|
||
*/
|
||
url: string;
|
||
/**
|
||
* 影像投影方式
|
||
*/
|
||
tilingScheme: TilingSchemeE;
|
||
/**
|
||
* 最大层级
|
||
*/
|
||
maximumLevel: number;
|
||
}
|
||
|
||
/**
|
||
* UrlTemplate影像
|
||
*/
|
||
class WMSImagery extends ImageryItem {
|
||
private _renderObj;
|
||
private _imageLayer;
|
||
private _option;
|
||
private _type;
|
||
constructor(option: WMSImageryOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
static readonly type: string;
|
||
initItem(imageLayer: ImageLayer): void;
|
||
destroyItem(): void;
|
||
getRenderObject(): Cesium.ImageryLayer;
|
||
parseOption(option: any): void;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 解析json对象
|
||
*/
|
||
parseJson(option: any): void;
|
||
}
|
||
class WMSImageryOpt {
|
||
/**
|
||
* 影像路径
|
||
*/
|
||
url: string;
|
||
/**
|
||
* 影像图层
|
||
*/
|
||
layer: string;
|
||
/**
|
||
* 影像投影方式
|
||
*/
|
||
tilingScheme: TilingSchemeE;
|
||
/**
|
||
* 样式
|
||
*/
|
||
style: string;
|
||
/**
|
||
* 影像格式
|
||
*/
|
||
format: string;
|
||
/**
|
||
* 影像变换
|
||
*/
|
||
tileMatrixSetID: string;
|
||
}
|
||
|
||
/**
|
||
* UrlTemplate影像
|
||
*/
|
||
class WMTSImagery extends ImageryItem {
|
||
private _renderObj;
|
||
private _imageLayer;
|
||
private _option;
|
||
private _type;
|
||
constructor(option: WMTSImageryOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
static readonly type: string;
|
||
initItem(imageLayer: ImageLayer): void;
|
||
private _parseUrl;
|
||
destroyItem(): void;
|
||
getRenderObject(): Cesium.ImageryLayer;
|
||
parseOption(option: any): void;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 解析json对象
|
||
*/
|
||
parseJson(option: any): void;
|
||
}
|
||
class WMTSImageryOpt {
|
||
/**
|
||
* 影像路径
|
||
*/
|
||
url: string;
|
||
/**
|
||
* 影像图层
|
||
*/
|
||
layer: string;
|
||
/**
|
||
* 影像投影方式
|
||
*/
|
||
tilingScheme: TilingSchemeE;
|
||
/**
|
||
* 样式
|
||
*/
|
||
style: string;
|
||
/**
|
||
* 影像格式
|
||
*/
|
||
format: string;
|
||
/**
|
||
* 影像变换
|
||
*/
|
||
tileMatrixSetID: "EPSG:4326";
|
||
}
|
||
|
||
/**
|
||
* 图层管理
|
||
*/
|
||
class LayerManager {
|
||
private _graphicLayer;
|
||
private _ImageLayer;
|
||
private _vectorLayer;
|
||
private _modelLayer;
|
||
private _massiveLayer;
|
||
private _targetLayer;
|
||
private _terrainLayers;
|
||
private _satelliteLayer;
|
||
private _tileLayer;
|
||
private _actionLayer;
|
||
private _viewer;
|
||
constructor(viewer: Cesium.Viewer);
|
||
init(): void;
|
||
toJson(): {
|
||
graphicLayer: object;
|
||
imageLayer: any[];
|
||
vectorLayer: any[];
|
||
modelLayer: any[];
|
||
actionLayer: {
|
||
baseTime: string;
|
||
actionGroups: any[];
|
||
graphics: object;
|
||
} | {
|
||
baseTime: string;
|
||
actionGroups: any[];
|
||
graphics?: undefined;
|
||
};
|
||
};
|
||
/**
|
||
* 解析json
|
||
* @param json 解析
|
||
*/
|
||
parseJson(json: any): void;
|
||
/**
|
||
* 标绘图层
|
||
*/
|
||
readonly graphicLayer: GraphicLayer;
|
||
/**
|
||
* 影像图层
|
||
*/
|
||
readonly imageLayer: ImageLayer;
|
||
/**
|
||
* kml kmz geojson矢量图层
|
||
*/
|
||
readonly vectorLayer: VectorLayer;
|
||
/**
|
||
* 3dtiles 图层
|
||
*/
|
||
readonly modelLayer: ModelLayer;
|
||
/**
|
||
* 高效绘制图层
|
||
*/
|
||
readonly massiveLayer: MassiveLayer;
|
||
/**
|
||
* 目标图层
|
||
*/
|
||
readonly targetLayer: TargetLayer;
|
||
/**
|
||
* 地形图层
|
||
*/
|
||
readonly terrainLayers: TerrainLayerCollection;
|
||
/**
|
||
* 卫星图层
|
||
*/
|
||
readonly satelliteLayer: SatelliteLayer;
|
||
/**
|
||
* 瓦片图层
|
||
*/
|
||
readonly tileLayer: TileLayer;
|
||
/**
|
||
* 动画图层
|
||
*/
|
||
readonly actionLayer: ActionLayer;
|
||
}
|
||
|
||
/**
|
||
* @类别 需要用户创建的类 <br>
|
||
* @描述 聚合点 <br>
|
||
* @see <a href='../../../examples/gallery/editor.html#cluster'>聚合点</a>
|
||
*/
|
||
class Cluster extends Item {
|
||
private _customDataSource;
|
||
private _viewer;
|
||
private _options;
|
||
private _dataSource;
|
||
private _customStyleListener;
|
||
private _customStyleEnable;
|
||
/**
|
||
* 是否开启自定义样式
|
||
* ```
|
||
* 示例代码:
|
||
* cluster.addToEarth().then(()=>{
|
||
* // 设置参数
|
||
* cluster.customStyleEnable = true;
|
||
* })
|
||
* ```
|
||
*/
|
||
customStyleEnable: boolean;
|
||
private _pixelRange;
|
||
/**
|
||
* 设置像素范围
|
||
* ```
|
||
* 示例代码:
|
||
* cluster.addToEarth().then(()=>{
|
||
* // 设置参数
|
||
* cluster.pixelRange = 20;
|
||
* })
|
||
* ```
|
||
*/
|
||
pixelRange: number;
|
||
private _minimumClusterSize;
|
||
/**
|
||
* 最小聚合数量
|
||
* ```
|
||
* 示例代码:
|
||
* cluster.addToEarth().then(()=>{
|
||
* // 设置参数
|
||
* cluster.minimumClusterSize = 30;
|
||
* })
|
||
* ```
|
||
*/
|
||
minimumClusterSize: number;
|
||
private _enable;
|
||
/**
|
||
* 是否开启聚合
|
||
* ```
|
||
* 示例代码:
|
||
* cluster.addToEarth().then(()=>{
|
||
* // 设置参数
|
||
* cluster.enable = true;
|
||
* })
|
||
* ```
|
||
*/
|
||
enable: boolean;
|
||
/**
|
||
* 聚合点构造函数
|
||
* @param options 聚合点参数对象
|
||
* ```
|
||
* 示例代码
|
||
* var clusterOpt = new GV.ClusterOpt();
|
||
* clusterOpt.name = "cluster";
|
||
* clusterOpt.pixelRange = 10;
|
||
* clusterOpt.minimumClusterSize = 5;
|
||
* clusterOpt.enable = true;
|
||
* clusterOpt.customStyleEnable = true;
|
||
* clusterOpt.setImage = setImage;
|
||
* var cluster = new GV.Cluster(clusterOpt);
|
||
* ```
|
||
*/
|
||
constructor(options: ClusterOpt);
|
||
/**
|
||
* 初始化聚合点
|
||
* @param viewer 地理画布
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 销毁聚合点
|
||
*/
|
||
destroyItem(): void;
|
||
/**
|
||
* 序列化
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 反序列化
|
||
*/
|
||
parseJson(): void;
|
||
/**
|
||
* 添加实体
|
||
* @param {Cesium.Entity} entity
|
||
*/
|
||
addPoint(entity: any): void;
|
||
/**
|
||
* 将点集合添加到球上,异步方法
|
||
*/
|
||
addToEarth(): Promise<void>;
|
||
private _customStyleOpen;
|
||
private _resetStyle;
|
||
private _cluster;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
}
|
||
/**
|
||
* 聚合类参数
|
||
*/
|
||
class ClusterOpt {
|
||
/**
|
||
* 名称
|
||
*/
|
||
name: string;
|
||
/**
|
||
* id
|
||
*/
|
||
id: string;
|
||
/**
|
||
* 像素范围,点之间的距离到达此像素大小时 进行聚合
|
||
*/
|
||
pixelRange: number;
|
||
/**
|
||
* 最小聚合数量
|
||
*/
|
||
minimumClusterSize: number;
|
||
/**
|
||
* 开启聚合
|
||
*/
|
||
enable: boolean;
|
||
/**
|
||
* 开启自定义 样式
|
||
*/
|
||
customStyleEnable: boolean;
|
||
/**
|
||
* 设置聚合图标(该方法有两个参数:size 聚合点数量,billboard 聚合标牌)
|
||
*/
|
||
setImage: Function;
|
||
}
|
||
|
||
/**
|
||
* @类别 需要用户创建的类</br>
|
||
* @描述 热力图</br>
|
||
* @see <a href='../../../examples/gallery/editor.html#heatMap'>热力图</a>
|
||
*/
|
||
class HeatMap {
|
||
private _viewer;
|
||
private _heatMapOption;
|
||
private _heatMapLayer;
|
||
private _zoomLevel;
|
||
private _zoomRadius;
|
||
private _zAxisHeight;
|
||
private _heatMapParams;
|
||
private _moveEnd;
|
||
private _radiusRate;
|
||
private _rejustHeight;
|
||
constructor(heatOpt: HeatMapOpt);
|
||
private _calcBound;
|
||
private _formatPoints;
|
||
private _updateFllowCamera;
|
||
/**
|
||
* 初始化
|
||
* @param viewer
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 获取热力图参数信息
|
||
*/
|
||
getHeatMapOpt(): any;
|
||
/**
|
||
*设置精细层级时的热力点半径,用来调整在高层级时半径过小或者过大的问题
|
||
*/
|
||
setRadiusRate(val: number): void;
|
||
/**
|
||
*设置精细层级时高度
|
||
*/
|
||
setRejustHeight(val: number): void;
|
||
/**
|
||
* 热力图更新
|
||
* @param opt
|
||
*/
|
||
update(opt: HeatMapOpt): void;
|
||
/**
|
||
* 创建热力图
|
||
* @param opt
|
||
*/
|
||
private _create;
|
||
/**
|
||
* 销毁热力图
|
||
*/
|
||
destroyItem(): void;
|
||
}
|
||
/**
|
||
* @类别 需要用户创建的类 </br>
|
||
* @描述 热力图参数类 </br>
|
||
* @see <a href='../../../examples/gallery/editor.html#heatMap'>热力图</a>
|
||
*/
|
||
class HeatMapOpt {
|
||
/**
|
||
* 热力点数据集 </br>
|
||
* 参数格式:[{经度:数字,纬度:数字,此位置上的数据值:数字}...] </br>
|
||
* 如:{lon:80,lat:40,value:90}
|
||
*/
|
||
points: any;
|
||
/**
|
||
* 每个数据点将具有的半径 </br>
|
||
* 默认值:10 </br>
|
||
* 范围:>0 && <=100
|
||
*/
|
||
radius: number;
|
||
/**
|
||
* 数据集下限
|
||
*/
|
||
limitMin: number;
|
||
/**
|
||
* 数据集上限
|
||
*/
|
||
limitMax: number;
|
||
/**
|
||
* 表示渐变的对象(语法:数字字符串[0,1]:颜色字符串) </br>
|
||
* 如:{ 0.25: "rgb(0,0,255)", 0.55: "rgb(0,255,0)", 0.85: "yellow", 1.0: "rgb(255,0,0)" }
|
||
*/
|
||
gradient: object;
|
||
/**
|
||
* 热图中最高值的最大不透明度。(如果设置了不透明度,将被覆盖) </br>
|
||
* 范围:>=0 && <=1
|
||
*/
|
||
opacity: number;
|
||
/**
|
||
* 将应用于所有数据点的模糊因子。模糊因子越高,渐变越平滑 </br>
|
||
* 范围:>=0 && <= 1
|
||
*/
|
||
blur: number;
|
||
constructor(points: any, radius: number, limitMin: number, limitMax: number, gradient?: object, opacity?: number, blur?: number);
|
||
}
|
||
|
||
/**
|
||
* @类别 需要用户创建的类</br>
|
||
* @描述 MapV复合可视化,搭建了球和MapV之间的桥梁,具体MapV应用请参见MapV官网(https://mapv.baidu.com/)</br>
|
||
* @see <a href='../../../examples/gallery/editor.html#honeyComb'>蜂巢网格</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#migrate'>迁徙图</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#weiboPoint'>微博点</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#migrateAll'>数据链路</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#square'>方形网格</a>
|
||
*/
|
||
class MapV extends Item {
|
||
protected _MapV: any;
|
||
protected _viewer: any;
|
||
private _show;
|
||
private _MapVOptions;
|
||
/**
|
||
* 圆柱标绘类型
|
||
*/
|
||
protected _type: string;
|
||
constructor(mapvOpt: MapVOpt);
|
||
show: boolean;
|
||
/**
|
||
* 初始化mapv
|
||
* @param viewer
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 销毁mapv
|
||
*/
|
||
destroyItem(): void;
|
||
/**
|
||
* 获取mapv参数
|
||
*/
|
||
getMapVOpt(): MapVOpt;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* mpv更新
|
||
* @param mapvOpt
|
||
*/
|
||
update(mapvOpt: MapVOpt): void;
|
||
/**
|
||
* 通过数据创建Mapv
|
||
* @param options
|
||
*/
|
||
create(options: MapVOpt): any;
|
||
/**
|
||
* 创建数据集
|
||
* @public
|
||
* @param [data] 包含初始数据的可选数组
|
||
*/
|
||
createDataSet(data: any): any;
|
||
private _initMapv;
|
||
private _DataSetAdd;
|
||
private _DataSetReset;
|
||
private _DataSetGet;
|
||
private _DataSetSet;
|
||
private _DataSetClear;
|
||
private _DataSetRemove;
|
||
private _DataSetUpdate;
|
||
private _DataSetTransferCoordinate;
|
||
private _DataSetinitGeometry;
|
||
private _DataSetGetMax;
|
||
private _DataSetGetSum;
|
||
private _DataSetGetMin;
|
||
private _DataSetUnique;
|
||
/**
|
||
* 获取
|
||
* @param data
|
||
*/
|
||
private _getDataSet;
|
||
/**
|
||
* 根据弧线的坐标节点数组
|
||
* @param data
|
||
*/
|
||
private _getCurvePoints;
|
||
/**
|
||
* 获取城市中心坐标点
|
||
* @param name
|
||
*/
|
||
private _getCenterByCityName;
|
||
/**
|
||
* 根据城市名获取省份
|
||
* @param name
|
||
*/
|
||
private _getProvinceNameByCityName;
|
||
utilCurve: {
|
||
getPoints: (data: any) => any;
|
||
};
|
||
utilCityCenter: {
|
||
getCenterByCityName: (name: any) => any;
|
||
getProvinceNameByCityName: (name: any) => any;
|
||
};
|
||
geojson: {
|
||
getDataSet: (data: any) => any;
|
||
};
|
||
/**
|
||
* 数据集操作方法
|
||
*/
|
||
DataSet: {
|
||
add: (data: any, senderId: any) => any;
|
||
Reset: () => any;
|
||
get: (args: any) => any;
|
||
set: (args: any) => any;
|
||
clear: (args: any) => any;
|
||
remove: (args: any) => any;
|
||
update: (args: any, condition: any) => any;
|
||
transferCoordinate: (data: any, transferFn: any, fromColumn: any, toColumnName: any) => any;
|
||
initGeometry: (transferFn: any) => any;
|
||
getMax: (columnName: any) => any;
|
||
getSum: (columnName: any) => any;
|
||
getMin: (columnName: any) => any;
|
||
getUnique: (columnName: any) => any;
|
||
};
|
||
}
|
||
/**
|
||
* @类别 需要用户创建的类</br>
|
||
* @描述 MapV参数类</br>
|
||
* @see <a href='../../../examples/gallery/editor.html#honeyComb'>蜂巢网格</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#migrate'>迁徙图</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#weiboPoint'>微博点</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#migrateAll'>数据链路</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#square'>方形网格</a>
|
||
*/
|
||
class MapVOpt {
|
||
/**
|
||
* mapv 数据
|
||
*/
|
||
data: number[];
|
||
/**
|
||
* mapv参数
|
||
*/
|
||
options: any;
|
||
constructor(data?: Array<number>, options?: any);
|
||
}
|
||
|
||
class MassiveLayer extends Layer {
|
||
private _viewer;
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**
|
||
* 添加对象
|
||
* @param item
|
||
*/
|
||
add(item: Item): Item;
|
||
/**
|
||
* 删除对象
|
||
* @param
|
||
*/
|
||
remove(value: string | Item): Item;
|
||
/**
|
||
* 解析json
|
||
* @param json 解析
|
||
*/
|
||
parseJson(json: any): void;
|
||
}
|
||
|
||
/**
|
||
* @类别 Cesium扩展类<br>
|
||
* @描述 批量绘制线类
|
||
* @see ../../../examples/gallery/editor.html#efficientLines
|
||
*/
|
||
class MassiveLines extends Item {
|
||
/**视图对象 */
|
||
private _viewer;
|
||
/**线的Primitive对象 */
|
||
private _linePrimitive;
|
||
/**材质对象 */
|
||
private _apprence;
|
||
/**纹理图片路径 */
|
||
private _lineTexTure;
|
||
/**流动线颜色 */
|
||
private _animateColor;
|
||
/**线的主体颜色 */
|
||
private _lineColor;
|
||
/**线的数据 */
|
||
private _lineData;
|
||
/**线的Instance对象数组 */
|
||
private _lineInstances;
|
||
/**流动速度 */
|
||
private _speed;
|
||
/**线的宽度 */
|
||
private _lineWidth;
|
||
/**Item编号 */
|
||
protected _id: string;
|
||
/**
|
||
* 初始化方法
|
||
* @param options 参数类
|
||
* @returns
|
||
* ```
|
||
* 示例代码
|
||
* let data = [[90, 0, 2000000, 90, 30, 2000000]];
|
||
* let massiveLinesOpt = new GV.MassiveLinesOpt(data);
|
||
* let massiveLines = new GV.MassiveLines(massiveLinesOpt);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(options: MassiveLinesOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 获取运动点颜色
|
||
* @return {string}
|
||
*
|
||
*/
|
||
readonly sportColor: string;
|
||
/**
|
||
* 设置运动线颜色
|
||
* @param {string} val 运动线颜色
|
||
* ```
|
||
* 示例代码
|
||
* massiveLines.sportColor='#ffffff'
|
||
* ```
|
||
*/
|
||
animateColor: string;
|
||
/**
|
||
* 获取线的颜色
|
||
* @return {string}
|
||
*/
|
||
/**
|
||
* 设置线的颜色
|
||
* @param {string} val 线颜色
|
||
* ```
|
||
* 示例代码
|
||
* massiveLines.sportColor='#ffffff'
|
||
* ```
|
||
*/
|
||
lineColor: string;
|
||
/**
|
||
* 获取运动速度
|
||
* @return {number}
|
||
*/
|
||
/**
|
||
* 设置运动速度
|
||
* @param {number} val 运动速度
|
||
* ```
|
||
* 示例代码
|
||
* massiveLines.speed=1.0
|
||
* ```
|
||
*/
|
||
speed: number;
|
||
/**
|
||
* 获取纹理图片
|
||
* @return {string}
|
||
*/
|
||
/**
|
||
* 设置纹理图片
|
||
* @param {string} val 图片名称
|
||
*/
|
||
lineTexture: string;
|
||
/**
|
||
* 初始化
|
||
* @param {BatchLineOptions} options 参数类
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 创建线的实例
|
||
*/
|
||
private createLineInstance;
|
||
/**
|
||
* 创建材质
|
||
*/
|
||
private createMaterial;
|
||
/**
|
||
* 片源着色器方法
|
||
*/
|
||
private getMS;
|
||
/**
|
||
* 画线
|
||
*/
|
||
private drawLines;
|
||
/**
|
||
* 删除线
|
||
*/
|
||
destroyItem(): void;
|
||
/**
|
||
* Event函数
|
||
*/
|
||
private listenerFun;
|
||
}
|
||
/**
|
||
* 批量绘制线参数类
|
||
*/
|
||
class MassiveLinesOpt {
|
||
/**已插值的线数据*/
|
||
lineData: Array<Array<number>>;
|
||
/**流动速度 */
|
||
speed?: number;
|
||
/**纹理URL*/
|
||
lineTexTure?: string;
|
||
/**流动线颜色*/
|
||
animateColor?: string;
|
||
/**线的主体颜色 */
|
||
lineColor?: string;
|
||
/**线的宽度 */
|
||
lineWidth?: number;
|
||
constructor(lineData: Array<Array<number>>, speed?: number, lineTexTure?: string, animateColor?: string, lineColor?: string, lineWidth?: number);
|
||
}
|
||
|
||
/**
|
||
* @类别 Cesium扩展类<br>
|
||
* @描述 批次绘制点类
|
||
* @see <a href='../../../examples/gallery/editor.html#efficientPoints'>批次绘制点</a>
|
||
*/
|
||
class MassivePoints extends Item {
|
||
/**视图对象*/
|
||
private _viewer;
|
||
/**点样式划分 */
|
||
private _colors;
|
||
/**点大小 */
|
||
private _pointSizes;
|
||
/**Primitive对象 */
|
||
private _primitive;
|
||
/**材质对象 */
|
||
private _appearance;
|
||
/**点数据 */
|
||
private _data;
|
||
/**点颜色数组 */
|
||
private _pointColors;
|
||
/**点位置数组 */
|
||
private _pointPositions;
|
||
/**Item Id */
|
||
protected _id: string;
|
||
/**
|
||
* 初始化方法
|
||
* @param data 点数据
|
||
* @param colors 颜色数据
|
||
* @returns
|
||
* ```
|
||
* 示例代码
|
||
* let colors=[];
|
||
* colors.push(new GV.PointStyle(1000, 0.4, 0.9, 0.2, 0.4));
|
||
* let pointData=[];
|
||
* pointData.push(new GV.PointOption(90, 0, 1000))
|
||
* let massivePoints = new GV.MassivePoints(pointData,colors);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(data: Array<PointOption>, colors: Array<PointStyle>);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 初始化实体
|
||
* @param {GeoCanvas} 视图对象
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 删除实体
|
||
*/
|
||
destroyItem(): void;
|
||
/**
|
||
* 初始化数据
|
||
*/
|
||
private resolveData;
|
||
/**
|
||
* 创建网格体
|
||
* @return {Cesium.Geometry} 网格体
|
||
*/
|
||
private createGeometry;
|
||
/**
|
||
* 创建材质信息
|
||
* @param {string} fs 片源着色器
|
||
* @param {string} vs 顶点着色器
|
||
* @return {Cesium.Appearance} 材质信息
|
||
*/
|
||
private createAppearence;
|
||
/**
|
||
* 顶点着色器
|
||
* @return {string} 顶点着色器
|
||
*/
|
||
private getVS;
|
||
/**
|
||
* 片源着色器
|
||
* @return {string} 片源着色器
|
||
*/
|
||
private getFS;
|
||
/**
|
||
* 获取某一级别下点的颜色
|
||
* @param {number} 级别
|
||
* @return {Array} 颜色数组
|
||
*/
|
||
private getColor;
|
||
/**
|
||
* 获取某一级别下点的大小
|
||
* @param {number} 级别
|
||
* @return {number} 大小
|
||
*/
|
||
private getPointSize;
|
||
/**
|
||
* 更新数据源
|
||
* @param {Array} data 数据源
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* let pointData=[];
|
||
* pointData.push(new GV.PointOption(10, 0, 1000));
|
||
* massivePoints.data=pointData;
|
||
*
|
||
* ```
|
||
*/
|
||
data: Array<PointOption>;
|
||
}
|
||
/**批量绘制点参数 */
|
||
class PointOption {
|
||
/**点经度 */
|
||
lon: number;
|
||
/**点纬度 */
|
||
lat: number;
|
||
/**代表当前点个数 */
|
||
count: number;
|
||
constructor(lon: number, lat: number, count: number);
|
||
}
|
||
/**点样式设定 */
|
||
class PointStyle {
|
||
/**点个数级别 */
|
||
level: number;
|
||
/**点颜色r通道 */
|
||
r: number;
|
||
/**点颜色g通道*/
|
||
g: number;
|
||
/**点颜色b通道 */
|
||
b: number;
|
||
/**点颜色a通道 */
|
||
a: number;
|
||
constructor(level: number, r: number, g: number, b: number, a: number);
|
||
}
|
||
|
||
/**
|
||
* @类别 Cesium扩展类<br>
|
||
* @描述 批量绘制面类
|
||
* @see <a href='../../../examples/gallery/editor.html#efficientPolygons'>批次绘制面</a>
|
||
*/
|
||
class MassivePolygons {
|
||
private _viewer;
|
||
private _dataSource;
|
||
private _instances;
|
||
private _heightFlag;
|
||
private _primitive;
|
||
protected _id: string;
|
||
/**
|
||
* 初始化
|
||
* @param {Array<PolygonOptions>} dataSource 顶点数据
|
||
* @param {boolean} heightFlag 顶点数据中是否有高度信息
|
||
* ```
|
||
* 示例代码
|
||
* let dataSource=[];
|
||
* dataSource.push(new GV.MassivePolygonOpt([0, 0, 10, 0, 10, 10, 0, 10]));
|
||
* let massivePolygons=new GV.MassivePolygons(dataSource);
|
||
* ```
|
||
*/
|
||
constructor(dataSource: Array<MassivePolygonOpt>, heightFlag?: boolean);
|
||
/**
|
||
* 创建实例对象
|
||
*/
|
||
private createInstances;
|
||
/**
|
||
* 创建材质信息
|
||
* @return {Cesium.PerInstanceColorAppearance} 材质信息
|
||
*/
|
||
private createAppearence;
|
||
/**
|
||
* 创建Primitive
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 创建实体
|
||
* @param {GeoCanvas} viewer 视图对象
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 移除操作
|
||
*/
|
||
destroyItem(): void;
|
||
/**
|
||
* 修改被选中物体颜色
|
||
* @param id 面的id值
|
||
* @param color 修改的颜色
|
||
*/
|
||
changePickedColor(id: string, color?: string): void;
|
||
}
|
||
/**
|
||
* 批量绘制面
|
||
* @param {Array} positions 面数据
|
||
* @param {string} color 颜色
|
||
*/
|
||
class MassivePolygonOpt {
|
||
/**面的顶点数据 */
|
||
positions: Array<number>;
|
||
/**面的颜色 */
|
||
color: string;
|
||
/**面的ID值 */
|
||
id: string;
|
||
constructor(positions: Array<number>, id?: string, color?: string);
|
||
}
|
||
|
||
/**
|
||
* @类别 需要用户创建的类 <br>
|
||
* @描述 空间碎片 <br>
|
||
* @see <a href='../../../examples/gallery/editor.html#debris'>空间碎片</a>
|
||
*/
|
||
class SpaceDebris extends Item {
|
||
private root;
|
||
private workerArray;
|
||
private derbrisList;
|
||
private debrisMap;
|
||
private viewer;
|
||
private spaceDebrisOpts;
|
||
/**
|
||
* 空间碎片构造函数
|
||
* @param spaceDebrisOpts 空间碎片数组对象
|
||
* ```
|
||
* 示例代码
|
||
* fetch("../data/satellite.json").then(r => {
|
||
* r.json().then(data => {
|
||
* var spaceDebrisData = [];
|
||
* var length = data.length;
|
||
* for (var i = 0; i < length; i++) {
|
||
* var item = data[i];
|
||
* var opt = new GV.SpaceDebrisOpt();
|
||
* opt.name = item.name;
|
||
* opt.tle1 = item.tle1;
|
||
* opt.tle2 = item.tle2
|
||
* spaceDebrisData.push(opt);
|
||
* }
|
||
* var spaceDebris = new GV.SpaceDebris(spaceDebrisData);
|
||
* viewer.layerManager.massiveLayer.add(spaceDebris);
|
||
* spaceDebris.show();
|
||
* })
|
||
* })
|
||
* ```
|
||
*/
|
||
constructor(spaceDebrisOpts: Array<SpaceDebrisOpt>);
|
||
/**
|
||
* 初始化空间碎片
|
||
* @param viewer 地理画布
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 销毁空间碎片
|
||
*/
|
||
destroyItem(): void;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 序列化
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 反序列化
|
||
*/
|
||
parseJson(): void;
|
||
/**
|
||
* 多线程work脚本URL
|
||
*/
|
||
private workerUrl;
|
||
/**
|
||
* 显示空间碎片
|
||
*/
|
||
show(): void;
|
||
private addDebrisItem;
|
||
}
|
||
/**
|
||
* 空间碎片构造参数类,卫星数据json格式需要正确
|
||
*/
|
||
class SpaceDebrisOpt {
|
||
/**
|
||
* 名称
|
||
*/
|
||
name: string;
|
||
/**
|
||
* 卫星数据数组1
|
||
*/
|
||
tle1: string;
|
||
/**
|
||
* 卫星数据数组2
|
||
*/
|
||
tle2: string;
|
||
}
|
||
|
||
/**
|
||
* 空间碎片内部使用类
|
||
*/
|
||
class SpaceDebrisItem {
|
||
_currentTime: Date;
|
||
_sampleProperty: Cesium.SampledPositionProperty;
|
||
_currentPosition: any;
|
||
point: Cesium.PointPrimitive;
|
||
tle1: string;
|
||
tle2: string;
|
||
worker: Worker;
|
||
id: number;
|
||
currentTime: Date;
|
||
}
|
||
|
||
/**
|
||
* @类别 需要用户创建的类 <br>
|
||
* @描述 风场 <br>
|
||
* @see <a href='../../../examples/gallery/editor.html#windy'>风场</a>
|
||
*/
|
||
class Windy extends Item {
|
||
private _primitives;
|
||
private SPEED_RATE;
|
||
private PARTICLES_NUMBER;
|
||
private MAX_AGE;
|
||
private BRIGHTEN;
|
||
private cesiumViewer;
|
||
private windData;
|
||
private windField;
|
||
private particles;
|
||
private lines;
|
||
private windDataObj;
|
||
/**
|
||
* 风场构造函数
|
||
* @param data 风场数据
|
||
* ```
|
||
* 示例代码
|
||
* fetch("../data/windData.json").then(r => {
|
||
* r.json().then(data => {
|
||
* let windy = new GV.Windy(data);
|
||
* viewer.layerManager.massiveLayer.add(windy);
|
||
* // viewer.layerManager.massiveLayer.remove(windy.id);
|
||
* })
|
||
* })
|
||
* ```
|
||
*/
|
||
constructor(data: Array<Object>);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 初始化风场
|
||
* @param viewer 地理画布
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 销毁风场
|
||
*/
|
||
destroyItem(): void;
|
||
private initWindyData;
|
||
private _init;
|
||
private createField;
|
||
private animate;
|
||
private _parseWindJson;
|
||
private removeLines;
|
||
private _map;
|
||
private _createLineInstance;
|
||
private _drawLines;
|
||
private randomParticle;
|
||
}
|
||
|
||
/**
|
||
* 三维模型Layer图层
|
||
*/
|
||
class Cesium3DTileLayer extends ModelItem {
|
||
private _renderObj;
|
||
private _modelLayer;
|
||
private _option;
|
||
private _type;
|
||
constructor(option: Cesium3DTileLayerOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
static readonly type: string;
|
||
initItem(modelLayer: ModelLayer): void;
|
||
destroyItem(): void;
|
||
getRenderObject(): Cesium.Primitive;
|
||
parseOption(option: any): void;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 解析json对象
|
||
*/
|
||
parseJson(option: any): void;
|
||
}
|
||
class Cesium3DTileLayerOpt {
|
||
/**
|
||
* kml路径
|
||
*/
|
||
url: string;
|
||
}
|
||
|
||
class ModelItem extends Item {
|
||
getRenderObject(): Cesium.Primitive;
|
||
}
|
||
|
||
class ModelLayer extends Layer {
|
||
_viewer: Cesium.Viewer;
|
||
_renderItemList: any[];
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**
|
||
* 添加对象
|
||
* @param item
|
||
*/
|
||
add(item: Item): Item;
|
||
/**
|
||
* 删除对象
|
||
* @param
|
||
*/
|
||
remove(itemid: string): Item;
|
||
/**
|
||
* 解析json
|
||
* @param json 解析
|
||
*/
|
||
parseJson(json: any): void;
|
||
getItemList(): Item[];
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): Cesium.PrimitiveCollection;
|
||
getRenderItemById(id: string): any;
|
||
}
|
||
|
||
class ConicSensor {
|
||
private satellitePos;
|
||
private _angle;
|
||
private _primitive;
|
||
private slice;
|
||
private _coverColor;
|
||
private _conicOpt;
|
||
private _swingAngle;
|
||
private _primitiveCollection;
|
||
constructor(primitiveCollection: Cesium.PrimitiveCollection, conicOpt: ConicOpt);
|
||
/**
|
||
* 获取圆锥primitive
|
||
* @return {Cesium.Primitive}
|
||
*/
|
||
readonly conic: Cesium.Primitive;
|
||
/**
|
||
* 设置位置
|
||
* @memberof ConicSensor
|
||
*/
|
||
/**
|
||
* 获取位置
|
||
* @return {GeoPoint}
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 获取卫星罩类型
|
||
* @return {string}
|
||
*/
|
||
readonly type: string;
|
||
/**
|
||
* 设置卫星罩颜色
|
||
* @memberof ConicSensor
|
||
*/
|
||
coverColor: string;
|
||
/**
|
||
* 设置圆锥罩开合角
|
||
* @memberof ReactangularSensor
|
||
*/
|
||
/**
|
||
* 获取圆锥罩开合角(单位:角度值)
|
||
*/
|
||
angle: number;
|
||
destroy(): void;
|
||
/**
|
||
* 设置侧摆角
|
||
* 说明:侧摆角范围0-45度
|
||
* @memberof ConicSensor
|
||
*/
|
||
swingAngle: number;
|
||
/**
|
||
* 创建顶点数据
|
||
* @param height
|
||
* @param angle
|
||
*/
|
||
private createVertex;
|
||
/**
|
||
* 创建vao需要数据
|
||
* @param topPosArr
|
||
* @param bottomPosArr
|
||
* @param slice
|
||
*/
|
||
private createGeometeryAttribute;
|
||
/**
|
||
* 创建Primitive
|
||
* @param ptsTemp
|
||
* @param stsTemp
|
||
*/
|
||
private createPrimitive;
|
||
private getMS;
|
||
updateMatrix(position: Cesium.Cartesian3): void;
|
||
}
|
||
|
||
class GeoVector3 {
|
||
constructor(x: number, y: number, z: number, time: Date, speed: Cesium.Cartesian3);
|
||
x: number;
|
||
y: number;
|
||
z: number;
|
||
time: Date;
|
||
speed: Cesium.Cartesian3;
|
||
}
|
||
|
||
class ReactangularSensor {
|
||
/**卫星位置 */
|
||
private satellitePos;
|
||
/**水平开合角 */
|
||
private _xAngle;
|
||
/**垂直开合角 */
|
||
private _zAngle;
|
||
private primitive;
|
||
private scanPlanePrimitive;
|
||
private scanAngle;
|
||
private _coverColor;
|
||
private _scanColor;
|
||
private _rectangularOpt;
|
||
private _swingAngle;
|
||
private _scanShow;
|
||
private _primitiveCollection;
|
||
constructor(primitiveCollection: Cesium.PrimitiveCollection, rectangularOpt: RectangularOpt);
|
||
/**
|
||
* 获取渲染对象
|
||
* @return {Array<Cesium.Primitive>}
|
||
*/
|
||
readonly rectangle: Array<Cesium.Primitive>;
|
||
destroy(): void;
|
||
/**
|
||
* 更新位置
|
||
*/
|
||
/**
|
||
* 获取位置
|
||
* @return {GeoPoint}
|
||
*/
|
||
position: GeoPoint;
|
||
/**
|
||
* 获取水平开合角
|
||
* @return {number}
|
||
*/
|
||
/**
|
||
* 设置棱锥罩水平开合角
|
||
* @memberof ReactangularSensor
|
||
*/
|
||
xAngle: number;
|
||
/**
|
||
* 获取垂直开合角
|
||
* @return {number}
|
||
*/
|
||
/**
|
||
* 设置棱锥罩垂直开合角
|
||
* @memberof ReactangularSensor
|
||
*/
|
||
zAngle: number;
|
||
/**
|
||
* 获取类型
|
||
* @return {string}
|
||
*/
|
||
readonly type: string;
|
||
/**
|
||
* 设置侧摆角
|
||
* 说明:侧摆角范围-45-45度
|
||
* @memberof ConicSensor
|
||
*/
|
||
swingAngle: number;
|
||
/**
|
||
* 设置卫星罩颜色
|
||
* @memberof ConicSensor
|
||
*/
|
||
coverColor: string;
|
||
/**
|
||
* 设置扫描版颜色
|
||
* @memberof ReactangularSensor
|
||
*/
|
||
scanColor: string;
|
||
/**
|
||
* 设置扫描版显隐
|
||
* @memberof ReactangularSensor
|
||
*/
|
||
/**
|
||
* 获取扫描版显隐
|
||
* @type {boolean}
|
||
* @memberof ReactangularSensor
|
||
*/
|
||
scanShow: boolean;
|
||
/**
|
||
* 更新姿态
|
||
* @param position
|
||
*/
|
||
updateMatrix(position: Cesium.Cartesian3): void;
|
||
/**
|
||
* 获取垂直路线的旋转矩阵(局部XY平面的旋转矩阵)
|
||
* @param position 下一点位置
|
||
*/
|
||
private getRotationMatrix;
|
||
/**
|
||
* 获取世界坐标系下变换矩阵
|
||
*/
|
||
private getWorldMatrix;
|
||
/**
|
||
* 创建primitive
|
||
*/
|
||
private createPrimitive;
|
||
private getMS;
|
||
/**
|
||
* 创建扫描板
|
||
*/
|
||
private createScanPlane;
|
||
}
|
||
|
||
/**
|
||
* @类别 需手动创建,然后添加到卫星图层类中<br>
|
||
* @描述 卫星类,提供了更改卫星的属性接口<br>
|
||
* @see ../../../examples/gallery/editor.html#satelliteShow
|
||
*/
|
||
class Satellite extends Item {
|
||
private _sampleProperty;
|
||
private _sampleSpeedProperty;
|
||
protected _name: string;
|
||
protected _id: any;
|
||
/**卫星罩类型 */
|
||
private _type;
|
||
private _viewer;
|
||
/**卫星entity的Map */
|
||
private _entitiesMap;
|
||
/**轨道数据 */
|
||
private _orbitPositions;
|
||
/**当前时间 */
|
||
private _currentTime;
|
||
/**当前位置 地球坐标系*/
|
||
private _currentPosition;
|
||
/**卫星两根数 */
|
||
private _tle;
|
||
/**卫星周期 单位:分钟*/
|
||
private _priod;
|
||
/**卫星罩对象 */
|
||
private _satelliteSensor;
|
||
private _sensorOpt;
|
||
private sateMinPixelSize;
|
||
private _clock;
|
||
private _localOrbitData;
|
||
private _opt;
|
||
/**同步轨道卫星位置 */
|
||
private _synchronousPosition;
|
||
/**同步轨道卫星传感器列表 */
|
||
private _synchronousSensorMap;
|
||
private _viewChange;
|
||
/**
|
||
* 初始化
|
||
* @param options 卫星属性类
|
||
* @returns
|
||
* ```
|
||
* 示例代码:
|
||
* let sateOpt = new GV.SatelliteOpt(
|
||
* `GF-1
|
||
* 1 39766U 14029A 19051.88312325 -.00000394 00000-0 -45830-4 0 9997
|
||
* 2 39766 97.9206 150.4086 0001551 85.1013 275.0382 14.79467694256344`);
|
||
* let satellite = new GV.Satellite(sateOpt);
|
||
* viewer.satelliteLayer.add(satellite);
|
||
*
|
||
* ```
|
||
*/
|
||
constructor(options: SatelliteOpt);
|
||
/**
|
||
* 启用卫星属性
|
||
* @param {string} componentName 属性名称
|
||
* ```
|
||
* 示例代码:
|
||
* satellite.enableComponent(SatelliteComponents.Orbit);
|
||
*
|
||
* ```
|
||
*/
|
||
enableComponent(componentName: string): void;
|
||
/**
|
||
* 禁用卫星属性
|
||
* @param {string} componentName 属性名称
|
||
* ```
|
||
* 示例代码:
|
||
* satellite.disableComponent(SatelliteComponents.Orbit);
|
||
*
|
||
* ```
|
||
*/
|
||
disableComponent(componentName: string): void;
|
||
/**
|
||
* 增加同步卫星传感器(即地面覆盖多边形范围)
|
||
* @param key 传感器名称
|
||
* @param points 多边形顶点
|
||
* ```
|
||
* 示例代码:
|
||
* satellite.addSynchronousSensor('传感器1',[
|
||
* new GV.GeoPoint(120.9340158474,24.0177786452),
|
||
* new GV.GeoPoint(120.9395350817,24.0222973323),
|
||
* new GV.GeoPoint(120.9427083183, 24.004776336675963),
|
||
* new GV.GeoPoint(120.9350803555,24.0139574843)
|
||
* ]);
|
||
* ```
|
||
*/
|
||
addSynchronousSensor(key: string, points: GeoPoint[], color?: string): void;
|
||
/**
|
||
* 移除同步卫星的传感器
|
||
* @param key 传感器名称
|
||
*/
|
||
removeSynchronousSensor(key: string): void;
|
||
/**
|
||
* 获取卫星传感器锥罩对象
|
||
* @param key 传感器名称(只针对同步卫星多传感器)
|
||
*/
|
||
getSensor(key?: string): any;
|
||
/**根据与摄像机距离判断创建图标还是模型 */
|
||
private createSatImageOrModel;
|
||
/**
|
||
* 创建卫星图标
|
||
*/
|
||
private createSatImage;
|
||
/**
|
||
* 创建卫星模型
|
||
*/
|
||
private createSatModel;
|
||
/**
|
||
* 创建Label
|
||
*/
|
||
private createLabel;
|
||
/**
|
||
* 创建轨道
|
||
*/
|
||
private createOrbit;
|
||
private getMS;
|
||
/**
|
||
* 创建圆锥波
|
||
*/
|
||
private createCone;
|
||
/**
|
||
* 创建棱锥波
|
||
*/
|
||
private createSquareCone;
|
||
/**
|
||
* 创建地面扫描
|
||
*/
|
||
private createGroundTrack;
|
||
private calculateRecPosition;
|
||
private calculateCirPosition;
|
||
/**
|
||
* 设置一个轨道周期的数据,更新轨道绘制
|
||
*/
|
||
positions: Array<GeoVector3>;
|
||
/**设置卫星当前时间,更新卫星图标/模型/文字的位置,以及卫星的姿态 */
|
||
private time;
|
||
/**
|
||
* 同步卫星位置
|
||
*/
|
||
synchronousPosition: GeoPoint;
|
||
/**
|
||
* 获取id
|
||
* @readonly
|
||
* @memberof Satellite
|
||
*
|
||
*/
|
||
readonly id: string;
|
||
/**
|
||
* 初始化
|
||
* @param viewer 视图对象
|
||
*/
|
||
initItem(viewer: Cesium.Viewer): any;
|
||
protected calculatePositions3D(t: any, tle1: any, tle2: any): void;
|
||
protected calculatePositions2D(t: any, tle1: any, tle2: any): void;
|
||
protected onViewChanged(): void;
|
||
isPicked(graphic: any): boolean;
|
||
/**
|
||
* 监听更新函数
|
||
* @param event
|
||
* @param tle1
|
||
* @param tle2
|
||
* @param priod
|
||
*/
|
||
private listenerFun;
|
||
/**
|
||
* 判断是否变轨
|
||
*/
|
||
private changeRail;
|
||
/**
|
||
* 移除卫星
|
||
*/
|
||
destroyItem(): void;
|
||
/**
|
||
* 设置卫星轨道颜色
|
||
* @param val 卫星轨道颜色
|
||
* ```
|
||
* 示例代码:
|
||
* satellite.orbitColor='#ffffff';
|
||
* ```
|
||
*
|
||
*/
|
||
orbitColor: string;
|
||
/**
|
||
* 设置卫星文本文字颜色
|
||
* @param val 卫星文本文字颜色
|
||
* ```
|
||
* 示例代码:
|
||
* satellite.textColor='#ffff00';
|
||
* ```
|
||
*
|
||
*/
|
||
textColor: string;
|
||
/**
|
||
* 设置卫星地面覆盖颜色
|
||
* @param val 卫星地面覆盖颜色
|
||
* ```
|
||
* 示例代码:
|
||
* satellite.groundTrackColor='#ffffff';
|
||
* ```
|
||
*
|
||
*/
|
||
groundTrackColor: string;
|
||
/**
|
||
* 获取卫星名称
|
||
* @return {String} 卫星名称
|
||
* ```
|
||
* 示例代码:
|
||
* let name=satellite.name;
|
||
* ```
|
||
*
|
||
*/
|
||
readonly name: string;
|
||
/**
|
||
* 获取卫星是否是同步卫星
|
||
* @return {boolean}
|
||
* ```
|
||
* 示例代码:
|
||
* let isSyn = satellite.synchronous;
|
||
* ```
|
||
*
|
||
*/
|
||
readonly synchronous: boolean;
|
||
/**
|
||
* 获取周期(单位:分钟)
|
||
* @readonly
|
||
* @type {number}
|
||
* @memberof Satellite
|
||
*/
|
||
readonly priod: number;
|
||
/**
|
||
* 获取当前位置
|
||
* @return {GeoPoint} 当前位置
|
||
*/
|
||
readonly position: GeoPoint;
|
||
/**
|
||
* 获取卫星罩对象(只针对低轨卫星)
|
||
* @return {any} 卫星罩对象
|
||
*/
|
||
readonly satelliteSensor: any;
|
||
/**
|
||
* 获取卫星当前时刻的速度(单位:Km/s)
|
||
* @type {number}
|
||
*/
|
||
readonly speed: number;
|
||
/**
|
||
* 获取卫星推演的速度倍率
|
||
*/
|
||
/**
|
||
* 设置卫星推演的速度倍率
|
||
*/
|
||
multiplier: number;
|
||
/**
|
||
* 设置当前时间
|
||
* @memberof Satellite
|
||
*/
|
||
/**
|
||
* 获取当前时间
|
||
* @type {Date}
|
||
* @memberof Satellite
|
||
*/
|
||
currentTime: Date;
|
||
/**
|
||
* 设置新轨道
|
||
* @param localOrbitData 轨道数据
|
||
*/
|
||
setLocalOrbitData(localOrbitData: Array<GeoVector3>): void;
|
||
/**
|
||
* 获取卫星在某一时间的位置
|
||
* @readonly
|
||
* @memberof Satellite
|
||
*/
|
||
getPos(time: Date): GeoPoint;
|
||
/**
|
||
* 设置卫星时钟multiplier
|
||
* @param number 数值越大运动越快,默认为1
|
||
*/
|
||
clockMultiplier(value: number): void;
|
||
/**
|
||
* 获取文字绘制对象
|
||
*/
|
||
getLabelGraphic(): Cesium.LabelGraphics;
|
||
movePlay(flag: boolean): void;
|
||
}
|
||
class SatelliteOpt {
|
||
/**卫星两根数 */
|
||
tle: string;
|
||
/**轨道类型 */
|
||
orbitType?: SatelliteOrbitType;
|
||
/**轨道颜色 */
|
||
orbitColor?: string;
|
||
/**文本标签颜色 */
|
||
textColor?: string;
|
||
/**扫描锥颜色 */
|
||
coverColor?: string;
|
||
/**扫描带颜色 */
|
||
groundTrackColor?: string;
|
||
/**卫星罩类型 */
|
||
type?: StatelliteEnum;
|
||
/**卫星图标路径 */
|
||
imageUrl?: String;
|
||
/**轨道线宽度 */
|
||
orbitWidth?: number;
|
||
/**卫星模型url */
|
||
modelUrl?: string;
|
||
/**卫星模型占屏幕最小像素 */
|
||
sateMinPixelSize?: number;
|
||
/**本地轨道数据*/
|
||
localOrbitData: Array<GeoVector3>;
|
||
/**当前卫星时间 */
|
||
currentTime: Date;
|
||
/**是否为同步轨道卫星 */
|
||
synchronous: boolean;
|
||
/**同步卫星位置 */
|
||
synchronousPosition: GeoPoint;
|
||
constructor(tle: string, currentTime: Date, orbitType?: SatelliteOrbitType, orbitColor?: string, synchronous?: boolean, groundTrackColor?: string, type?: StatelliteEnum, orbitWidth?: number, imageUrl?: string, modelUrl?: string, sateMinPixelSize?: number, synchronousPosition?: GeoPoint, localOrbitData?: Array<GeoVector3>);
|
||
}
|
||
enum SatelliteOrbitType {
|
||
/**闭合圆轨道 */
|
||
'Eci' = 1,
|
||
/**非闭合圆轨道 */
|
||
'Ecf' = 2
|
||
}
|
||
/**
|
||
* 卫星罩类型枚举
|
||
*/
|
||
enum StatelliteEnum {
|
||
/**圆锥罩 */
|
||
'conic' = 1,
|
||
/**棱锥罩 */
|
||
'square' = 2,
|
||
/**不规则多边形锥罩(同步卫星) */
|
||
'sync' = 3
|
||
}
|
||
/**
|
||
* 棱锥罩属性
|
||
*/
|
||
class RectangularOpt {
|
||
/**水平开合角 */
|
||
xAngle: number;
|
||
/**垂直开合角 */
|
||
zAngle: number;
|
||
/**棱锥罩颜色 */
|
||
coverColor: string;
|
||
/**棱锥罩位置 */
|
||
rectangularPos: GeoPoint;
|
||
/**扫描版颜色 */
|
||
scanColor: string;
|
||
/**侧摆角 范围0-45度*/
|
||
swingAngle: number;
|
||
}
|
||
/**
|
||
* 圆锥罩属性
|
||
*/
|
||
class ConicOpt {
|
||
/**圆锥罩开合角 */
|
||
conicAngle: number;
|
||
/**圆锥罩颜色 */
|
||
coverColor: string;
|
||
/**圆锥罩位置 */
|
||
conicPos: GeoPoint;
|
||
/**侧摆角 范围0-45度*/
|
||
swingAngle: number;
|
||
}
|
||
class SynchronousOpt {
|
||
/**同步卫星位置 */
|
||
position: GeoPoint;
|
||
/**覆盖范围顶点坐标 */
|
||
covers: GeoPoint[];
|
||
/**锥罩颜色 */
|
||
coverColor?: string;
|
||
}
|
||
|
||
class SatelliteComponents {
|
||
/**
|
||
* 卫星图标
|
||
*
|
||
*/
|
||
static readonly SatImage: string;
|
||
/**
|
||
* 卫星名称标注
|
||
*
|
||
*/
|
||
static readonly Label: string;
|
||
/**
|
||
* 卫星轨道
|
||
*
|
||
*/
|
||
static readonly Orbit: string;
|
||
/**
|
||
* 地面扫面线
|
||
*
|
||
*/
|
||
static readonly GroundTrack: string;
|
||
/**
|
||
* 卫星波束
|
||
*
|
||
*/
|
||
static readonly Sensor: string;
|
||
}
|
||
|
||
/**
|
||
* @类别 需手动创建<br>
|
||
* @描述 提供卫星管理相关功能<br>
|
||
* @see ../../../examples/gallery/editor.html#satalliteVis
|
||
*/
|
||
class SatelliteLayer extends Layer {
|
||
viewer: Cesium.Viewer;
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**
|
||
* 获取所有卫星名称
|
||
* @return {Array} 卫星名称
|
||
*
|
||
*/
|
||
readonly satelliteNames: Array<any>;
|
||
/**
|
||
* 添加对象
|
||
* @param item
|
||
*/
|
||
add(item: Item): Item;
|
||
/**
|
||
* 根据卫星名称获取卫星
|
||
* @param {string} 卫星名称
|
||
*/
|
||
getSatellite(name: string): Item;
|
||
/**
|
||
* 根据屏幕坐标获取卫星对象
|
||
* @param {number} 屏幕坐标x
|
||
* @param {number} 屏幕坐标y
|
||
* @return {Satellite} 卫星对象
|
||
*/
|
||
pickSatellite(x: number, y: number): Satellite;
|
||
/**
|
||
* 删除对象
|
||
* @param
|
||
*/
|
||
remove(value: string | Satellite): Satellite;
|
||
/**
|
||
* 解析json
|
||
* @param json 解析
|
||
*/
|
||
parseJson(json: any): void;
|
||
/**
|
||
* 清除所有卫星
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
class SynchronousSensor {
|
||
private _opt;
|
||
private _primitiveCollection;
|
||
private _primitive;
|
||
private _groundPrimitive;
|
||
constructor(primitiveCollection: Cesium.PrimitiveCollection, opt: SynchronousOpt);
|
||
visible: boolean;
|
||
position: GeoPoint;
|
||
coverColor: any;
|
||
readonly primitive: Cesium.Primitive;
|
||
/**传感器覆盖范围(多边形 顶点)*/
|
||
readonly covers: GeoPoint[];
|
||
/**更新计算几何体 */
|
||
update(): void;
|
||
private createPrimitive;
|
||
private getMS;
|
||
private createGroundPrimitive;
|
||
destroy(): void;
|
||
}
|
||
|
||
class TargetFlame {
|
||
_target: any;
|
||
_init: boolean;
|
||
particleSystem: any;
|
||
emitterModelMatrix: Cesium.Matrix4;
|
||
translation: Cesium.Cartesian3;
|
||
rotation: Cesium.Quaternion;
|
||
hpr: Cesium.HeadingPitchRoll;
|
||
trs: Cesium.TranslationRotationScale;
|
||
_show: boolean;
|
||
_earth: any;
|
||
/**
|
||
* TargetItem 构造函数
|
||
* @param id 目标对象的id
|
||
* @param lon 目标对象的经度
|
||
* @param lat 目标对象的纬度
|
||
* @param alt 目标对象的高度
|
||
* @param smoothTrack 是否需要平滑
|
||
* ```
|
||
* 示例代码
|
||
* let item = new GV.TargetItem('gb324244234sdf432',113.654,36.542.6921,true)
|
||
* ```
|
||
*/
|
||
constructor(target: any);
|
||
applyGravity(p: any, dt: any): void;
|
||
init(): void;
|
||
/**
|
||
*飞机尾焰是否显示
|
||
* @method showTrack
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var show = targetItem.flame.show;
|
||
* targetItem.flame.show = true ;
|
||
* ```
|
||
*/
|
||
show: boolean;
|
||
updateFlame(): void;
|
||
computeEmitterModelMatrix(): Cesium.Matrix4;
|
||
dispose(): void;
|
||
}
|
||
|
||
enum TargetState {
|
||
Retain = 0,
|
||
Add = 1,
|
||
Update = 2,
|
||
Remove = 3,
|
||
None = 4
|
||
}
|
||
|
||
class TimePositions {
|
||
_init: boolean;
|
||
_positionList: Array<TimePosition>;
|
||
_positionIndex: number;
|
||
_sampleCount: number;
|
||
_sampleIndex: number;
|
||
_speed: number;
|
||
_cacheSize: number;
|
||
_positionScratch: Cesium.Cartesian3;
|
||
_target: any;
|
||
/**
|
||
* TargetItem 构造函数
|
||
* @param id 目标对象的id
|
||
* @param lon 目标对象的经度
|
||
* @param lat 目标对象的纬度
|
||
* @param alt 目标对象的高度
|
||
* @param smoothTrack 是否需要平滑
|
||
* ```
|
||
* 示例代码
|
||
* let item = new GV.TargetItem('gb324244234sdf432',113.654,36.542.6921,true)
|
||
* ```
|
||
*/
|
||
constructor(target: any);
|
||
/**
|
||
* 获取点个数
|
||
* @method count
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
*
|
||
* ```
|
||
*/
|
||
readonly count: number;
|
||
/**
|
||
* 添加位置点
|
||
* @method addSample
|
||
* @param position 位置
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* ```
|
||
*/
|
||
addSample(position: TimePosition): void;
|
||
getMoveAmount(sPos: any, ePos: any): Cesium.Cartesian3;
|
||
getNearestIndex(time: any): number;
|
||
/**
|
||
* 获取历史轨迹点
|
||
* @method getHistoryPoints
|
||
*
|
||
* ```
|
||
* ```
|
||
*/
|
||
getHistoryPoints(): Array<TimePosition>;
|
||
/**
|
||
* 获取未飞行的点
|
||
* @method getPreservePoints
|
||
*
|
||
* ```
|
||
* ```
|
||
*/
|
||
getPreservePoints(): Array<TimePosition>;
|
||
/**
|
||
* 获取位置
|
||
* @method getPosition
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.getPosition(new Date());
|
||
* ```
|
||
*/
|
||
getPosition(time: any): Cesium.Cartesian3;
|
||
refreshList(): void;
|
||
/**
|
||
* 目标的速度
|
||
* @method speed
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var speed = targetItem.speed ;
|
||
* ```
|
||
*/
|
||
speed: number;
|
||
}
|
||
class TimePosition {
|
||
/**点位置 */
|
||
position: Cesium.Cartesian3;
|
||
/**时间点 */
|
||
time: number;
|
||
/**移动向量 */
|
||
timeSpan: number;
|
||
xSpan: number;
|
||
ySpan: number;
|
||
zSpan: number;
|
||
/**标记点是否是历史点 */
|
||
isHistory: boolean;
|
||
/**点索引号 */
|
||
index: number;
|
||
}
|
||
|
||
|
||
class WarningTargets {
|
||
private earth;
|
||
itemList: Map<any, any>;
|
||
graphicLayer: any;
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 目标告警个数
|
||
* @method count
|
||
*/
|
||
readonly count: number;
|
||
/**
|
||
* 添加目标告警
|
||
* @method addItem
|
||
* @param item 目标对象
|
||
*/
|
||
addItem(item: TargetItem): void;
|
||
/**
|
||
* 移除目标告警
|
||
* @method removeItem
|
||
* @param item 目标对象
|
||
*/
|
||
removeItem(item: TargetItem): void;
|
||
/**
|
||
* 更新目标告警
|
||
* @method updatePosition
|
||
* @param item 目标对象
|
||
*/
|
||
updatePosition(item: TargetItem): void;
|
||
/**
|
||
* 清空目标告警
|
||
* @method removeAll
|
||
*
|
||
*/
|
||
removeAll(): void;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 目标历史回放类
|
||
* @see <a href='../../../examples/gallery/editor.html#tsLayer.TargetHistory'>目标历史轨迹回放</a>
|
||
*/
|
||
class TargetHistory {
|
||
private _historyDataSource;
|
||
private _dsName;
|
||
private _viewer;
|
||
private _entities;
|
||
private _trackLineColor;
|
||
private _trackLineWidth;
|
||
private _trackPointColor;
|
||
private _trackPointSize;
|
||
private _smoothTrack;
|
||
private _pathList;
|
||
private _computeAngle;
|
||
private _timePositionList;
|
||
/**
|
||
* TargetHistory 构造函数
|
||
* @param viewer viewer对象
|
||
* ```
|
||
* 示例代码
|
||
* var targetHistory = new GV.TargetHistory(viewer);
|
||
* ```
|
||
*/
|
||
constructor(viewer: any);
|
||
/**
|
||
* @ignore
|
||
*/
|
||
_timePosition2sample(timePostion: Array<number>): (any[] | Cesium.SampledPositionProperty)[];
|
||
addTargetHistoryEx(target: TargetItem, timePostion: Array<number>): void;
|
||
addEntitys(target: TargetItem): any[];
|
||
computeHeading(v1: any, v2: any): any;
|
||
/**
|
||
* 添加目标运动轨迹
|
||
* @method addTargetHistory
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var itemTypecode = TargetHistory.addTargetHistory(target,[[113,36,500,1574906965962]]) ;
|
||
*
|
||
*
|
||
* ```
|
||
*/
|
||
addTargetHistory(target: TargetItem, timePostion: Array<number>): void;
|
||
/**
|
||
* 移除所有历史轨迹线
|
||
* @method removeAll
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* TargetHistory.removeAll() ;
|
||
*
|
||
*
|
||
* ```
|
||
*/
|
||
removeAll(): void;
|
||
/**
|
||
* 根据id删除轨迹线
|
||
* @method removeByID
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* TargetHistory.removeByID('dfs') ;
|
||
*
|
||
*
|
||
* ```
|
||
*/
|
||
removeByID(id: any): void;
|
||
/**
|
||
* 设置时间区间
|
||
* @method setTimeSection
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var itemTypecode = TargetHistory.setTimeSection(1574906965962,1574906969962) ;
|
||
*
|
||
* @returns {Boolean} 是否设置成功
|
||
* ```
|
||
*/
|
||
setTimeSection(start: number, end: number): boolean;
|
||
/**
|
||
* 运行速度
|
||
* @method speed
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var speed = TargetHistory.speed;
|
||
* TargetHistory.speed = 1.5;
|
||
*
|
||
*
|
||
* ```
|
||
*/
|
||
speed: number;
|
||
/**
|
||
* 角度是否自动沿线
|
||
* @method computeAngle
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var computeAngle = TargetHistory.computeAngle;
|
||
* TargetHistory.computeAngle = false;
|
||
*
|
||
*
|
||
* ```
|
||
*/
|
||
computeAngle: boolean;
|
||
/**
|
||
* 是否开启动画
|
||
* @method animate
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var animate = TargetHistory.animate;
|
||
* TargetHistory.animate = true;
|
||
*
|
||
*
|
||
* ```
|
||
*/
|
||
animate: boolean;
|
||
/**
|
||
* 轨迹线是否显示
|
||
* @method show
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var show = targetHistory.show;
|
||
* targetHistory.show; = false ;
|
||
* ```
|
||
*/
|
||
show: boolean;
|
||
/**
|
||
* 获取设置轨迹线颜色
|
||
* @method lineColor
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var color = targetHistory.lineColor;
|
||
* targetHistory.lineColor= Cesium.Color.fromRandom() ;
|
||
* ```
|
||
*/
|
||
lineColor: Cesium.Color;
|
||
/**
|
||
* 获取设置轨迹线宽度
|
||
* @method lineWidth
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var width = targetHistory.lineWidth;
|
||
* targetHistory.lineWidth = 10 ;
|
||
* ```
|
||
*/
|
||
lineWidth: number;
|
||
/**
|
||
* 获取设置轨迹点颜色
|
||
* @method pointColor
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var pointColor = targetHistory.pointColor;
|
||
* targetHistory.pointColor = Cesium.Color.fromRandom() ;
|
||
* ```
|
||
*/
|
||
pointColor: Cesium.Color;
|
||
/**
|
||
* 获取设置轨迹点的大小
|
||
* @method pointSize
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var size = targetHistory.pointSize;
|
||
* targetHistory.pointSize = 10 ;
|
||
* ```
|
||
*/
|
||
pointSize: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 目标类
|
||
* @see <a href='../../../examples/gallery/editor.html#dg_target.2321'>ts中的目标,既可用于动MB,也可用于静MB</a>
|
||
*/
|
||
class TargetItem extends Item {
|
||
_model: any;
|
||
_label: any;
|
||
_point: any;
|
||
_billbord: any;
|
||
protected _canvasLine: any;
|
||
protected _lineBillboard: any;
|
||
protected _data: any;
|
||
_position: Cesium.Cartesian3;
|
||
_geoPoint: GeoPoint;
|
||
protected _flag: TargetState;
|
||
protected _pedding: boolean;
|
||
_style: TargetStyle;
|
||
_timePosition: TimePositions;
|
||
protected _angle: number;
|
||
_parentLayer: any;
|
||
_init: boolean;
|
||
protected _type: string;
|
||
_smoothTrack: boolean;
|
||
protected _inview: boolean;
|
||
protected _timeArray: any[];
|
||
_bUseIconColor: boolean;
|
||
protected _time: string;
|
||
protected _speed: number;
|
||
protected _show: boolean;
|
||
protected _isSelected: boolean;
|
||
protected _showLabel: boolean;
|
||
_labelInit: boolean;
|
||
_linkLine: any;
|
||
protected _showLink: boolean;
|
||
protected _showModel: boolean;
|
||
protected _modelInit: boolean;
|
||
protected _backwardPath: any;
|
||
protected _forewardPath: any;
|
||
protected _flame: any;
|
||
protected _userHPR: any;
|
||
protected _color: any;
|
||
protected _modelColor: any;
|
||
protected _textColor: any;
|
||
protected _outlineColor: string;
|
||
protected _outlineWidth: number;
|
||
protected _itemtype: string;
|
||
protected _depthTest: boolean;
|
||
protected _partners: Map<any, any>;
|
||
/**
|
||
* TargetItem 构造函数
|
||
* @param id 目标对象的id
|
||
* @param lon 目标对象的经度
|
||
* @param lat 目标对象的纬度
|
||
* @param alt 目标对象的高度
|
||
* @param smoothTrack 是否需要平滑
|
||
* ```
|
||
* 示例代码
|
||
* let item = new GV.TargetItem('gb324244234sdf432',113.654,36.542.6921,true)
|
||
* ```
|
||
*/
|
||
constructor(id: string, lon: number, lat: number, alt: number, smoothTrack?: boolean, showTrackLine?: boolean);
|
||
readonly timePositionList: TimePosition[];
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
readonly forewardPath: TargetPath;
|
||
readonly backwardPath: TargetPath;
|
||
readonly flame: TargetFlame;
|
||
showLabel: boolean;
|
||
showModel: boolean;
|
||
/**
|
||
* 目标的类型编码
|
||
* @method styleCode
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var itemTypecode = targetItem.styleCode ;
|
||
* ```
|
||
*/
|
||
styleCode: string;
|
||
/**
|
||
* 目标的类型编码
|
||
* @method pointCacheSize
|
||
* @default 500
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.pointCacheSize = 1000 ;
|
||
* ```
|
||
*/
|
||
pointCacheSize: number;
|
||
/**
|
||
* 目标的类型编码
|
||
* @method flag
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var flag = targetItem.flag;
|
||
* ```
|
||
*/
|
||
flag: TargetState;
|
||
/**
|
||
* 获取目标当前位置
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var position = targetItem.getPosition();
|
||
* ```
|
||
*/
|
||
getPosition(): Cesium.Cartesian3;
|
||
/**
|
||
* 目标图标层是否能设置颜色
|
||
* @method flag
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.useIconColor=false;
|
||
* ```
|
||
*/
|
||
useIconColor: boolean;
|
||
/**
|
||
* 目标是否显示
|
||
* @method flag
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var show = targetItem.show;
|
||
* ```
|
||
*/
|
||
show: boolean;
|
||
/**
|
||
* 是否需要平滑目标
|
||
* @method smoothTrack
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var flag = targetItem.smoothTrack = true;
|
||
* ```
|
||
*/
|
||
smoothTrack: boolean;
|
||
/**
|
||
* 目标的样式
|
||
* @method style
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var style = targetItem.style;
|
||
* ```
|
||
*/
|
||
style: TargetStyle;
|
||
/**
|
||
* 目标位置更新
|
||
* @method updatePosition
|
||
* @param lon 经度
|
||
* @param lat 纬度
|
||
* @param alt 高度
|
||
* @param delay 延迟时间,单位秒
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.updatePosition(113.254,36.254,10000);
|
||
* targetItem.updatePosition(113.254,36.254,10000,10);
|
||
* ```
|
||
*/
|
||
updatePosition(lon: number, lat: number, alt: number, delay?: number): void;
|
||
getColor(): any;
|
||
/**
|
||
* 目标的名称
|
||
* @method name
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.name="RED";
|
||
* ```
|
||
*/
|
||
name: string;
|
||
/**
|
||
* 目标颜色,css颜色值
|
||
* @method color
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.color="RED";
|
||
* targetItem.color="#FF0000";
|
||
* ```
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 目标文字颜色,css颜色值
|
||
* @method textColor
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.textColor="RED";
|
||
* targetItem.textColor="#FF0000";
|
||
* ```
|
||
*/
|
||
textColor: string;
|
||
/**
|
||
* 目标轮廓颜色,css颜色值
|
||
* @method outlineColor
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.outlineColor="RED";
|
||
* targetItem.outlineColor="#FF0000";
|
||
* ```
|
||
*/
|
||
outlineColor: string;
|
||
/**
|
||
* 文字轮廓大小
|
||
* @method outlineColor
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.outlineWidth=2;
|
||
* ```
|
||
*/
|
||
outlineWidth: number;
|
||
/**
|
||
* 目标是否开启深度测试,开启后将会始终显示在屏幕最上层,否则会被遮挡
|
||
* @method depthTest
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.depthTest=false;
|
||
* targetItem.outlineColor="#FF0000";
|
||
* ```
|
||
*/
|
||
depthTest: boolean;
|
||
/**
|
||
* 目标模型颜色,css颜色值
|
||
* @method color
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.modelColor="RED";
|
||
* targetItem.modelColor="#FF0000";
|
||
* ```
|
||
*/
|
||
modelColor: string;
|
||
/**
|
||
* 目标大小
|
||
* @method iconSize
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.iconSize=24;
|
||
* ```
|
||
*/
|
||
iconSize: number;
|
||
/**
|
||
* 图表宽度
|
||
* @method iconWidth
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.iconWidth=24;
|
||
* ```
|
||
*/
|
||
iconWidth: number;
|
||
/**
|
||
* 图表高度
|
||
* @method iconHeight
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.iconHeight=24;
|
||
* ```
|
||
*/
|
||
iconHeight: number;
|
||
/**
|
||
* 图标地址
|
||
* @method iconUrl
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.iconUrl='./test.png';
|
||
* ```
|
||
*/
|
||
iconUrl: string;
|
||
/**
|
||
* 目标文字背景颜色
|
||
* @method fontbgColor
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.fontbgColor='red';
|
||
* ```
|
||
*/
|
||
fontbgColor: string;
|
||
/**
|
||
* 是否显示目标文字背景颜色
|
||
* @method showFontbgColor
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.showFontbgColor = true;
|
||
* ```
|
||
*/
|
||
showFontbgColor: boolean;
|
||
/**
|
||
* 目标是否选中
|
||
* @method isSelected
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.isSelected = true;
|
||
* ```
|
||
*/
|
||
isSelected: boolean;
|
||
/**
|
||
* 目标引线显隐看欧诺个只
|
||
* @method showLink
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.showLink = true;
|
||
* ```
|
||
*/
|
||
showLink: boolean;
|
||
/**
|
||
* 目标角度
|
||
* @method angle
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetItem.angle=105;
|
||
* ```
|
||
*/
|
||
angle: number;
|
||
/**
|
||
* 获取或设置目标的HeadingPitchRoll信息
|
||
* @method flag
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var hpr = targetItem.modelHPR;
|
||
* ```
|
||
*/
|
||
modelHPR: any;
|
||
/**
|
||
* 目标的时间
|
||
* @method time
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var time = targetItem.time ;
|
||
* ```
|
||
*/
|
||
time: string;
|
||
/**
|
||
* 目标的速度
|
||
* @method speed
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var speed = targetItem.speed ;
|
||
* ```
|
||
*/
|
||
speed: number;
|
||
/**************************伴飞对象接口************************ */
|
||
/**
|
||
* 添加伴飞对象
|
||
* @method addPartner
|
||
* @param partner 伴飞对象,标会对象
|
||
* @returns
|
||
*
|
||
* ```
|
||
*/
|
||
addPartner(partner: any): any;
|
||
/**
|
||
* 删除伴飞对象
|
||
* @method removePartner
|
||
* @param partner 伴飞对象
|
||
* @returns
|
||
*
|
||
* ```
|
||
*/
|
||
removePartner(partner: any): any;
|
||
/**
|
||
* 清空伴飞对象
|
||
* @method removeAllPartner
|
||
* @returns
|
||
*
|
||
* ```
|
||
*/
|
||
clearPartner(): void;
|
||
/**
|
||
* 伴飞对象集合
|
||
* @method partnerList
|
||
* @returns
|
||
*/
|
||
readonly partnerList: Map<any, any>;
|
||
}
|
||
class TrackLineOption {
|
||
/**轨迹点个数 */
|
||
points: Array<Cesium.Cartesian3>;
|
||
/**轨迹线颜色 */
|
||
color: Cesium.Color;
|
||
/**轨迹线宽度 */
|
||
width: number;
|
||
/**轨迹点个数 */
|
||
count: number;
|
||
/**轨迹线是否可见 */
|
||
show: boolean;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 目标管理类
|
||
* @see <a href='../../../examples/gallery/editor.html#dg_target.2329'>目标的管理操作和高效绘制</a>
|
||
*/
|
||
class TargetLayer extends Layer {
|
||
private earth;
|
||
private renderOption;
|
||
private rootcollection;
|
||
private rootPointcollection;
|
||
private pointcollection;
|
||
private labelcollection;
|
||
private billbordcollection;
|
||
private modelcollection;
|
||
private trackLinecollection;
|
||
private trackPointcollection;
|
||
private targetCollection;
|
||
private defaultStyle;
|
||
private _show;
|
||
private _smoothTrack;
|
||
private targetdataSource;
|
||
private _gid;
|
||
private _ennableDrag;
|
||
private interplatePosition;
|
||
private showModel;
|
||
private displayCondition;
|
||
private anchorLine;
|
||
private linkLines;
|
||
layerConfig: Map<any, any>;
|
||
moveAmount: Cesium.Cartesian3;
|
||
positionScratch: Cesium.Cartesian3;
|
||
warningTargets: WarningTargets;
|
||
private _needUpdate;
|
||
private _linkLineWidth;
|
||
private _linkLineColor;
|
||
private _highlightSelection;
|
||
private _selectionColor;
|
||
private _brefresh;
|
||
private _canvasCache;
|
||
private _graphicGroup;
|
||
constructor(viewer: Cesium.Viewer);
|
||
readonly graphicGroup: any;
|
||
private _getUnderGoundExtent;
|
||
private _getCurrentExtent;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
private _pointInView;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
private _renderTarget;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
private _getPoint;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
private _getLable;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
private _getBillboard;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
private _getModel;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
private _getLinkLine;
|
||
private _addTarget;
|
||
private addTrack;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
private initMouseEvt;
|
||
private updateLineCanvas;
|
||
private loadLinklines;
|
||
/**
|
||
* @ignore
|
||
*更新目标对象
|
||
*/
|
||
private _addORUpdateTarget;
|
||
private getStyleByCode;
|
||
private setTargetStyle;
|
||
private updateLinkStyle;
|
||
/**
|
||
* 根据屏幕坐标,点选态势元素
|
||
* @method pick
|
||
* @param x 坐标x
|
||
* @param y 坐标y
|
||
* @param clearSelection 是否清空选择集
|
||
*/
|
||
pick(x: number, y: number, clearSelection?: boolean): any;
|
||
/**
|
||
* 根据屏幕区域选择
|
||
* @param x 坐标x
|
||
* @param y 坐标y
|
||
* @param width 宽度
|
||
* @param height 高度
|
||
*/
|
||
pickRect(x: number, y: number, width: number, height: number): any[];
|
||
/**
|
||
* 保存图层样式配置信息
|
||
* @method saveStyleConfig
|
||
* @return {Object} 图层样式配置信息
|
||
*/
|
||
saveStyleConfig(): Object;
|
||
/**
|
||
* 加载图层样式配置信息
|
||
* @method loadStyleConfig
|
||
* @param config 图层样式配置信息
|
||
*/
|
||
loadStyleConfig(config: any): void;
|
||
/**
|
||
* 是否高亮选中的目标
|
||
*/
|
||
highlightSelection: boolean;
|
||
/**
|
||
* 目标选中颜色,只有highlightSelected 为true时 该属性生效
|
||
*/
|
||
selectionColor: string;
|
||
/**
|
||
* 获取所有选中的目标对象
|
||
*/
|
||
getSelection(): any[];
|
||
/**
|
||
*清空所有选中的目标集合
|
||
*/
|
||
clearSelection(): void;
|
||
/**
|
||
*反选目标对象
|
||
*/
|
||
reverseSelection(): void;
|
||
/**
|
||
*全选目标对象
|
||
*/
|
||
selectAll(): void;
|
||
/**
|
||
* 目标是否需要平滑
|
||
*/
|
||
smoothTrack: boolean;
|
||
/**
|
||
* 获取目标列表
|
||
*/
|
||
getItemList(): any[];
|
||
/**
|
||
* 获取图层的id
|
||
* @method id
|
||
* @readonly
|
||
* @return
|
||
*/
|
||
readonly id: string;
|
||
/**
|
||
* 获取图层的名称
|
||
* @method name
|
||
* @readonly
|
||
* @return
|
||
*/
|
||
readonly name: string;
|
||
/**
|
||
* 是否允许拖拽
|
||
* @method ennableDrag
|
||
*/
|
||
ennableDrag: boolean;
|
||
/**
|
||
* 引线宽度
|
||
* @method linkLineWidth
|
||
*/
|
||
linkLineWidth: number;
|
||
/**
|
||
* 引线颜色
|
||
* @method linkLineColor
|
||
*/
|
||
linkLineColor: string;
|
||
/**
|
||
* 判断目标是否存在
|
||
* @method isExist
|
||
* @param itemid 目标对象的ID
|
||
* @return
|
||
*/
|
||
isExist(itemid: string): boolean;
|
||
/**
|
||
* 目标图层的显隐
|
||
* @method show
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetLayer.show=false;
|
||
* ```
|
||
*/
|
||
show: boolean;
|
||
/**
|
||
* 添加目标对象
|
||
* @method add
|
||
* @param item 目标对象
|
||
* @return
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var tTarget = new GV.TargetItem("targetData.id",113.454,36.45,10000,0);
|
||
* targetLayer.add(tTarget);
|
||
*
|
||
* ```
|
||
*/
|
||
add(item: TargetItem): TargetItem;
|
||
/**
|
||
* 通过id获取目标对象
|
||
* @method getItemById
|
||
* @param itemid 目标对象的id
|
||
* @return
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetLayer.getItemById("targetData.id");
|
||
*
|
||
* ```
|
||
*/
|
||
getItemById(itemid: string): any;
|
||
/**
|
||
* 通过删除目标对象
|
||
* @method remove
|
||
* @param itemid 目标对象的id
|
||
* @return
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetLayer.remove("targetData.id");
|
||
*
|
||
* ```
|
||
*/
|
||
remove(value: string | TargetItem): TargetItem;
|
||
/**
|
||
* 清空目标对象
|
||
* @method removeAll
|
||
* @return {Boolean}
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* targetLayer.removeAll();
|
||
*
|
||
* ```
|
||
*/
|
||
removeAll(): boolean;
|
||
private refresh;
|
||
/**
|
||
* 销毁对象
|
||
*/
|
||
private destroy;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 目标轨迹类
|
||
* @see <a href='../../../examples/gallery/editor.html#dg_target.2326'>ts中的目标的各类轨迹绘制</a>
|
||
*/
|
||
class TargetPath {
|
||
private _target;
|
||
private _init;
|
||
private _trackLine;
|
||
private _trackPoints;
|
||
private _showTrack;
|
||
private _trackLineColor;
|
||
private _trackLineWidth;
|
||
private _trackPointColor;
|
||
private _trackPointSize;
|
||
private _trackPositionCount;
|
||
private _trackPositions;
|
||
private _trackInit;
|
||
private _trackLineType;
|
||
private _mtype;
|
||
private _backLineMode;
|
||
private _modeChange;
|
||
/**
|
||
* TargetPath 构造函数
|
||
* @param target 目标对象
|
||
* ```
|
||
* 示例代码
|
||
* let itempath = new GV.TargetPath(target,)
|
||
* ```
|
||
*/
|
||
constructor(target: TargetItem, pType: any);
|
||
/**
|
||
*@ignore
|
||
*/
|
||
trackInit: boolean;
|
||
/**
|
||
*@ignore
|
||
*/
|
||
trackLine: any;
|
||
/**
|
||
*@ignore
|
||
*/
|
||
readonly mtype: PathType;
|
||
/**
|
||
* 目标的轨迹点
|
||
* @method trackPositions
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var itemTypecode = targetItem.trackPositions ;
|
||
* ```
|
||
*/
|
||
readonly trackPositions: any[];
|
||
/**
|
||
* 轨迹是否显示
|
||
* @method show
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var show = targetPath.show;
|
||
* targetPath.show = false ;
|
||
* ```
|
||
*/
|
||
show: boolean;
|
||
/**
|
||
* 获取设置轨迹线颜色
|
||
* @method trackLineColor
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var color = targetPath.trackLineColor;
|
||
* targetPath.trackLineColor = Cesium.Color.fromRandom() ;
|
||
* ```
|
||
*/
|
||
trackLineColor: Cesium.Color;
|
||
/**
|
||
* 获取设置轨迹线保留点个数
|
||
* @method trackLineCount
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var count = targetPath.trackPositionCount;
|
||
* targetPath.trackPositionCount = 10 ;
|
||
* ```
|
||
*/
|
||
trackPositionCount: number;
|
||
/**
|
||
* 获取设置轨迹线宽度
|
||
* @method trackLineWidth
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var width = targetPath.trackLineWidth;
|
||
* targetPath.trackLineWidth = 10 ;
|
||
* ```
|
||
*/
|
||
trackLineWidth: number;
|
||
/**
|
||
* 获取设置轨迹点颜色
|
||
* @method trackPointColor
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var width = targetPath.trackPointColor;
|
||
* targetPath.trackLineWidth = 10 ;
|
||
* ```
|
||
*/
|
||
trackPointColor: Cesium.Color;
|
||
/**
|
||
* 获取设置轨迹点的大小
|
||
* @method trackPointSize
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var size = targetPath.trackPointSize;
|
||
* targetPath.trackLineWidth = 10 ;
|
||
* ```
|
||
*/
|
||
trackPointSize: number;
|
||
updateTrackPoint(): void;
|
||
/**
|
||
* 获取目标轨迹点
|
||
* @method getTrackPoint
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var point = targetPath.getTrackPoint(1) ;
|
||
* ```
|
||
*/
|
||
getTrackPoint(index: any): any;
|
||
/**
|
||
* 获取目标轨迹点
|
||
* @method trackLineType
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var trackLineType = targetPath.trackLineType ;
|
||
* ```
|
||
*/
|
||
trackLineType: string;
|
||
/**
|
||
* 获取设置历史轨迹线模式
|
||
* @method foreLineMode
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var foreLineMode = targetPath.foreLineMode;
|
||
* ```
|
||
*/
|
||
foreLineMode: BackLineMode;
|
||
updatePosition(position: Cesium.Cartesian3): void;
|
||
getTagPositions(): any[];
|
||
/**
|
||
* @ignore
|
||
*/
|
||
render(curentPosition: any): void;
|
||
}
|
||
class PathType {
|
||
/**未飞行轨迹 */
|
||
static backward: string;
|
||
/**历史轨迹 */
|
||
static foreward: string;
|
||
}
|
||
/**
|
||
* 历史轨迹线材质模式
|
||
*/
|
||
class BackLineMode {
|
||
/**渐变模式 */
|
||
static ramp: string;
|
||
/**全色模式 */
|
||
static full: string;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 目标样式类
|
||
*/
|
||
class TargetStyle {
|
||
private _color;
|
||
private _pointSize;
|
||
private _pointLineWidth;
|
||
private _pointLineColor;
|
||
private _pointDisplayCondition;
|
||
private _fontSize;
|
||
private _fontColor;
|
||
private _font;
|
||
private _fontbgColor;
|
||
private _showFontbgColor;
|
||
private _labelDisplayCondition;
|
||
private _labelLineColor;
|
||
private _iconUrl;
|
||
private _iconSize;
|
||
private _iconDisplayCondition;
|
||
private _modelUrl;
|
||
private _modelDisplayCondition;
|
||
private _modelMaximumScale;
|
||
private _modelMinimumPixelSize;
|
||
private _labeloffsetx;
|
||
private _labeloffsety;
|
||
private _trackLineWidth;
|
||
private _trackLineColor;
|
||
private _selectedColor;
|
||
private _showBackground;
|
||
_iconHeight: number;
|
||
_iconWidth: number;
|
||
constructor();
|
||
/**
|
||
* 目标的默认样式
|
||
* @method DefaultStyle
|
||
* @readonly
|
||
* @return
|
||
*/
|
||
static DefaultStyle(): TargetStyle;
|
||
/**
|
||
* 目标的对象的颜色
|
||
* @method color
|
||
* @return
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 是否显示背景颜色
|
||
* @method showBackground
|
||
* @return
|
||
*/
|
||
showBackground: boolean;
|
||
/**
|
||
* 选中的目标的颜色
|
||
* @method selectedColor
|
||
* @return
|
||
*/
|
||
selectedColor: string;
|
||
/**
|
||
* 目标点的大小
|
||
* @method pointSize
|
||
* @return
|
||
*/
|
||
pointSize: number;
|
||
/**
|
||
* 点描边宽度
|
||
*/
|
||
pointLineWidth: number;
|
||
/**
|
||
* 点描边颜色
|
||
*/
|
||
pointLineColor: string;
|
||
/**
|
||
* 点可视范围
|
||
*/
|
||
pointDisplayCondition: Cesium.DistanceDisplayCondition;
|
||
/**
|
||
* 字体大小
|
||
*/
|
||
fontSize: number;
|
||
/**
|
||
* 字体颜色
|
||
*/
|
||
fontColor: string;
|
||
/**
|
||
* 字体
|
||
*/
|
||
font: string;
|
||
/**
|
||
* 字体背景颜色
|
||
*/
|
||
fontbgColor: string;
|
||
/**
|
||
* 是否显示字体背景颜色
|
||
*/
|
||
showFontbgColor: boolean;
|
||
/**
|
||
* 标牌可视范围
|
||
*/
|
||
labelDisplayCondition: Cesium.DistanceDisplayCondition;
|
||
/**
|
||
* 标牌连线线宽
|
||
*/
|
||
labelLineColor: string;
|
||
/**
|
||
* 图标路径,使用白色图片
|
||
*/
|
||
iconUrl: string;
|
||
/**
|
||
* 图标大小
|
||
*/
|
||
iconSize: number;
|
||
iconDisplayCondition: Cesium.DistanceDisplayCondition;
|
||
/**
|
||
* 模型路径
|
||
*/
|
||
modelUrl: string;
|
||
/**
|
||
* 模型可见范围
|
||
*/
|
||
modelDisplayCondition: Cesium.DistanceDisplayCondition;
|
||
/**
|
||
* 模型最大缩放比例
|
||
*/
|
||
modelMaximumScale: number;
|
||
/**
|
||
* 模型最小显示像素
|
||
*/
|
||
modelMinimumPixelSize: number;
|
||
/**
|
||
* 轨迹线宽度
|
||
*/
|
||
trackLineWidth: number;
|
||
/**
|
||
* 轨迹线颜色
|
||
*/
|
||
trackLineColor: string;
|
||
/**
|
||
* 标牌x轴偏移
|
||
*/
|
||
labeloffsetx: number;
|
||
/**
|
||
* 标牌y轴偏移
|
||
*/
|
||
labeloffsety: number;
|
||
/**
|
||
* 将样式保存为json
|
||
* @method toJson
|
||
*
|
||
*/
|
||
static toJson(style: any): Object;
|
||
/**
|
||
* 加载样式
|
||
* @method fromJson
|
||
* @param style 样式对象
|
||
*
|
||
*/
|
||
static fromJson(style: any): TargetStyle;
|
||
}
|
||
|
||
abstract class ComTerrainProvider {
|
||
protected _heightmapWidth: number;
|
||
protected _heightmapStructure: any;
|
||
protected _ellipsoid: any;
|
||
protected _errorEvent: Cesium.Event;
|
||
protected _credit: Cesium.Credit;
|
||
protected _tileCredits: any[];
|
||
protected _availability: any;
|
||
protected _readyPromise: any;
|
||
protected _lastResource: any;
|
||
protected _layerJsonResource: any;
|
||
protected _metadataError: any;
|
||
protected _layers: any[];
|
||
protected _attribution: string;
|
||
protected _overallAvailability: any[];
|
||
protected _overallMaxZoom: any;
|
||
protected _tilingScheme: any;
|
||
protected _scheme: any;
|
||
protected _levelZeroMaximumGeometricError: any;
|
||
protected _hasMetadata: boolean;
|
||
protected _hasWaterMask: boolean;
|
||
protected _requestWaterMask: any;
|
||
protected _hasVertexNormals: boolean;
|
||
protected _requestVertexNormals: any;
|
||
protected _requestMetadata: any;
|
||
protected _ready: boolean;
|
||
constructor(opt: any);
|
||
private parseMetadataSuccess;
|
||
protected metadataSuccess(data: any): void;
|
||
private parseMetadataFailure;
|
||
protected metadataFailure(data: any): void;
|
||
protected requestLayerJson(): void;
|
||
private getAvailabilityTile;
|
||
protected checkLayer(provider: any, x: any, y: any, level: any, layer: any, topLayer: any): {
|
||
result: boolean;
|
||
promise?: undefined;
|
||
} | {
|
||
result: boolean;
|
||
promise: any;
|
||
};
|
||
protected getRequestHeader(extensionsList: any): {
|
||
Accept: string;
|
||
};
|
||
protected createQuantizedMeshTerrainData(provider: any, buffer: any, level: any, x: any, y: any, layer: any): any;
|
||
protected createHeightmapTerrainData(provider: any, buffer: any, level: any, x: any, y: any): any;
|
||
requestTileGeometry(x: any, y: any, level: any, request: any): any;
|
||
protected requestTile(provider: any, x: any, y: any, level: any, layerToUse: any, request: any): any;
|
||
getTileDataAvailable(x: any, y: any, level: any): boolean;
|
||
/**
|
||
* Gets the maximum geometric error allowed in a tile at a given level.
|
||
*
|
||
* @param {Number} level The tile level for which to get the maximum geometric error.
|
||
* @returns {Number} The maximum geometric error.
|
||
*/
|
||
getLevelMaximumGeometricError(level: any): number;
|
||
/**
|
||
* Gets an event that is raised when the terrain provider encounters an asynchronous error. By subscribing
|
||
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
||
* are passed an instance of {@link TileProviderError}.
|
||
* @memberof CesiumTerrainProvider.prototype
|
||
* @type {Event}
|
||
*/
|
||
readonly errorEvent: Cesium.Event;
|
||
/**
|
||
* Gets the credit to display when this terrain provider is active. Typically this is used to credit
|
||
* the source of the terrain. This function should not be called before {@link CesiumTerrainProvider#ready} returns true.
|
||
* @memberof CesiumTerrainProvider.prototype
|
||
* @type {Credit}
|
||
*/
|
||
readonly credit: Cesium.Credit;
|
||
/**
|
||
* Gets the tiling scheme used by this provider. This function should
|
||
* not be called before {@link CesiumTerrainProvider#ready} returns true.
|
||
* @memberof CesiumTerrainProvider.prototype
|
||
* @type {GeographicTilingScheme}
|
||
*/
|
||
readonly tilingScheme: any;
|
||
/**
|
||
* Gets a value indicating whether or not the provider is ready for use.
|
||
* @memberof CesiumTerrainProvider.prototype
|
||
* @type {Boolean}
|
||
*/
|
||
readonly ready: boolean;
|
||
/**
|
||
* Gets a promise that resolves to true when the provider is ready for use.
|
||
* @memberof CesiumTerrainProvider.prototype
|
||
* @type {Promise.<Boolean>}
|
||
* @readonly
|
||
*/
|
||
readonly readyPromise: any;
|
||
/**
|
||
* Gets a value indicating whether or not the provider includes a water mask. The water mask
|
||
* indicates which areas of the globe are water rather than land, so they can be rendered
|
||
* as a reflective surface with animated waves. This function should not be
|
||
* called before {@link CesiumTerrainProvider#ready} returns true.
|
||
* @memberof CesiumTerrainProvider.prototype
|
||
* @type {Boolean}
|
||
* @exception {DeveloperError} This property must not be called before {@link CesiumTerrainProvider#ready}
|
||
*/
|
||
readonly hasWaterMask: any;
|
||
/**
|
||
* Gets a value indicating whether or not the requested tiles include vertex normals.
|
||
* This function should not be called before {@link CesiumTerrainProvider#ready} returns true.
|
||
* @memberof CesiumTerrainProvider.prototype
|
||
* @type {Boolean}
|
||
* @exception {DeveloperError} This property must not be called before {@link CesiumTerrainProvider#ready}
|
||
*/
|
||
readonly hasVertexNormals: any;
|
||
/**
|
||
* Gets a value indicating whether or not the requested tiles include metadata.
|
||
* This function should not be called before {@link CesiumTerrainProvider#ready} returns true.
|
||
* @memberof CesiumTerrainProvider.prototype
|
||
* @type {Boolean}
|
||
* @exception {DeveloperError} This property must not be called before {@link CesiumTerrainProvider#ready}
|
||
*/
|
||
readonly hasMetadata: any;
|
||
/**
|
||
* Boolean flag that indicates if the client should request vertex normals from the server.
|
||
* Vertex normals data is appended to the standard tile mesh data only if the client requests the vertex normals and
|
||
* if the server provides vertex normals.
|
||
* @memberof CesiumTerrainProvider.prototype
|
||
* @type {Boolean}
|
||
*/
|
||
readonly requestVertexNormals: any;
|
||
/**
|
||
* Boolean flag that indicates if the client should request a watermask from the server.
|
||
* Watermask data is appended to the standard tile mesh data only if the client requests the watermask and
|
||
* if the server provides a watermask.
|
||
* @memberof CesiumTerrainProvider.prototype
|
||
* @type {Boolean}
|
||
*/
|
||
readonly requestWaterMask: any;
|
||
/**
|
||
* Boolean flag that indicates if the client should request metadata from the server.
|
||
* Metadata is appended to the standard tile mesh data only if the client requests the metadata and
|
||
* if the server provides a metadata.
|
||
* @memberof CesiumTerrainProvider.prototype
|
||
* @type {Boolean}
|
||
*/
|
||
readonly requestMetadata: any;
|
||
/**
|
||
* Gets an object that can be used to determine availability of terrain from this provider, such as
|
||
* at points and in rectangles. This function should not be called before
|
||
* {@link CesiumTerrainProvider#ready} returns true. This property may be undefined if availability
|
||
* information is not available. Note that this reflects tiles that are known to be available currently.
|
||
* Additional tiles may be discovered to be available in the future, e.g. if availability information
|
||
* exists deeper in the tree rather than it all being discoverable at the root. However, a tile that
|
||
* is available now will not become unavailable in the future.
|
||
* @memberof CesiumTerrainProvider.prototype
|
||
* @type {TileAvailability}
|
||
*/
|
||
readonly availability: any;
|
||
}
|
||
class LayerInfo {
|
||
resource: any;
|
||
version: any;
|
||
isHeightmap: any;
|
||
tileUrlTemplates: any;
|
||
availability: any;
|
||
hasVertexNormals: any;
|
||
hasWaterMask: any;
|
||
hasMetadata: any;
|
||
availabilityLevels: any;
|
||
availabilityTilesLoaded: any;
|
||
littleEndianExtensionSize: any;
|
||
availabilityPromiseCache: any;
|
||
constructor(layer: any);
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 地形子项
|
||
* @see <a href='../../../examples/gallery/editor.html#multi-Terrain'>示例</a>
|
||
*/
|
||
class TerrainItem extends Item {
|
||
private _show;
|
||
private _index;
|
||
private _terrainProvider;
|
||
protected _type: string;
|
||
constructor(terrainProvider: any, option: any);
|
||
/**
|
||
* 地形图层的显隐
|
||
* @method show
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* terrainLayer.show=false;
|
||
* ```
|
||
*/
|
||
show: boolean;
|
||
readonly terrainProvider: any;
|
||
/**
|
||
* 地形图层的顺序
|
||
* @method index
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* terrainLayer.index=10;
|
||
* ```
|
||
*/
|
||
index: number;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
toJson(): object;
|
||
/**
|
||
* 解析json对象
|
||
*/
|
||
parseJson(json: object): void;
|
||
/**
|
||
* 销毁对象
|
||
*/
|
||
private destroy;
|
||
}
|
||
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 多地形管理
|
||
* @see <a href='../../../examples/gallery/editor.html#multi-Terrain'>示例</a>
|
||
*/
|
||
class TerrainLayerCollection extends Layer {
|
||
private earth;
|
||
private _terrainLayers;
|
||
private _show;
|
||
private _baseProvider;
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**
|
||
* @ignore
|
||
*/
|
||
_initBaseTerrain(): void;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
_getTerrainData(x: any, y: any, level: any, request: any): any;
|
||
/**
|
||
* @ignore
|
||
*/
|
||
_reloadTerain(): void;
|
||
/**
|
||
* 地形图层的显隐
|
||
* @method show
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* terrainLayer.show=false;
|
||
* ```
|
||
*/
|
||
show: boolean;
|
||
/**
|
||
* 添加地形图层
|
||
* @method add
|
||
* @param item 地形图层对象
|
||
* @return
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* var terrainItem = new GV.createWorldTerrain();
|
||
* terrainLayer.add(terrainItem);
|
||
*
|
||
* ```
|
||
*/
|
||
add(item: any): TerrainItem;
|
||
/**
|
||
* 根据id获得对象
|
||
* @param itemid 对象id
|
||
*/
|
||
getItemById(itemid: string): TerrainItem;
|
||
/**
|
||
* 根据name获得对象
|
||
* @param itemName 对象名称
|
||
*/
|
||
getItemByName(itemName: string): any;
|
||
/**
|
||
* 通过删除地形图层对象
|
||
* @method remove
|
||
* @param itemid 图层对象的id
|
||
* @return
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* terrainLayer.remove("id");
|
||
*
|
||
* ```
|
||
*/
|
||
remove(itemid: string): any;
|
||
/**
|
||
* 清空地形图层对象
|
||
* @method removeAll
|
||
* @return {Boolean}
|
||
*
|
||
* ```
|
||
* 示例代码
|
||
* terrainLayer.removeAll();
|
||
*
|
||
* ```
|
||
*/
|
||
removeAll(): void;
|
||
/**
|
||
* 销毁对象
|
||
*/
|
||
private destroy;
|
||
}
|
||
|
||
class TMSTerrainProvider extends ComTerrainProvider {
|
||
private _tileSets;
|
||
private _width;
|
||
private _height;
|
||
private _dataFormat;
|
||
private _dataExtension;
|
||
constructor(opt: any);
|
||
protected xmlSuccess(xmlDoc: any): void;
|
||
protected xmlFailure(data: any): void;
|
||
protected requestLayerXml(): void;
|
||
private getLevelUrl;
|
||
protected requestTile(provider: any, x: any, y: any, level: any, layerToUse: any, request: any): any;
|
||
/**
|
||
* 将请求到的瓦片数据转化为高程buffer
|
||
* @param image 瓦片数据
|
||
* @param heightBuffer 高程buffer
|
||
*/
|
||
protected getImagePixels(image: any, heightBuffer: any): void;
|
||
/**
|
||
* 当前瓦片获得最右边列的高程值,即右边邻接瓦片的最左边一列高程。
|
||
* @param tileBuffer 右边邻接瓦片
|
||
* @param heightBuffer 当前瓦片
|
||
*/
|
||
private getRightPixels;
|
||
/**
|
||
* 当前瓦片获得最下边行的高程值,即下边邻接瓦片的最顶端一行高程。
|
||
* @param tileBuffer 下边邻接瓦片
|
||
* @param heightBuffer 当前瓦片
|
||
*/
|
||
private getBottomPixels;
|
||
/**
|
||
* 当前瓦片获得最右下角点的高程值,即右下对角瓦片的最左上角点。
|
||
* @param tileBuffer 右下角邻接瓦片
|
||
* @param heightBuffer 当前瓦片
|
||
*/
|
||
private getRightBottomPixel;
|
||
protected requestTileBuffer(url: any, version: any, level: any, x: any, y: any, query: any, headers: any, request: any): any;
|
||
private getPixelIndex;
|
||
/**
|
||
* 构建QuantizedMesh地形瓦片
|
||
* @param provider
|
||
* @param buffer
|
||
* @param level
|
||
* @param x
|
||
* @param y
|
||
* @param layer
|
||
*/
|
||
protected createQuantizedMeshTerrainData__(provider: any, buffer: any, level: any, x: any, y: any): any;
|
||
private createHeightmap;
|
||
/**
|
||
* 获取瓦片是否可获得,返回值:true(表示可获得); false(表示不可获得); undefined(表示provider不支持这个瓦片)
|
||
* @param x
|
||
* @param y
|
||
* @param level
|
||
*/
|
||
getTileDataAvailable(x: any, y: any, level: any): boolean;
|
||
}
|
||
|
||
/**
|
||
* @类别 需手动创建,然后添加到矢量图层类中<br>
|
||
* @描述 北斗网格瓦片图层
|
||
* @see <a href='../../../examples/gallery/editor.html#BDTileLayer'>北斗网格瓦片图层</a>
|
||
*/
|
||
class BDTileLayer extends Item {
|
||
protected _name: any;
|
||
protected _changed: Cesium.Event;
|
||
protected _error: Cesium.Event;
|
||
protected _loading: Cesium.Event;
|
||
protected _isLoading: boolean;
|
||
protected _scene: any;
|
||
protected _loaded: boolean;
|
||
protected _tileReplacementQueue: any;
|
||
protected _tileCacheSize: any;
|
||
protected _renderTiles: Cesium.AssociativeArray;
|
||
protected _maxLevel: any;
|
||
protected _showLevel: any;
|
||
protected _deleteTileSetEvent: Cesium.Event;
|
||
protected _pickEvent: Cesium.Event;
|
||
protected _geographicTilingScheme: Cesium.GeographicTilingScheme;
|
||
protected _maxmemory: any;
|
||
protected _url: any;
|
||
protected _show: boolean;
|
||
protected _viewer: GeoCanvas;
|
||
protected _id: string;
|
||
/**
|
||
* 初始化
|
||
* @param {string} url 服务地址
|
||
* @param {number} showLevel 网格显示层级 (范围:>=0 && <=22)
|
||
* @returns
|
||
* ```
|
||
* 示例:
|
||
* let gridLayer = new GV.BDTileLayer(urlService, 9);
|
||
* viewer.tileLayer.add(gridLayer);
|
||
* ```
|
||
*/
|
||
constructor(url: string, showLevel?: number);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 初始化
|
||
* @param {GeoCanvas} viewer 视图信息
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 移除
|
||
*/
|
||
destroyItem(): void;
|
||
name: any;
|
||
private show;
|
||
private findTileFromCache;
|
||
private tilesetDeletechange;
|
||
private processTile;
|
||
getTileExtent(tile: any): {
|
||
xmin: number;
|
||
xmax: number;
|
||
ymin: number;
|
||
ymax: number;
|
||
};
|
||
private buildTileUrl;
|
||
private getRenderTileKeys;
|
||
private update;
|
||
private destroy;
|
||
}
|
||
|
||
/**
|
||
* @类型 GeoSotLayer网格图层
|
||
* @描述 国家标准网格码
|
||
* @see <a href='../../../examples/gallery/editor.html#GeoSotLayer'>军用图幅</a>
|
||
*/
|
||
class GeoSotLayer {
|
||
private viewer;
|
||
private labels;
|
||
private colseRangeLabels;
|
||
private _visible;
|
||
private primitive;
|
||
private _url;
|
||
private _removeEnd;
|
||
private _entity;
|
||
private _currenInfo;
|
||
private _enablePick;
|
||
private _currentGrid;
|
||
private _queryUrl;
|
||
private _currentLevel;
|
||
private _is3D;
|
||
private _primitive3D;
|
||
private _gridColor;
|
||
private _fillColor;
|
||
private _isClip;
|
||
private _clipExt;
|
||
private _clipEntity;
|
||
constructor(viewer: Cesium.Viewer, url: string);
|
||
private pickEvent;
|
||
/**
|
||
* 设置显隐
|
||
* @memberof MapSheet
|
||
*/
|
||
visible: boolean;
|
||
/**
|
||
* 设置拾取
|
||
* @memberof MapSheet
|
||
*/
|
||
enablePick: boolean;
|
||
/**
|
||
* 设置拾取Url
|
||
* @memberof MapSheet
|
||
*/
|
||
queryUrl: boolean;
|
||
/**
|
||
* 移除
|
||
*/
|
||
private remove;
|
||
/**
|
||
* 移除
|
||
*/
|
||
private addExtent;
|
||
/**
|
||
* 添加线、label进入场景
|
||
* @param data
|
||
*/
|
||
private getData;
|
||
/**
|
||
* 添加线、label进入场景
|
||
* @param data
|
||
*/
|
||
private updatePrimitive;
|
||
/**
|
||
* 添加线、label进入场景
|
||
* @param data
|
||
*/
|
||
private updatePrimitive3D;
|
||
setClipRange(xmin: any, ymin: any, xmax: any, ymax: any, bottom?: number, top?: number): void;
|
||
clearClipRange(): void;
|
||
destroy(): void;
|
||
}
|
||
|
||
/**
|
||
* @类别 需手动创建,然后添加到矢量图层类中<br>
|
||
* @描述 矢量图标类
|
||
* @see <a href='../../../examples/gallery/editor.html#iconTile'>矢量图标</a>
|
||
*/
|
||
class IconTile extends Item {
|
||
protected _imageUrl: string;
|
||
protected _scale: number;
|
||
protected _provider: WMTSVectorProvider;
|
||
protected _name: any;
|
||
protected _tileCacheSize: any;
|
||
protected _renderTiles: any;
|
||
protected _pickInstance: any;
|
||
protected _pickTile: any;
|
||
protected _tileReplacementQueue: any;
|
||
protected _entityCluster: Cesium.EntityCluster;
|
||
protected _entityCollection: Cesium.EntityCollection;
|
||
protected _pickEvent: Cesium.Event;
|
||
protected _loading: Cesium.Event;
|
||
protected _error: Cesium.Event;
|
||
protected _changed: Cesium.Event;
|
||
protected _isLoading: boolean;
|
||
protected _isPick: any;
|
||
protected _maxLevel: any;
|
||
protected _minLevel: any;
|
||
protected _loaded: boolean;
|
||
protected _pickPrimitive: Cesium.ScreenSpaceEventHandler;
|
||
protected _oldInstance: any;
|
||
protected _scene: any;
|
||
private _viewer;
|
||
protected _pickedColor: string;
|
||
protected _id: string;
|
||
/**
|
||
* 初始化
|
||
* @param options 参数类
|
||
* @returns
|
||
* ```
|
||
* 示例:
|
||
* let iconTileOpt = new GV.IconTileOpt(urlService, layer);
|
||
* let iconTile = new GV.IconTile(iconTileOpt);
|
||
* viewer.tileLayer.add(iconTile);
|
||
* ```
|
||
*/
|
||
constructor(options: IconTileOpt);
|
||
/**
|
||
* 初始化
|
||
* @param {GeoCanvas} 视图对象
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 添加点击回调
|
||
* @param {Function} callback 回调方法
|
||
* ```
|
||
* 示例:
|
||
* iconTile.onPick = onPickChanged;
|
||
* function onPickChanged(instance) {
|
||
* console.log(instance);
|
||
* }
|
||
* ```
|
||
*/
|
||
onPick: Function;
|
||
/**
|
||
* 移除
|
||
*/
|
||
destroyItem(): void;
|
||
/**
|
||
* 获取名称
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
/**
|
||
* 设置名称
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
name: any;
|
||
/**
|
||
* 获取计时器
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private readonly clock;
|
||
/**
|
||
* 获取集合器
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private readonly entities;
|
||
/**
|
||
* 获取加载状态
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private readonly isLoading;
|
||
/**
|
||
* 获取改变事件
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private readonly changedEvent;
|
||
/**
|
||
* 获取点击事件
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private readonly pickEvent;
|
||
/**
|
||
* 获取错误事件
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private readonly errorEvent;
|
||
/**
|
||
* 获取加载事件
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private readonly loadingEvent;
|
||
/**
|
||
* 获取显示状态
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
/**
|
||
* 设置显示状态
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private show;
|
||
/**
|
||
* 获取群集
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
/**
|
||
* 设置群集
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private clustering;
|
||
/**
|
||
* @private 查找当前渲染队列是否有当前瓦片
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private findTileFromCache;
|
||
/**
|
||
* @private 查找当前渲染队列是否有当前瓦片
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private handleParentAndChildren;
|
||
/**
|
||
* @private 创建广告牌
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private createBill;
|
||
/**
|
||
* @private 加载数据
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private processBill;
|
||
/**
|
||
* @private 加载数据
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private processFeature;
|
||
/**
|
||
* @private 加载数据
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private loadBillData;
|
||
/**
|
||
* @private 为瓦片添加数据
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private processTile;
|
||
/**
|
||
* @private 生成瓦片唯一Key值
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private getRenderTileKeys;
|
||
/**
|
||
* @private 更新函数
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private update;
|
||
/**
|
||
* @private 销毁
|
||
* @memberof IconTileDataSource
|
||
*/
|
||
private destroy;
|
||
}
|
||
/**
|
||
* 图标矢量参数
|
||
* 该方法是和icenter配合的特定功能,url当前对外呈现的是wmts的方式接入,不支持其他方式如wms等
|
||
*/
|
||
class IconTileOpt {
|
||
/**服务地址 */
|
||
url: string;
|
||
/**图层信息 */
|
||
layer: string;
|
||
/**图标路径 */
|
||
imageUrl: string;
|
||
/**数据显示最小层级 (范围:>=0 && <=22)*/
|
||
minLevel: number;
|
||
/**数据显示最大层级 (范围:>=0 && <=22)*/
|
||
maxLevel: number;
|
||
/**是否开启选中功能 */
|
||
isPick: boolean;
|
||
/**被选中颜色 */
|
||
pickedColor: string;
|
||
/**图标缩放系数 (范围:>=0 && <=10)*/
|
||
scale: number;
|
||
constructor(url: string, layer: string, imageUrl?: string, minLevel?: number, maxLevel?: number, isPick?: boolean, pickedColor?: string, scale?: number);
|
||
}
|
||
|
||
class GxGeoRegion {
|
||
MinX: any;
|
||
MaxX: any;
|
||
MinY: any;
|
||
MaxY: any;
|
||
MinLon: any;
|
||
MaxLon: any;
|
||
MinLat: any;
|
||
MaxLat: any;
|
||
readonly CenterX: number;
|
||
readonly CenterY: number;
|
||
readonly XSpan: number;
|
||
readonly YSpan: number;
|
||
readonly CenterLon: number;
|
||
readonly CenterLat: number;
|
||
}
|
||
|
||
class JPlaceNameTile {
|
||
static CurrentLV: number;
|
||
static CurrentPlaceName: Placename[];
|
||
LayerStyles: Map<number, LayerStyle>;
|
||
private viewer;
|
||
private labelCollection;
|
||
private billboardcollection;
|
||
rootcollection: Cesium.PrimitiveCollection;
|
||
InitViewer(viewer: Cesium.Viewer): void;
|
||
show: boolean;
|
||
load(data: Array<Placename>, clear: boolean): void;
|
||
static borderColor: string;
|
||
static getPlaceLabelParam(bm: number): [number, string, string];
|
||
}
|
||
|
||
class LayerStyle {
|
||
FontName: string;
|
||
FontSize: number;
|
||
FontColor: number;
|
||
FontBolderColor: number;
|
||
ImageDisplay: boolean;
|
||
ImageString: string;
|
||
FontA: number;
|
||
FontR: number;
|
||
FontG: number;
|
||
FontB: number;
|
||
BorderA: number;
|
||
BorderR: number;
|
||
BorderG: number;
|
||
BorderB: number;
|
||
}
|
||
|
||
class Placename {
|
||
DMBS: number;
|
||
DMCJBM: number;
|
||
DMMC: string;
|
||
WZ: string;
|
||
MS: string;
|
||
DLBM: number;
|
||
DMMCCD: number;
|
||
DMJP: string;
|
||
DMQP: string;
|
||
DMBM: string;
|
||
BDY: string;
|
||
YWMC: string;
|
||
DMDZ: string;
|
||
DMGC: number;
|
||
LV: number;
|
||
readonly LocStr: string;
|
||
}
|
||
|
||
/**
|
||
* J地名服务对接
|
||
* 说明:此接口主要对J地名服务对接
|
||
*/
|
||
class PlaceNameService {
|
||
private baseurl;
|
||
private collection;
|
||
private LayerStyles;
|
||
private viewer;
|
||
private _visible;
|
||
/**
|
||
* 设置显隐
|
||
* @param value 显隐标志位
|
||
*/
|
||
/**
|
||
* 设置显隐
|
||
*/
|
||
visible: boolean;
|
||
/**
|
||
* 初始化
|
||
* @param viewer 视图对象
|
||
* @param url 服务地址
|
||
*/
|
||
constructor(viewer: Cesium.Viewer, url?: string);
|
||
private initPlaceNameStyle;
|
||
/**
|
||
* 显示
|
||
*/
|
||
private showPlaceName;
|
||
private oldgeocoord;
|
||
private onCameraChange;
|
||
private readonly DegreeToRadians;
|
||
private GetTileList;
|
||
private CaculateTile;
|
||
private getJSON;
|
||
private getCurrentExtent;
|
||
}
|
||
|
||
class QRTile {
|
||
Level: any;
|
||
Row: any;
|
||
Col: any;
|
||
constructor(level: any, row: any, col: any);
|
||
addPreZero(num: number): string;
|
||
Code(): string;
|
||
}
|
||
|
||
class ViewerSceen {
|
||
xmin: number;
|
||
ymin: number;
|
||
xmax: number;
|
||
ymax: number;
|
||
height: number;
|
||
}
|
||
|
||
/**
|
||
* @类别 需手动创建,然后添加到矢量图层类中<br>
|
||
* @描述 矢量地名类
|
||
* @see <a href='../../../examples/gallery/editor.html#placename'>矢量地名</a>
|
||
*/
|
||
class JQPlaceNameTile extends Item {
|
||
protected _name: any;
|
||
protected _changed: Cesium.Event;
|
||
protected _error: Cesium.Event;
|
||
protected _isLoading: boolean;
|
||
protected _loading: Cesium.Event;
|
||
protected _entityCluster: Cesium.EntityCluster;
|
||
protected _entityCollection: Cesium.EntityCollection;
|
||
protected _url: any;
|
||
protected _scene: any;
|
||
private _viewer;
|
||
protected _tileReplacementQueue: any;
|
||
protected _tileCacheSize: any;
|
||
protected _renderTiles: Cesium.AssociativeArray;
|
||
protected _clusterDirty: number;
|
||
protected _table: Map<any, any>;
|
||
protected _styleTable: any;
|
||
protected _currentTiles: any[];
|
||
protected _id: string;
|
||
protected _tilingScheme: any;
|
||
protected _placeNameImagery: any;
|
||
protected _timer: any;
|
||
/**
|
||
* 初始化
|
||
* @param options 参数类
|
||
* @returns
|
||
* ```
|
||
* 示例:
|
||
* let PlaceNameTileOpt = new GV.JQPlaceNameTileOpt(urlService);
|
||
* let placeNameTile = new GV.JQPlaceNameTile(PlaceNameTileOpt);
|
||
* viewer.tileLayer.add(placeNameTile);
|
||
* ```
|
||
*/
|
||
constructor(options: JQPlaceNameTileOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 初始化
|
||
* @param {GeoCanvas} 视图对象
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 删除
|
||
*/
|
||
destroyItem(): void;
|
||
private createLevelMap;
|
||
private createDefaultStyles;
|
||
/**
|
||
* 显示或隐藏图层.
|
||
* @memberof PlaceTileDataSource.prototype
|
||
* @type {Boolean}
|
||
*/
|
||
private show;
|
||
/**
|
||
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
|
||
*
|
||
* @memberof PlaceTileDataSource.prototype
|
||
* @type {EntityCluster}
|
||
*/
|
||
private clustering;
|
||
private createTileKey;
|
||
private processTile;
|
||
private update;
|
||
private doUpdate;
|
||
private getX;
|
||
private getY;
|
||
private cluster;
|
||
private destroy;
|
||
}
|
||
/**
|
||
* 文字矢量参数类
|
||
*/
|
||
class JQPlaceNameTileOpt {
|
||
/**服务地址 */
|
||
url: string;
|
||
/**投影方式 */
|
||
tilingScheme: Cesium.WebMercatorTilingScheme;
|
||
/**级别映射 */
|
||
table: Map<number, Array<number>>;
|
||
/**样式 */
|
||
styles: Map<number, Array<JQPlaceFontStyle>>;
|
||
constructor(url: string, table?: Map<number, Array<number>>, styles?: Map<number, Array<JQPlaceFontStyle>>);
|
||
}
|
||
/**
|
||
* 文字样式
|
||
*/
|
||
class JQPlaceFontStyle {
|
||
/**字体、大小 */
|
||
font: string;
|
||
/**字体颜色 */
|
||
fillColor: string;
|
||
/**外边框颜色 */
|
||
outlineColor: string;
|
||
/**外边框宽度 */
|
||
outlineWidth: number;
|
||
constructor(font?: string, fillColor?: string, outlineColor?: string, outlineWidth?: number);
|
||
}
|
||
class PlacenameWrraper {
|
||
constructor(options: any);
|
||
static getPlaceList(arrayBuffer: any): any[];
|
||
}
|
||
/**
|
||
*@ignore
|
||
*/
|
||
class placeNameImageryProvider {
|
||
_tilingScheme: Cesium.WebMercatorTilingScheme;
|
||
_tileWidth: number;
|
||
_tileHeight: number;
|
||
_readyPromise: any;
|
||
_maximumLevel: number;
|
||
_minimumLevel: number;
|
||
_requestImage: any;
|
||
constructor(options: any);
|
||
readonly tileWidth: number;
|
||
readonly tileHeight: number;
|
||
readonly maximumLevel: number;
|
||
readonly minimumLevel: number;
|
||
readonly tilingScheme: Cesium.WebMercatorTilingScheme;
|
||
readonly rectangle: Cesium.Rectangle;
|
||
readonly ready: boolean;
|
||
readonly readyPromise: any;
|
||
readonly hasAlphaChannel: boolean;
|
||
requestImage: any;
|
||
}
|
||
|
||
/**
|
||
* @类别 需手动创建,然后添加到矢量图层类中<br>
|
||
* @描述 矢量线
|
||
* @see <a href='../../../examples/gallery/editor.html#vectorDisplay'>矢量线</a>
|
||
*/
|
||
class LineTile extends Item {
|
||
protected _id: string;
|
||
protected _name: any;
|
||
protected _changed: any;
|
||
protected _error: any;
|
||
protected _isLoading: boolean;
|
||
protected _loading: any;
|
||
protected _entityCollection: any;
|
||
protected _entityCluster: any;
|
||
protected _scene: any;
|
||
protected _provider: any;
|
||
protected _loaded: boolean;
|
||
protected _options: any;
|
||
protected _tileReplacementQueue: any;
|
||
protected _tileCacheSize: any;
|
||
protected _minLevel: any;
|
||
protected _renderTiles: any;
|
||
protected _maxLevel: any;
|
||
protected _pickEvent: any;
|
||
protected _oldTile: any;
|
||
protected _isBuilding: any;
|
||
protected _pickShow: any;
|
||
protected _pickType: any;
|
||
protected _pickPrimitive: any;
|
||
protected _viewer: GeoCanvas;
|
||
/**
|
||
* 初始化
|
||
* @param options 参数类
|
||
* @returns
|
||
* ```
|
||
* 示例:
|
||
* let lineTileOpt = new GV.LineTileOpt(urlService, layer);
|
||
* let lineTile = new GV.LineTile(lineTileOpt);
|
||
* viewer.tileLayer.add(lineTile);
|
||
* ```
|
||
*/
|
||
constructor(options: LineTileOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
private coordinatesArrayToCartesianArray;
|
||
private createLineString;
|
||
private processLineString;
|
||
private processMultiLineString;
|
||
private createPolygon;
|
||
private processPolygon;
|
||
private processMultiPolygon;
|
||
private processFeature;
|
||
private processFeatureCollection;
|
||
private defaultCrsFunction;
|
||
/**
|
||
* 初始化
|
||
* @param {GeoCanvas} viewer 视图信息
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 删除
|
||
*/
|
||
destroyItem(): void;
|
||
/**
|
||
* 添加点击回调
|
||
* @param {Function} callback 回调
|
||
*/
|
||
onPick: Function;
|
||
/**
|
||
* Gets an object that maps the name of a crs to a callback function which takes a GeoJSON coordinate
|
||
* and transforms it into a WGS84 Earth-fixed Cartesian. Older versions of GeoJSON which
|
||
* supported the EPSG type can be added to this list as well, by specifying the complete EPSG name,
|
||
* for example 'EPSG:4326'.
|
||
* @memberof GeoJsonDataSource
|
||
* @type {Object}
|
||
*/
|
||
private readonly crsNames;
|
||
/**
|
||
* Gets or sets a human-readable name for this instance.
|
||
* @memberof VectorTileDataSource.prototype
|
||
* @type {String}
|
||
*/
|
||
name: any;
|
||
private readonly clock;
|
||
/**
|
||
* Gets the collection of {@link Entity} instances.
|
||
* @memberof VectorTileDataSource.prototype
|
||
* @type {EntityCollection}
|
||
*/
|
||
private readonly entities;
|
||
/**
|
||
* Gets a value indicating if the data source is currently loading data.
|
||
* @memberof VectorTileDataSource.prototype
|
||
* @type {Boolean}
|
||
*/
|
||
private readonly isLoading;
|
||
/**
|
||
* Gets an event that will be raised when the underlying data changes.
|
||
* @memberof GeoJsonDataSource.prototype
|
||
* @type {Event}
|
||
*/
|
||
private readonly changedEvent;
|
||
/**
|
||
* Gets an event that will be raised when pick rendered object.
|
||
* @memberof VectorTileDataSource.prototype
|
||
* @type {Event}
|
||
*/
|
||
private readonly pickEvent;
|
||
/**
|
||
* Gets an event that will be raised if an error is encountered during processing.
|
||
* @memberof VectorTileDataSource.prototype
|
||
* @type {Event}
|
||
*/
|
||
private readonly errorEvent;
|
||
/**
|
||
* Gets an event that will be raised when the data source either starts or stops loading.
|
||
* @memberof VectorTileDataSource.prototype
|
||
* @type {Event}
|
||
*/
|
||
private readonly loadingEvent;
|
||
/**
|
||
* Gets whether or not this data source should be displayed.
|
||
* @memberof VectorTileDataSource.prototype
|
||
* @type {Boolean}
|
||
*/
|
||
private show;
|
||
/**
|
||
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
|
||
*
|
||
* @memberof VectorTileDataSource.prototype
|
||
* @type {EntityCluster}
|
||
*/
|
||
private clustering;
|
||
private pickAllTileProperty;
|
||
private findTileFromCache;
|
||
private findParentAndChildren;
|
||
private handleParentAndChildren;
|
||
private processTile;
|
||
private getRenderTileKeys;
|
||
private update;
|
||
private destroy;
|
||
}
|
||
/**
|
||
* 参数类
|
||
* 该方法是和icenter配合的特定功能,url当前对外呈现的是wmts的方式接入,不支持其他方式如wms等
|
||
*/
|
||
class LineTileOpt {
|
||
/**服务地址 */
|
||
url: string;
|
||
/**图层信息 */
|
||
layer: string;
|
||
/**wmts中对应的<TileMatrixSet>节点下面的<ows:Identifier>属性信息 */
|
||
tilematrixset: string;
|
||
/**格式 'application/json;type=geojson'或者'application/x-protobuf;type=mapbox-vector'*/
|
||
format: string;
|
||
/**线颜色 */
|
||
lineColor: string;
|
||
/**线宽 */
|
||
strokeWidth: Number;
|
||
/**显示的最小层级 (范围:>=0 && <=22)*/
|
||
minLevel: number;
|
||
/**显示的最大层级 (范围:>=0 && <=22)*/
|
||
maxLevel: number;
|
||
/**是否选中 */
|
||
isPick: boolean;
|
||
/**选中颜色 */
|
||
pickedColor: string;
|
||
constructor(url: string, layer: string, lineColor?: string, strokeWidth?: number, minLevel?: number, maxLevel?: number, isPick?: boolean, pickedColor?: string);
|
||
}
|
||
|
||
/**
|
||
* @类别 需手动创建,然后添加到矢量图层类中<br>
|
||
* @描述 大规模倾斜摄影
|
||
* @see <a href='../../../examples/gallery/editor.html#big3dTile'>大规模倾斜摄影</a>
|
||
*/
|
||
class ObliqueTile extends Item {
|
||
protected _name: any;
|
||
protected _changed: Cesium.Event;
|
||
protected _error: Cesium.Event;
|
||
protected _loading: Cesium.Event;
|
||
protected _isLoading: boolean;
|
||
protected _entityCollection: Cesium.EntityCollection;
|
||
protected _entityCluster: Cesium.EntityCluster;
|
||
protected _scene: any;
|
||
protected _loaded: boolean;
|
||
protected _tileReplacementQueue: any;
|
||
protected _tileCacheSize: any;
|
||
protected _renderTiles: Cesium.AssociativeArray;
|
||
protected _maxLevel: any;
|
||
protected _showLevel: any;
|
||
protected _deleteTileSetEvent: Cesium.Event;
|
||
protected _pickEvent: Cesium.Event;
|
||
protected _vectorLevel: any;
|
||
protected _maximumScreenSpaceError: any;
|
||
protected _maxmemory: any;
|
||
protected _url: any;
|
||
protected _bArea: any;
|
||
protected _minX: any;
|
||
protected _minY: any;
|
||
protected _maxX: any;
|
||
protected _maxY: any;
|
||
protected _viewer: GeoCanvas;
|
||
protected _id: string;
|
||
/**
|
||
* 初始化
|
||
* @param {string} url 服务地址
|
||
* @param {number} vectorLevel 倾斜摄影根节点所在层级 (范围:>=0 && <=22)
|
||
* @param {number} showLevel 层级显示基数 (范围:>=0 && <=22)
|
||
* @param {number} maxscreenerror 倾斜分辨率 (范围:>4 && <=512)
|
||
* @param {number} maxmemory 启用显存 (范围:>256 && <=2048)
|
||
* @returns
|
||
* ```
|
||
* 示例:
|
||
* let oblique = new GV.ObliqueTile(urlService, 13, 16,128,1024);
|
||
* viewer.tileLayer.add(oblique);
|
||
* ```
|
||
*/
|
||
constructor(url: string, vectorLevel?: number, showLevel?: number, maxscreenerror?: number, maxmemory?: number);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 初始化
|
||
* @param {GeoCanvas} viewer 视图信息
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 移除
|
||
*/
|
||
destroyItem(): void;
|
||
/**
|
||
* Gets an object that maps the name of a crs to a callback function which takes a GeoJSON coordinate
|
||
* and transforms it into a WGS84 Earth-fixed Cartesian. Older versions of GeoJSON which
|
||
* supported the EPSG type can be added to this list as well, by specifying the complete EPSG name,
|
||
* for example 'EPSG:4326'.
|
||
* @memberof GeoJsonDataSource
|
||
* @type {Object}
|
||
*/
|
||
private readonly crsNames;
|
||
/**
|
||
* Gets an object that maps the href property of a crs link to a callback function
|
||
* which takes the crs properties object and returns a Promise that resolves
|
||
* to a function that takes a GeoJSON coordinate and transforms it into a WGS84 Earth-fixed Cartesian.
|
||
* Items in this object take precedence over those defined in <code>crsLinkHrefs</code>, assuming
|
||
* the link has a type specified.
|
||
* @memberof GeoJsonDataSource
|
||
* @type {Object}
|
||
*/
|
||
private readonly crsLinkHrefs;
|
||
/**
|
||
* Gets an object that maps the type property of a crs link to a callback function
|
||
* which takes the crs properties object and returns a Promise that resolves
|
||
* to a function that takes a GeoJSON coordinate and transforms it into a WGS84 Earth-fixed Cartesian.
|
||
* Items in <code>crsLinkHrefs</code> take precedence over this object.
|
||
* @memberof GeoJsonDataSource
|
||
* @type {Object}
|
||
*/
|
||
private readonly crsLinkTypes;
|
||
/**
|
||
* Gets or sets a human-readable name for this instance.
|
||
* @memberof ObliqueTileDataSource.prototype
|
||
* @type {String}
|
||
*/
|
||
name: any;
|
||
private readonly clock;
|
||
/**
|
||
* Gets the collection of {@link Entity} instances.
|
||
* @memberof ObliqueTileDataSource.prototype
|
||
* @type {EntityCollection}
|
||
*/
|
||
private readonly entities;
|
||
/**
|
||
* Gets a value indicating if the data source is currently loading data.
|
||
* @memberof ObliqueTileDataSource.prototype
|
||
* @type {Boolean}
|
||
*/
|
||
private readonly isLoading;
|
||
/**
|
||
* Gets an event that will be raised when the underlying data changes.
|
||
* @memberof GeoJsonDataSource.prototype
|
||
* @type {Event}
|
||
*/
|
||
private readonly changedEvent;
|
||
/**
|
||
* Gets an event that will be raised when pick rendered object.
|
||
* @memberof ObliqueTileDataSource.prototype
|
||
* @type {Event}
|
||
*/
|
||
private readonly pickEvent;
|
||
/**
|
||
* Gets an event that will be raised if an error is encountered during processing.
|
||
* @memberof ObliqueTileDataSource.prototype
|
||
* @type {Event}
|
||
*/
|
||
private readonly errorEvent;
|
||
/**
|
||
* Gets an event that will be raised when the data source either starts or stops loading.
|
||
* @memberof ObliqueTileDataSource.prototype
|
||
* @type {Event}
|
||
*/
|
||
private readonly loadingEvent;
|
||
/**
|
||
* Gets whether or not this data source should be displayed.
|
||
* @memberof ObliqueTileDataSource.prototype
|
||
* @type {Boolean}
|
||
*/
|
||
private show;
|
||
/**
|
||
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
|
||
*
|
||
* @memberof ObliqueTileDataSource.prototype
|
||
* @type {EntityCluster}
|
||
*/
|
||
private clustering;
|
||
private findTileFromCache;
|
||
private tilesetDeletechange;
|
||
private getParentKey;
|
||
private processTile;
|
||
private getRenderTileKeys;
|
||
private update;
|
||
private destroy;
|
||
}
|
||
|
||
/**
|
||
* @类别 Cesium扩展类<br>
|
||
* @描述 矢量地名类
|
||
* @see <a href='../../../examples/gallery/editor.html#placename'>矢量地名</a>
|
||
*/
|
||
class PlaceNameTile extends Item {
|
||
protected _name: any;
|
||
protected _changed: Cesium.Event;
|
||
protected _error: Cesium.Event;
|
||
protected _isLoading: boolean;
|
||
protected _loading: Cesium.Event;
|
||
protected _entityCluster: Cesium.EntityCluster;
|
||
protected _entityCollection: Cesium.EntityCollection;
|
||
protected _url: any;
|
||
protected _scene: any;
|
||
private _viewer;
|
||
protected _tileReplacementQueue: any;
|
||
protected _tileCacheSize: any;
|
||
protected _renderTiles: Cesium.AssociativeArray;
|
||
protected _clusterDirty: number;
|
||
protected _table: Map<any, any>;
|
||
protected _styleTable: any;
|
||
protected _id: string;
|
||
/**
|
||
* 初始化
|
||
* @param options 参数类
|
||
* @returns
|
||
* ```
|
||
* 示例:
|
||
* let PlaceNameTileOpt = new GV.PlaceNameTileOpt(urlService);
|
||
* let placeNameTile = new GV.PlaceNameTile(PlaceNameTileOpt);
|
||
* viewer.tileLayer.add(placeNameTile);
|
||
* ```
|
||
*/
|
||
constructor(options: PlaceNameTileOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 初始化
|
||
* @param {GeoCanvas} 视图对象
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 删除
|
||
*/
|
||
destroyItem(): void;
|
||
private createLevelMap;
|
||
private createDefaultStyles;
|
||
/**
|
||
* Gets or sets a human-readable name for this instance.
|
||
* @memberof PlaceTileDataSource.prototype
|
||
* @type {String}
|
||
*/
|
||
private readonly clock;
|
||
/**
|
||
* Gets the collection of {@link Entity} instances.
|
||
* @memberof PlaceTileDataSource.prototype
|
||
* @type {EntityCollection}
|
||
*/
|
||
private readonly entities;
|
||
/**
|
||
* Gets a value indicating if the data source is currently loading data.
|
||
* @memberof PlaceTileDataSource.prototype
|
||
* @type {Boolean}
|
||
*/
|
||
private readonly isLoading;
|
||
/**
|
||
* Gets an event that will be raised when the underlying data changes.
|
||
* @memberof PlaceTileDataSource.prototype
|
||
* @type {Event}
|
||
*/
|
||
private readonly changedEvent;
|
||
/**
|
||
* Gets an event that will be raised if an error is encountered during processing.
|
||
* @memberof PlaceTileDataSource.prototype
|
||
* @type {Event}
|
||
*/
|
||
private readonly errorEvent;
|
||
/**
|
||
* Gets an event that will be raised when the data source either starts or stops loading.
|
||
* @memberof PlaceTileDataSource.prototype
|
||
* @type {Event}
|
||
*/
|
||
private readonly loadingEvent;
|
||
/**
|
||
* Gets whether or not this data source should be displayed.
|
||
* @memberof PlaceTileDataSource.prototype
|
||
* @type {Boolean}
|
||
*/
|
||
private show;
|
||
/**
|
||
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
|
||
*
|
||
* @memberof PlaceTileDataSource.prototype
|
||
* @type {EntityCluster}
|
||
*/
|
||
private clustering;
|
||
private createTileKey;
|
||
private getSubTileKeys;
|
||
private getTiles;
|
||
private calculateTiles;
|
||
private getGeoCode;
|
||
private processTile;
|
||
private _control;
|
||
doOriginTiles(): void;
|
||
doPlaceTiles(): void;
|
||
doCreateTiles(): void;
|
||
doRequestTile(tile: any): any;
|
||
doAnalysis(tile: any): void;
|
||
doRender(tile: any): void;
|
||
doProcess(): void;
|
||
private _clusterCount;
|
||
private update;
|
||
private getX;
|
||
private getY;
|
||
private cluster;
|
||
private destroy;
|
||
}
|
||
/**
|
||
* 矢量地名参数类
|
||
*/
|
||
class PlaceNameTileOpt {
|
||
/**服务地址 */
|
||
url: string;
|
||
/**级别映射 */
|
||
table: Map<number, Array<number>>;
|
||
/**样式 */
|
||
styles: Map<number, Array<PlaceFontStyle>>;
|
||
constructor(url: string, table?: Map<number, Array<number>>, styles?: Map<number, Array<PlaceFontStyle>>);
|
||
}
|
||
/**
|
||
* 文字样式
|
||
*/
|
||
class PlaceFontStyle {
|
||
/**字体、大小 */
|
||
font: string;
|
||
/**字体颜色 */
|
||
fillColor: string;
|
||
/**外边框颜色 */
|
||
outlineColor: string;
|
||
/**外边框宽度 */
|
||
outlineWidth: number;
|
||
constructor(font?: string, fillColor?: string, outlineColor?: string, outlineWidth?: number);
|
||
}
|
||
|
||
/**
|
||
* @类别 需手动创建,然后添加到矢量图层类中<br>
|
||
* @描述 矢量面类
|
||
* @see <a href='../../../examples/gallery/editor.html#modelTile'>矢量白模</a>
|
||
*/
|
||
class PolygonTile extends Item {
|
||
protected _scene: any;
|
||
private _viewer;
|
||
protected _provider: any;
|
||
protected _name: any;
|
||
protected _tileCacheSize: any;
|
||
protected _color: any;
|
||
protected _isPick: any;
|
||
protected _pickedColor: any;
|
||
protected _minLevel: any;
|
||
protected _maxLevel: any;
|
||
protected _pickInstance: any;
|
||
protected _pickTile: any;
|
||
protected _pickPrimitive: any;
|
||
protected _changed: Cesium.Event;
|
||
protected _error: Cesium.Event;
|
||
protected _loading: Cesium.Event;
|
||
protected _isLoading: boolean;
|
||
protected _entityCluster: Cesium.EntityCluster;
|
||
protected _entityCollection: Cesium.EntityCollection;
|
||
protected _loaded: boolean;
|
||
protected _tileReplacementQueue: any;
|
||
protected _renderTiles: Cesium.AssociativeArray;
|
||
protected _pickEvent: Cesium.Event;
|
||
protected _outColor: any;
|
||
protected _oldInstance: any;
|
||
protected _id: string;
|
||
private _isExtruded;
|
||
private _extrudedHeight;
|
||
/**
|
||
* 初始化
|
||
* @param options 参数类
|
||
* @returns
|
||
* ```
|
||
* 示例:
|
||
* let polygonTileTileOpt = new GV.PolygonTileTileOpt(urlService, layer);
|
||
* polygonTileTileOpt.color = '#ffffff';
|
||
* let polygonTile = new GV.PolygonTile(polygonTileTileOpt);
|
||
* viewer.tileLayer.add(polygonTile);
|
||
* ```
|
||
*/
|
||
constructor(options: PolygonTileOpt, name?: string);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* 初始化
|
||
* @param {GeoCanvas} 视图对象
|
||
*/
|
||
initItem(viewer: GeoCanvas): void;
|
||
/**
|
||
* 移除
|
||
*/
|
||
destroyItem(): void;
|
||
/**
|
||
*添加回掉监听
|
||
* @param {Function} callback 回调
|
||
*/
|
||
onPick: Function;
|
||
/**
|
||
* 获取名称
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
/**
|
||
* 更改名称
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
name: any;
|
||
/**
|
||
* 获取计时器
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private readonly clock;
|
||
/**
|
||
* 获取集合器
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private readonly entities;
|
||
/**
|
||
* 获取加载状态
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private readonly isLoading;
|
||
/**
|
||
* 获取更改事件
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private readonly changedEvent;
|
||
/**
|
||
* 获取点击事件
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private readonly pickEvent;
|
||
/**
|
||
* 获取错误事件
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private readonly errorEvent;
|
||
/**
|
||
* 获取加载事件
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private readonly loadingEvent;
|
||
/**
|
||
* 获取是否显示
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
/**
|
||
* 更改显示
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private show;
|
||
/**
|
||
* 获取群集
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
/**
|
||
* 设置群集
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private clustering;
|
||
/**
|
||
* @private 查找当前渲染队列是否有当前瓦片
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private findTileFromCache;
|
||
/**
|
||
* @private 查找父节点与子节点
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private handleParentAndChildren;
|
||
/**
|
||
* @private 创建白模实体
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private createModel;
|
||
/**
|
||
* @private 加载数据
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private processModel;
|
||
/**
|
||
* @private 加载数据
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private processFeature;
|
||
/**
|
||
* @private 加载数据
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private loadModelData;
|
||
/**
|
||
* @private 为瓦片添加数据
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private processTile;
|
||
/**
|
||
* @private 生成瓦片唯一Key值
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private getRenderTileKeys;
|
||
/**
|
||
* @private 更新函数
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private update;
|
||
/**
|
||
* @private 销毁
|
||
* @memberof ModelTileDataSource
|
||
*/
|
||
private destroy;
|
||
}
|
||
/**
|
||
* 面矢量参数类
|
||
* 该方法是和icenter配合的特定功能,url当前对外呈现的是wmts的方式接入,不支持其他方式如wms等
|
||
*/
|
||
class PolygonTileOpt {
|
||
/**服务地址 */
|
||
url: string;
|
||
/**图层信息 */
|
||
layer: string;
|
||
/**面颜色 */
|
||
color: string;
|
||
/**显示最小层级 (范围:>=0 && <=22)*/
|
||
minLevel: number;
|
||
/**显示最大层级 (范围:>=0 && <=22)*/
|
||
maxLevel: number;
|
||
/**是否选中 */
|
||
isPick: boolean;
|
||
/**是否拉伸 */
|
||
isExtruded: boolean;
|
||
/**选中后颜色 */
|
||
pickedColor: string;
|
||
/**拉伸高度 */
|
||
extrudedHeight: number;
|
||
constructor(url: string, layer: string, color?: string, minLevel?: number, maxLevel?: number, isPick?: boolean, isExtruded?: boolean, pickedColor?: string, extrudedHeight?: number);
|
||
}
|
||
|
||
class TileLayer extends Layer {
|
||
_viewer: Cesium.Viewer;
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**
|
||
* 添加对象
|
||
* @param item
|
||
*/
|
||
add(item: Item): Item;
|
||
/**
|
||
* 删除对象
|
||
* @param
|
||
*/
|
||
remove(value: string | Item): Item;
|
||
/**
|
||
* 解析json
|
||
* @param json 解析
|
||
*/
|
||
parseJson(json: any): void;
|
||
}
|
||
|
||
class TMSVectorProvider {
|
||
protected _url: any;
|
||
protected _format: any;
|
||
protected _minLevel: any;
|
||
protected _maxLevel: any;
|
||
protected _tilingScheme: any;
|
||
constructor(options: any);
|
||
readonly minLevel: any;
|
||
readonly maxLevel: any;
|
||
requestVectorTile(level: any, x: any, y: any, success: any, failure: any): any;
|
||
requestPromise(level: any, x: any, y: any): any;
|
||
}
|
||
|
||
class VectorTile {
|
||
private _level;
|
||
private _x;
|
||
private _y;
|
||
private _prepare;
|
||
private _visible;
|
||
private _removeCount;
|
||
private _eligibleForUnloading;
|
||
private _replacementPrevious;
|
||
private _replacementNext;
|
||
private _type;
|
||
private _instances;
|
||
private _primitive;
|
||
private _opt;
|
||
onload: Function;
|
||
constructor(level: number, x: number, y: number, opt: object);
|
||
readonly level: number;
|
||
readonly x: number;
|
||
readonly y: number;
|
||
readonly key: string;
|
||
readonly type: string;
|
||
primitive: any;
|
||
prepare: boolean;
|
||
visible: boolean;
|
||
removeCount: number;
|
||
eligibleForUnloading: boolean;
|
||
replacementPrevious: any;
|
||
replacementNext: any;
|
||
isEqual(level: number, x: number, y: number): boolean;
|
||
isKeyEqual(key: string): boolean;
|
||
private coordinatesArrayToCartesianArray;
|
||
private createLineString;
|
||
private createPolygon;
|
||
createGeometry(feature: any): void;
|
||
createPrimitive(): any;
|
||
destroy(): void;
|
||
freeResources(): void;
|
||
pick(id: any): any;
|
||
resetOriginColor(): void;
|
||
}
|
||
|
||
class VectorTileItem extends Item {
|
||
protected _viewer: Cesium.Viewer;
|
||
protected _id: string;
|
||
protected _opt: VectorTileItemOpt;
|
||
protected _resource: any;
|
||
protected _tags: any;
|
||
protected _renderTiles: any;
|
||
protected _eventHandler: any;
|
||
protected _pickEvent: any;
|
||
protected _pickTile: VectorTile;
|
||
protected _entityCollection: any;
|
||
protected _cluster: any;
|
||
protected _changed: any;
|
||
protected _primitives: any;
|
||
protected _groundPrimitives: any;
|
||
constructor(opt: VectorTileItemOpt);
|
||
combineQueryParameters(q1: any, q2: any): Object;
|
||
resetResource(url: any): void;
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
/**
|
||
* 获取当前对象类型(给类型为只读属性)
|
||
*/
|
||
static readonly type: string;
|
||
/**
|
||
* Gets the collection of {@link Entity} instances.
|
||
* @memberof VectorTileDataSource.prototype
|
||
* @type {EntityCollection}
|
||
*/
|
||
readonly entities: any;
|
||
/**
|
||
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
|
||
*
|
||
* @memberof VectorTileDataSource.prototype
|
||
* @type {EntityCluster}
|
||
*/
|
||
private clustering;
|
||
private readonly changedEvent;
|
||
readonly minLevel: number;
|
||
readonly maxLevel: number;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行add方法添加时被调用
|
||
*/
|
||
initItem(viewer: Cesium.Viewer): any;
|
||
/**
|
||
* @注意 所有item的基类方法,外部无需调用
|
||
* @描述 初始化方法,在父类执行remove方法添加时被调用
|
||
*/
|
||
destroyItem(): void;
|
||
private destroy;
|
||
private _control;
|
||
/**
|
||
* 根据瓦块切分方式,获取当前显示的瓦块编号。目前已知的瓦片切分方式为:
|
||
* GeographicTilingScheme和WebMercatorTilingScheme两种方式,第一种方式为地球默认的。
|
||
*/
|
||
doOriginTiles(): void;
|
||
doConvertTiles(): void;
|
||
doCreateTiles(): void;
|
||
doRequest(tile: any): any;
|
||
doAnalysis(tile: any): void;
|
||
doCreateGeometry(tile: any): void;
|
||
doCreatePrimitive(tile: any): void;
|
||
doProcessTiles(): void;
|
||
update(time: any): boolean;
|
||
/**
|
||
* 添加点击回调
|
||
* @param {Function} callback 回调
|
||
*/
|
||
onPick: Function;
|
||
}
|
||
class VectorTileItemOpt {
|
||
providerType: string;
|
||
url: string;
|
||
layer?: string;
|
||
tilematrixset?: string;
|
||
format?: string;
|
||
minLevel?: number;
|
||
maxLevel?: number;
|
||
tilingScheme?: any;
|
||
lineWidth?: number;
|
||
lineColor?: string;
|
||
fillColor?: string;
|
||
pickColor?: string;
|
||
constructor(type?: string);
|
||
}
|
||
|
||
class WMTSVectorProvider {
|
||
protected _url: any;
|
||
protected _layer: any;
|
||
protected _format: any;
|
||
protected _tilematrixset: any;
|
||
protected _style: any;
|
||
protected _version: any;
|
||
protected _minLevel: any;
|
||
protected _maxLevel: any;
|
||
constructor(options: any);
|
||
readonly minLevel: any;
|
||
readonly maxLevel: any;
|
||
requestVectorTile(level: any, x: any, y: any, success: any, failure: any): any;
|
||
requestPromise(level: any, x: any, y: any): any;
|
||
}
|
||
|
||
/**
|
||
* KMLLayer图层
|
||
*/
|
||
class GeoJsonLayer extends VectorItem {
|
||
private _renderObj;
|
||
private _vectorLayer;
|
||
private _option;
|
||
private _type;
|
||
constructor(option: GeoJsonLayerOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
static readonly type: string;
|
||
initItem(geojsonlayer: VectorLayer): void;
|
||
destroyItem(): void;
|
||
getRenderObject(): Cesium.DataSource;
|
||
parseOption(option: any): void;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 解析json对象
|
||
*/
|
||
parseJson(option: any): void;
|
||
}
|
||
class GeoJsonLayerOpt {
|
||
/**
|
||
* geojson路径
|
||
*/
|
||
url: string;
|
||
stroke: Cesium.Color;
|
||
fill: Cesium.Color;
|
||
strokeWidth: number;
|
||
}
|
||
|
||
/**
|
||
* KMLLayer图层
|
||
*/
|
||
class KMLLayer extends VectorItem {
|
||
private _renderObj;
|
||
private _vectorLayer;
|
||
private _option;
|
||
private _type;
|
||
constructor(option: KMLLayerOpt);
|
||
/**
|
||
* 获取类型
|
||
*/
|
||
getType(): string;
|
||
static readonly type: string;
|
||
initItem(kmllayer: VectorLayer): void;
|
||
destroyItem(): void;
|
||
getRenderObject(): Cesium.DataSource;
|
||
parseOption(option: any): void;
|
||
/**
|
||
* 当前对象序列化成json数据
|
||
* ```
|
||
* 代码示例:
|
||
* const obj = item.toJson();
|
||
* ```
|
||
*/
|
||
toJson(): object;
|
||
/**
|
||
* 解析json对象
|
||
*/
|
||
parseJson(option: any): void;
|
||
}
|
||
class KMLLayerOpt {
|
||
/**
|
||
* kml路径
|
||
*/
|
||
url: string;
|
||
}
|
||
|
||
class VectorItem extends Item {
|
||
constructor();
|
||
getRenderObject(): Cesium.DataSource;
|
||
}
|
||
|
||
class VectorLayer extends Layer {
|
||
_viewer: Cesium.Viewer;
|
||
_renderItemList: any[];
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**
|
||
* 添加对象
|
||
* @param item
|
||
*/
|
||
add(item: Item): Item;
|
||
/**
|
||
* 删除对象
|
||
* @param
|
||
*/
|
||
remove(itemid: string | Item): Item;
|
||
/**
|
||
* 解析json
|
||
* @param json 解析
|
||
*/
|
||
parseJson(json: any): void;
|
||
getItemList(): Item[];
|
||
/**
|
||
* 获取渲染对象
|
||
*/
|
||
getRenderObject(): Cesium.DataSourceCollection;
|
||
getRenderItemById(id: string): any;
|
||
}
|
||
|
||
/**
|
||
* @类别 ThreeJS扩展类</br>
|
||
* @描述 Building参数类</br>
|
||
*/
|
||
class BuildingOpt {
|
||
/**
|
||
* 数据文件URL(当前仅支持ShapeFile文件格式)
|
||
*/
|
||
url: string;
|
||
/**
|
||
* 数据加载成功回调
|
||
*/
|
||
onLoad: Function;
|
||
/**
|
||
* 数据加载失败回调
|
||
*/
|
||
onError: Function;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 建筑物
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class Building {
|
||
/**
|
||
* @readonly
|
||
* 参数对象
|
||
*/
|
||
private readonly buildingOpt;
|
||
/**
|
||
* @readonly
|
||
* id属性为只读
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* @readonly
|
||
* 类型属性为只读
|
||
*/
|
||
readonly type = "Building";
|
||
/**
|
||
* @readonly
|
||
* 数据文件路径
|
||
*/
|
||
readonly url: string;
|
||
/**
|
||
* @readonly
|
||
* 数据加载成功回调
|
||
*/
|
||
readonly onLoad: string;
|
||
/**
|
||
* @readonly
|
||
* 数据加载失败回调
|
||
*/
|
||
readonly onError: string;
|
||
/**
|
||
* 构造函数
|
||
* @param buildingOpt 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let building = new GV.Building({
|
||
* url: "./3d/assets/shpdata/building.shp",
|
||
* onLoad: () => {
|
||
* console.log("建筑物加载完成");
|
||
* // 删除建筑物
|
||
* // localSceneManager.remove(building);
|
||
* },
|
||
* onError: () => {
|
||
* console.error("建筑物加载失败");
|
||
* }
|
||
* });
|
||
* localSceneManager.add(building);
|
||
* ```
|
||
*/
|
||
constructor(buildingOpt: BuildingOpt);
|
||
}
|
||
|
||
/**
|
||
* @类别 ThreeJS扩展类</br>
|
||
* @描述 FlyLine参数类</br>
|
||
*/
|
||
class FlyLineOpt {
|
||
/**
|
||
* 数据文件URL(当前仅支持ShapeFile文件格式)
|
||
*/
|
||
url: string;
|
||
/**
|
||
* 数据加载成功回调
|
||
*/
|
||
onLoad: Function;
|
||
/**
|
||
* 数据加载失败回调
|
||
*/
|
||
onError: Function;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 交通线
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class FlyLine {
|
||
/**
|
||
* @readonly
|
||
* 参数对象
|
||
*/
|
||
private readonly flyLineOpt;
|
||
/**
|
||
* @readonly
|
||
* id属性为只读
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* @readonly
|
||
* 类型属性为只读
|
||
*/
|
||
readonly type = "FlyLine";
|
||
/**
|
||
* @readonly
|
||
* 数据文件路径
|
||
*/
|
||
readonly url: string;
|
||
/**
|
||
* @readonly
|
||
* 数据加载成功回调
|
||
*/
|
||
readonly onLoad: string;
|
||
/**
|
||
* @readonly
|
||
* 数据加载失败回调
|
||
*/
|
||
readonly onError: string;
|
||
/**
|
||
* 构造函数
|
||
* @param flyLineOpt 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let flyLine = new GV.FlyLine({
|
||
* url: "./3d/assets/shpdata/road.shp",
|
||
* onLoad: () => {
|
||
* console.log("交通线加载完成");
|
||
* // 删除建筑物
|
||
* // localSceneManager.remove(flyLine);
|
||
* },
|
||
* onError: () => {
|
||
* console.error("交通线加载失败");
|
||
* }
|
||
* });
|
||
* localSceneManager.add(flyLine);
|
||
* ```
|
||
*/
|
||
constructor(flyLineOpt: FlyLineOpt);
|
||
}
|
||
|
||
/**
|
||
* @类别 ThreeJS扩展类</br>
|
||
* @描述 Grass参数类</br>
|
||
*/
|
||
class GrassOpt {
|
||
/**
|
||
* 纹理图片URL
|
||
*/
|
||
url: string;
|
||
/**
|
||
* 路径
|
||
*/
|
||
path: Array<Number>;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 草地
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class Grass {
|
||
/**
|
||
* @readonly
|
||
* 参数对象
|
||
*/
|
||
private readonly grassOpt;
|
||
/**
|
||
* @readonly
|
||
* id属性为只读
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* @readonly
|
||
* 类型属性为只读
|
||
*/
|
||
readonly type = "Grass";
|
||
/**
|
||
* @readonly
|
||
* 纹理图片URL
|
||
*/
|
||
readonly url: string;
|
||
/**
|
||
* @readonly
|
||
* 路径
|
||
*/
|
||
readonly path: Array<Number>;
|
||
/**
|
||
* 构造函数
|
||
* @param grassOpt 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let grass = new GV.Grass({
|
||
* url: '3d/models/grasslight-big.jpg',
|
||
* path: [116.511605918892, 39.89511659484216,
|
||
* 116.51340673914781, 39.89603267315914,
|
||
* 116.513045850042, 39.8928623748469,
|
||
* 116.50992528493731, 39.893017145617556,
|
||
* 116.50987253858077, 39.896225794700904]
|
||
* });
|
||
* localSceneManager.add(grass);
|
||
* ```
|
||
*/
|
||
constructor(grassOpt: GrassOpt);
|
||
}
|
||
|
||
/**
|
||
* @类别 ThreeJS扩展类</br>
|
||
* @描述 Lake参数类</br>
|
||
*/
|
||
class LakeOpt {
|
||
/**
|
||
* 路径
|
||
*/
|
||
path: Array<Number>;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 湖泊
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class Lake {
|
||
/**
|
||
* @readonly
|
||
* 参数对象
|
||
*/
|
||
private readonly lakeOpt;
|
||
/**
|
||
* @readonly
|
||
* id属性为只读
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* @readonly
|
||
* 类型属性为只读
|
||
*/
|
||
readonly type = "Lake";
|
||
/**
|
||
* @readonly
|
||
* 路径
|
||
*/
|
||
readonly path: Array<Number>;
|
||
/**
|
||
* 构造函数
|
||
* @param lakeOpt 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let lake = new GV.Lake({
|
||
* path: [116.46394483232434, 39.92116198177896,
|
||
* 116.47100428927826, 39.920750253307425,
|
||
* 116.47100465291112, 39.91530110288575,
|
||
* 116.46448546148142, 39.9165185653711]
|
||
* });
|
||
* localSceneManager.add(lake);
|
||
* ```
|
||
*/
|
||
constructor(lakeOpt: LakeOpt);
|
||
}
|
||
|
||
/**
|
||
* @类别 ThreeJS扩展类</br>
|
||
* @描述 ArcFlyLine参数类</br>
|
||
*/
|
||
class ArcFlyLineOpt {
|
||
/**
|
||
* 位置1
|
||
*/
|
||
point1: Array<Number>;
|
||
/**
|
||
* 位置2
|
||
*/
|
||
point2: Array<Number>;
|
||
/**
|
||
* 高度
|
||
*/
|
||
height?: Number;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 弧线
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class ArcFlyLine {
|
||
/**
|
||
* @readonly
|
||
* 参数对象
|
||
*/
|
||
readonly arcFlyLineOpt: ArcFlyLineOpt;
|
||
/**
|
||
* @readonly
|
||
* id属性为只读
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* @readonly
|
||
* 类型属性为只读
|
||
*/
|
||
readonly type = "ArcFlyLine";
|
||
/**
|
||
* @readonly
|
||
* 位置1
|
||
*/
|
||
readonly point1: Array<Number>;
|
||
/**
|
||
* @readonly
|
||
* 位置2
|
||
*/
|
||
readonly point2: Array<Number>;
|
||
/**
|
||
* @readonly
|
||
* 高度
|
||
*/
|
||
readonly height?: Number;
|
||
/**
|
||
* 构造函数
|
||
* @param arcFlyLineOpt 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let arcFlyLine = new GV.ArcFlyLine({
|
||
* point1: [116.51371956748655, 39.896977168243296],
|
||
* point2: [116.51303281179823, 39.8846319497709],
|
||
* height: 2000
|
||
* });
|
||
* localSceneManager.add(arcFlyLine);
|
||
* ```
|
||
*/
|
||
constructor(arcFlyLineOpt: ArcFlyLineOpt);
|
||
}
|
||
|
||
/**
|
||
* @类别 ThreeJS扩展类</br>
|
||
* @描述 Cone参数类</br>
|
||
*/
|
||
class ConeOpt {
|
||
/**
|
||
* 光锥位置
|
||
*/
|
||
position: Array<Number>;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 光锥
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class Cone {
|
||
/**
|
||
* @readonly
|
||
* 参数对象
|
||
*/
|
||
readonly coneOpt: ConeOpt;
|
||
/**
|
||
* @readonly
|
||
* id属性为只读
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* @readonly
|
||
* 类型属性为只读
|
||
*/
|
||
readonly type = "Cone";
|
||
/**
|
||
* @readonly
|
||
* 光锥位置
|
||
*/
|
||
readonly position: Array<Number>;
|
||
/**
|
||
* 构造函数
|
||
* @param coneOpt 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let coneOpt = new GV.Cone({
|
||
* position: [116.51076048913382, 39.90802960257902]
|
||
* });
|
||
* localSceneManager.add(coneOpt);
|
||
* ```
|
||
*/
|
||
constructor(coneOpt: ConeOpt);
|
||
}
|
||
|
||
/**
|
||
* @类别 ThreeJS扩展类</br>
|
||
* @描述 DiffusionCircle参数类</br>
|
||
*/
|
||
class DiffusionCircleOpt {
|
||
/**
|
||
* 位置
|
||
*/
|
||
position: Array<Number>;
|
||
/**
|
||
* 半径
|
||
*/
|
||
radius?: Number;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 警示波
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class DiffusionCircle {
|
||
/**
|
||
* @readonly
|
||
* 参数对象
|
||
*/
|
||
readonly diffusionCircleOpt: DiffusionCircleOpt;
|
||
/**
|
||
* @readonly
|
||
* id属性为只读
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* @readonly
|
||
* 类型属性为只读
|
||
*/
|
||
readonly type = "DiffusionCircle";
|
||
/**
|
||
* @readonly
|
||
* 位置
|
||
*/
|
||
readonly position: Array<Number>;
|
||
/**
|
||
* @readonly
|
||
* 半径
|
||
*/
|
||
readonly radius?: Number;
|
||
/**
|
||
* 构造函数
|
||
* @param diffusionCircleOpt 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let diffusionCircle = new GV.DiffusionCircle({
|
||
* position: [116.50338122228361, 39.90305240890057]
|
||
* });
|
||
* localSceneManager.add(diffusionCircle);
|
||
* ```
|
||
*/
|
||
constructor(diffusionCircleOpt: DiffusionCircleOpt);
|
||
}
|
||
|
||
/**
|
||
* @类别 ThreeJS扩展类</br>
|
||
* @描述 Instructions参数类</br>
|
||
*/
|
||
class InstructionsOpt {
|
||
/**
|
||
* 路径
|
||
*/
|
||
path: Array<Number>;
|
||
/**
|
||
* 高度
|
||
*/
|
||
height?: Number;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 动态标识
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class Instructions {
|
||
/**
|
||
* @readonly
|
||
* 参数对象
|
||
*/
|
||
readonly instructionsOpt: InstructionsOpt;
|
||
/**
|
||
* @readonly
|
||
* id属性为只读
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* @readonly
|
||
* 类型属性为只读
|
||
*/
|
||
readonly type = "Instructions";
|
||
/**
|
||
* @readonly
|
||
* 路径
|
||
*/
|
||
readonly path: Array<Number>;
|
||
/**
|
||
* @readonly
|
||
* 高度
|
||
*/
|
||
readonly height?: Number;
|
||
/**
|
||
* 构造函数
|
||
* @param instructionsOpt 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let instructions = new GV.Instructions({
|
||
* path: [116.48383039748049, 39.89778212327162,
|
||
* 116.48387968022607, 39.90346024265005,
|
||
* 116.48425004693271, 39.90496962851058,
|
||
* 116.48541803370951, 39.905568214747916,
|
||
* 116.48736908028644, 39.90625677748452,
|
||
* 116.4901205676712, 39.906519972554705,
|
||
* 116.49207414308337, 39.90645163809704,
|
||
* 116.4953625014651, 39.90645165387379],
|
||
* height: 300
|
||
* });
|
||
* localSceneManager.add(instructions);
|
||
* ```
|
||
*/
|
||
constructor(instructionsOpt: InstructionsOpt);
|
||
}
|
||
|
||
/**
|
||
* @类别 ThreeJS扩展类</br>
|
||
* @描述 Panel参数类</br>
|
||
*/
|
||
class PanelOpt {
|
||
/**
|
||
* 面板类型 'sprite' 默认值 标志板类型 'object' 普通三维对象
|
||
*/
|
||
panelType?: String;
|
||
/**
|
||
* div对象
|
||
*/
|
||
divElement: Element;
|
||
/**
|
||
* 位置
|
||
*/
|
||
position: Array<Number>;
|
||
/**
|
||
* 弧线最高点距离地面高度
|
||
*/
|
||
height?: Number;
|
||
/**
|
||
* 锚点
|
||
*/
|
||
anchor?: Array<Number>;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 3D面板
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class Panel {
|
||
/**
|
||
* @readonly
|
||
* 面板类型 'sprite' 默认值 标志板类型 'object' 普通三维对象
|
||
*/
|
||
readonly panelType?: String;
|
||
/**
|
||
* @readonly
|
||
* 参数对象
|
||
*/
|
||
readonly panelOpt: PanelOpt;
|
||
/**
|
||
* @readonly
|
||
* id属性为只读
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* @readonly
|
||
* 类型属性为只读
|
||
*/
|
||
readonly type = "Panel";
|
||
/**
|
||
* @readonly
|
||
* div对象
|
||
*/
|
||
readonly divElement: Element;
|
||
/**
|
||
* @readonly
|
||
* 位置
|
||
*/
|
||
readonly position: Array<Number>;
|
||
/**
|
||
* @readonly
|
||
* 弧线最高点距离地面高度
|
||
*/
|
||
readonly height?: Number;
|
||
/**
|
||
* @readonly
|
||
* 锚点
|
||
*/
|
||
readonly anchor?: Array<Number>;
|
||
/**
|
||
* 构造函数
|
||
* @param panelOpt 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* var element = document.createElement('div');
|
||
* element.className = 'element';
|
||
* element.style.backgroundColor = 'rgba(0,127,127,' + (Math.random() * 0.5 + 0.25) + ')';
|
||
* var number = document.createElement('div');
|
||
* number.className = 'number';
|
||
* number.textContent = 'geovis';
|
||
* element.appendChild(number);
|
||
|
||
* var symbol = document.createElement('div');
|
||
* symbol.className = 'symbol';
|
||
* symbol.textContent = '中科星图';
|
||
* element.appendChild(symbol);
|
||
|
||
* var logo = document.createElement('div');
|
||
* logo.className = 'logo';
|
||
* logo.textContent = '该公司属于软件行业和地理信息产业,为国家重点支持和鼓励发展的行业,是新一代信息技术重要方向.';
|
||
* element.appendChild(logo);
|
||
|
||
* var details = document.createElement('div');
|
||
* details.className = 'details';
|
||
* details.innerHTML = '北京.顺义';
|
||
* element.appendChild(details);
|
||
|
||
* let panel = new GV.Panel({
|
||
* position: [116.509553191, 39.903305825500055],
|
||
* height: 300,
|
||
* divElement: element
|
||
* });
|
||
* localSceneManager.add(panel);
|
||
* ```
|
||
*/
|
||
constructor(panelOpt: PanelOpt);
|
||
}
|
||
|
||
/**
|
||
* @类别 ThreeJS扩展类</br>
|
||
* @描述 Particles参数类</br>
|
||
*/
|
||
class ParticlesOpt {
|
||
/**
|
||
* 名称 fire 火焰 rain 雨水 snow 雪花
|
||
*/
|
||
name: String;
|
||
/**
|
||
* 粒子位置
|
||
*/
|
||
positions: Array<Number>;
|
||
/**
|
||
* 粒子高度
|
||
*/
|
||
height?: Number;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 粒子,注:每个场景只可添加一种粒子
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class Particles {
|
||
/**
|
||
* @readonly
|
||
* 参数对象
|
||
*/
|
||
readonly particlesOpt: ParticlesOpt;
|
||
/**
|
||
* @readonly
|
||
* 名称 fire 火焰 rain 雨水 snow 雪花
|
||
*/
|
||
readonly name: String;
|
||
/**
|
||
* @readonly
|
||
* id属性为只读
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* @readonly
|
||
* 类型属性为只读
|
||
*/
|
||
readonly type = "Particles";
|
||
/**
|
||
* @readonly
|
||
* 粒子位置
|
||
*/
|
||
readonly positions: Array<Number>;
|
||
/**
|
||
* @readonly
|
||
* 粒子高度
|
||
*/
|
||
readonly height?: Number;
|
||
/**
|
||
* 构造函数
|
||
* @param particlesOpt 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let fire = new GV.Particles(
|
||
* {
|
||
* name: "fire",
|
||
* position: [116.48994770868715, 39.90351968042573],
|
||
* height: 500,
|
||
* }
|
||
* );
|
||
* localSceneManager.add(fire);
|
||
* ```
|
||
*/
|
||
constructor(particlesOpt: ParticlesOpt);
|
||
}
|
||
|
||
/**
|
||
* @类别 ThreeJS扩展类</br>
|
||
* @描述 POI参数类</br>
|
||
*/
|
||
class POIOpt {
|
||
/**
|
||
* 纹理URL
|
||
*/
|
||
url: string;
|
||
/**
|
||
* 精灵点位置
|
||
*/
|
||
positions: Array<Number>;
|
||
/**
|
||
* 精灵大小
|
||
*/
|
||
size?: Array<Number>;
|
||
/**
|
||
* 锚点
|
||
*/
|
||
anchor?: Array<Number>;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 精灵
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class POI {
|
||
/**
|
||
* @readonly
|
||
* 参数对象
|
||
*/
|
||
readonly spriteOpt: POIOpt;
|
||
/**
|
||
* @readonly
|
||
* id属性为只读
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* @readonly
|
||
* 类型属性为只读
|
||
*/
|
||
readonly type = "POI";
|
||
/**
|
||
* @readonly
|
||
* 纹理URL
|
||
*/
|
||
readonly url: string;
|
||
/**
|
||
* @readonly
|
||
* 精灵点位置
|
||
*/
|
||
readonly positions: Array<Number>;
|
||
/**
|
||
* @readonly
|
||
* 精灵大小
|
||
*/
|
||
readonly size?: Array<Number>;
|
||
/**
|
||
* @readonly
|
||
* 锚点
|
||
*/
|
||
readonly anchor?: Array<Number>;
|
||
/**
|
||
* 构造函数
|
||
* @param spriteOpt 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let pos = [];
|
||
* for (let i = 0; i < 30; i++) {
|
||
* pos.push(116.509553191 - Math.random() / 40, 39.903305825500055 - Math.random() / 40);
|
||
* }
|
||
* let sprite = new GV.Sprite({
|
||
* positions: pos,
|
||
* url: "./3d/models/icon.png"
|
||
* });
|
||
* localSceneManager.add(sprite);
|
||
* ```
|
||
*/
|
||
constructor(spriteOpt: POIOpt);
|
||
}
|
||
|
||
/**
|
||
* @类别 ThreeJS扩展类</br>
|
||
* @描述 Sprite参数类</br>
|
||
*/
|
||
class SpriteOpt {
|
||
/**
|
||
* 纹理URL
|
||
*/
|
||
url: string;
|
||
/**
|
||
* 精灵点位置
|
||
*/
|
||
positions: Array<Number>;
|
||
/**
|
||
* 精灵大小
|
||
*/
|
||
size?: Number;
|
||
}
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 精灵
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class Sprite {
|
||
/**
|
||
* @readonly
|
||
* 参数对象
|
||
*/
|
||
readonly spriteOpt: SpriteOpt;
|
||
/**
|
||
* @readonly
|
||
* id属性为只读
|
||
*/
|
||
readonly id: any;
|
||
/**
|
||
* @readonly
|
||
* 类型属性为只读
|
||
*/
|
||
readonly type = "Sprite";
|
||
/**
|
||
* @readonly
|
||
* 纹理URL
|
||
*/
|
||
readonly url: string;
|
||
/**
|
||
* @readonly
|
||
* 精灵点位置
|
||
*/
|
||
readonly positions: Array<Number>;
|
||
/**
|
||
* @readonly
|
||
* 精灵大小
|
||
*/
|
||
readonly size?: Number;
|
||
/**
|
||
* 构造函数
|
||
* @param spriteOpt 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let pos = [];
|
||
* for (let i = 0; i < 30; i++) {
|
||
* pos.push(116.509553191 - Math.random() / 40, 39.903305825500055 - Math.random() / 40);
|
||
* }
|
||
* let sprite = new GV.Sprite({
|
||
* positions: pos,
|
||
* url: "./3d/models/icon.png"
|
||
* });
|
||
* localSceneManager.add(sprite);
|
||
* ```
|
||
*/
|
||
constructor(spriteOpt: SpriteOpt);
|
||
}
|
||
|
||
var THREE: any;
|
||
/**
|
||
* @类型 外部使用类
|
||
* @描述 局部场景管理器
|
||
* @see <a href='../../../examples/gallery/editor.html#cityNew'>智慧城市</a>
|
||
*/
|
||
class LocalSceneManager extends THREE.EventDispatcher {
|
||
/**
|
||
* 画布GeoCanvas
|
||
*/
|
||
private viewer;
|
||
/**
|
||
* Three管理器
|
||
*/
|
||
private threeManager;
|
||
/**
|
||
* 构造函数
|
||
* @param viewer 画布GeoCanvas
|
||
* @param bloomDebug 是否打开Bloom调试面板
|
||
* @param stats 是否打开性能面板
|
||
* @param bloomParams Bloom参数 exposure 曝光度 默认1.7 bloomStrength 辉光强度 默认1.2 bloomThreshold 辉光阈值 默认0 bloomRadius 辉光范围 默认1.0
|
||
* ```
|
||
* 示例代码
|
||
* let localSceneManager = new GV.LocalSceneManager(this.viewer);
|
||
* ```
|
||
*/
|
||
constructor(viewer: any, bloomDebug?: Boolean, stats?: Boolean, bloomParams?: any);
|
||
/**
|
||
* 添加
|
||
* @param param 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let localSceneManager = new GV.LocalSceneManager(this.viewer);
|
||
* localSceneManager.add(object);
|
||
* 注:object可以是Building/FlyLine/Grass/Lake/ArcFlyLine/DiffusionCircle/Instructions/Panel/Sprite实例,具体参照示例
|
||
* ```
|
||
*/
|
||
add(param: any): void;
|
||
/**
|
||
* 删除
|
||
* @param param 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let localSceneManager = new GV.LocalSceneManager(this.viewer);
|
||
* localSceneManager.remove(object)
|
||
* 注:object可以是Building/FlyLine/Grass/Lake/ArcFlyLine/DiffusionCircle/Instructions/Panel/Sprite实例,具体参照示例
|
||
* ```
|
||
*/
|
||
remove(param: any): void;
|
||
/**
|
||
* 帧循环
|
||
*/
|
||
private animate;
|
||
/**
|
||
* 帧回调
|
||
*/
|
||
private render;
|
||
}
|
||
|
||
/**
|
||
* Cesium适配器
|
||
*/
|
||
class CesiumThreeUtil {
|
||
/**
|
||
* 创建ThreeJS画布div
|
||
*/
|
||
static createThreeDiv(viewer: any): Element;
|
||
/**
|
||
* 转换坐标系
|
||
*/
|
||
static convertCoordinateSystem(): void;
|
||
}
|
||
|
||
/**
|
||
* 属性装饰器
|
||
* @param params 参数对象
|
||
*/
|
||
function Property(target: any, propertyKey: string): void;
|
||
|
||
|
||
/**
|
||
* 作者:董波
|
||
* 部门:数字地球研究院
|
||
* 邮箱:dongb@geovis.com
|
||
* 日期:2019-3-18
|
||
*/
|
||
/**
|
||
* (抽象类)插件基类 {@link Tool} 与 {@link Widget} 继承自该类
|
||
*/
|
||
class PluginBase {
|
||
_active: boolean;
|
||
_type: any;
|
||
_name: any;
|
||
_path: any;
|
||
/**
|
||
* @param {Object} optins 插件初始配置对象
|
||
* @param {PluginManager} pluginManager 插件对应的插件管理对象
|
||
*/
|
||
constructor(optins: any, pluginManager: any);
|
||
/**
|
||
* 获取状态
|
||
* @type {boolean}
|
||
* @readonly
|
||
*/
|
||
readonly active: boolean;
|
||
/**
|
||
* 工具还是挂件
|
||
* @type {stirng}
|
||
* @readonly
|
||
*/
|
||
readonly type: any;
|
||
/**
|
||
* 获得插件名(注册时的名字)
|
||
* @type {string}
|
||
* @readonly
|
||
*/
|
||
readonly name: any;
|
||
/**
|
||
* 获取插件包的原始路径
|
||
*/
|
||
readonly path: any;
|
||
/**
|
||
* 开启插件时调用
|
||
*/
|
||
init(): void;
|
||
/**
|
||
* 关闭插件时调用
|
||
*/
|
||
close(): void;
|
||
/**
|
||
* 获取数据
|
||
*/
|
||
getPluginData(): void;
|
||
/**
|
||
* 设置数据
|
||
*/
|
||
setPluginData(data: any): void;
|
||
/**
|
||
* 获取相对路径
|
||
* @param {string} file
|
||
*/
|
||
formatURL(file: any): any;
|
||
_init(): void;
|
||
_close(): void;
|
||
}
|
||
|
||
/**
|
||
* 作者:董波
|
||
* 部门:数字地球研究院
|
||
* 邮箱:dongb@geovis.com
|
||
* 日期:2019-3-18
|
||
*/
|
||
/**
|
||
* 插件管理类
|
||
* 对继承自{@link Tool} 与 {@link Widget}的类进行管理
|
||
*/
|
||
class PluginManager extends Event {
|
||
_plugins: Map<any, any>;
|
||
_currentTool: any;
|
||
_pluginInitOptins: any;
|
||
constructor(pluginInitOptins: any);
|
||
/**
|
||
* 添加插件到插件管理对象
|
||
* @param {string} name 要添加的插件名称
|
||
* @return {plugin} 返回插件对象
|
||
*/
|
||
addPlugin(name: any): any;
|
||
/**
|
||
* 删除插件到插件管理对象
|
||
* @param {string | Plugin} plugin 要删除的插件的名称或对象
|
||
*/
|
||
removePlugin(plugin: any): void;
|
||
/**
|
||
* 切换工具
|
||
* @param {string | Tool} tool 要切换的插件的名称或对象
|
||
*/
|
||
setCurrentTool(tool: any): void;
|
||
/**
|
||
* 彻底关闭清除工具
|
||
*/
|
||
closeTool(tool: any): void;
|
||
/**
|
||
* 清空全部工具状态
|
||
*/
|
||
closeAllTool(): void;
|
||
/**
|
||
* 开启插件
|
||
* @param {widget | string} 挂件名称或挂件对象
|
||
*/
|
||
usingWidget(widget: any): any;
|
||
/**
|
||
* 开启插件
|
||
* @param {widget | string} 挂件名称或挂件对象
|
||
*/
|
||
unusingWidget(widget: any): any;
|
||
/**
|
||
* 获取所有插件
|
||
* @return {[Plugin]}
|
||
*/
|
||
getAllPlugin(): any[];
|
||
/**
|
||
* 获取所有工具
|
||
* @return {[Tool]}
|
||
*/
|
||
getAllTools(): any[];
|
||
/**
|
||
* 获取所有工具
|
||
* @return {[Tool]}
|
||
*/
|
||
getAllWidgets(): any[];
|
||
/**
|
||
* 获取所有工具
|
||
* @return {[Tool]}
|
||
*/
|
||
getAllUsingWidgets(): any[];
|
||
/**
|
||
* 获取所有工具
|
||
* @return {[Tool]}
|
||
*/
|
||
getCurrentTool(): any;
|
||
}
|
||
|
||
/**
|
||
* 插件工厂提供插件注册与销毁
|
||
*/
|
||
class PluginsFactory {
|
||
_pluginMap: Map<any, any>;
|
||
constructor();
|
||
/**
|
||
* 根据插件配置文件路径注册插件
|
||
* @param {options|string} pluginOptions 插件配置
|
||
* @param {string} pluginOptions.name 插件注册名
|
||
* @param {string} pluginOptions.path 插件路径
|
||
* @param {string} pluginOptions.js 插件类名
|
||
*/
|
||
registerPlugin(pluginOptions: any): any;
|
||
/**
|
||
* 根据配置文件注册插件
|
||
*/
|
||
_registerPlugin(options: any): any;
|
||
/**
|
||
* 同步动态添加script
|
||
* @param {String} path 插件路径
|
||
*/
|
||
_appendScript(path: any): boolean;
|
||
/**
|
||
* 根据配置获取插件原始路径
|
||
* @param {string|object} pluginOptions
|
||
*/
|
||
_getPluginPath(pluginOptions: any): any;
|
||
/**
|
||
* 注销插件
|
||
* @param {String} name 主要插件名称
|
||
*/
|
||
destroyPlugin(name: any): void;
|
||
/**
|
||
* 创建插件对象(插件管理对象内部使用)
|
||
* @param {String} name 插件名称
|
||
* @param {Object} options 插件初始化参数
|
||
* @param {pluginManager} PluginManager 要创建的插件的插件管理对象
|
||
* @return {PluginBase} 插件对象
|
||
*/
|
||
createPlugin(name: any, options: any, pluginManager: any): any;
|
||
}
|
||
let pluginsFactory: PluginsFactory;
|
||
|
||
/**
|
||
* 作者:梁帆
|
||
* 日期:2019-04-09
|
||
*/
|
||
/**
|
||
* 插件主题
|
||
*/
|
||
class PluginThemeManager {
|
||
_themeStyle: {};
|
||
constructor();
|
||
/**
|
||
* 设置所有样式
|
||
*/
|
||
themeStyle: any;
|
||
createStyle(styleParam: any, doc: any): void;
|
||
createAllStyle(styleParam: any): void;
|
||
/**
|
||
* 插入新样式
|
||
* @param {document} doc
|
||
* @param {object} styleParam
|
||
*/
|
||
generateDocStyle(doc: any): void;
|
||
_generateDocStyle(doc: any, styleParam: any): void;
|
||
_getThemeStyle(styleParam: any): {};
|
||
_getStyleCss(tempStyle: any): string;
|
||
toCssStyle(str: any): any;
|
||
colorRgb(col: any): string;
|
||
}
|
||
let pluginThemeManager: PluginThemeManager;
|
||
|
||
/**
|
||
* 作者:董波
|
||
* 部门:数字地球研究院
|
||
* 邮箱:dongb@geovis.com
|
||
* 日期:2019-3-18
|
||
*/
|
||
/**
|
||
* 插件界面工厂提供提供插件界面加载卸载功能
|
||
*/
|
||
class PluginView {
|
||
_container: any;
|
||
_url: any;
|
||
_viewStyle: any;
|
||
state: string;
|
||
_instance: HTMLIFrameElement;
|
||
containerDiv: HTMLDivElement;
|
||
/**
|
||
* 创建iframe插件视图
|
||
* @param {object} options
|
||
* @param {Element} options.container 插件界面的父界面
|
||
* @param {String} options.url 插件的html路径
|
||
* @param {object} [options.viewStyle=undefined] 插件区域配置当使用默认配置时覆盖整个父界面
|
||
* @param {options} [options.viewStyle.width] 插件的宽度
|
||
* @param {options} [options.viewStyle.height] 插件高度
|
||
* @param {options} [options.viewStyle.left] 插件左边距
|
||
* @param {options} [options.viewStyle.top] 插件上边距
|
||
* @param {options} [options.viewStyle.right] 插件右边距
|
||
* @param {options} [options.viewStyle.bottom] 插件下边距
|
||
* @return {PluginView}
|
||
*/
|
||
constructor(options: any);
|
||
/**
|
||
* 获取界面实例
|
||
* @return {element}
|
||
*/
|
||
readonly instance: HTMLIFrameElement;
|
||
/**
|
||
* 显示页面
|
||
*/
|
||
show(): void;
|
||
/**
|
||
* 隐藏页面
|
||
*/
|
||
hide(): void;
|
||
/**
|
||
* 关闭页面
|
||
*/
|
||
close(): void;
|
||
/**
|
||
* 设置相机监听事件div
|
||
* @param {viewer} viewer 三维球对象
|
||
* @param {element} div 要替换的标签对象
|
||
*/
|
||
setMouseBaseElement(viewer: any, div: any): void;
|
||
/**
|
||
* 恢复相机监听div
|
||
* @param {Viewer} viewer
|
||
*/
|
||
resetMouseBaseElement(viewer: any): void;
|
||
_createIframe(url: any): HTMLIFrameElement;
|
||
_createDiv(options: any): HTMLDivElement;
|
||
_setStylePro(element: any, options: any): void;
|
||
}
|
||
|
||
/**
|
||
* 作者:董波
|
||
* 部门:数字地球研究院
|
||
* 邮箱:dongb@geovis.com
|
||
* 日期:2019-3-18
|
||
*/
|
||
/**
|
||
* (工具类基类)需要用户继承该类实现自己的类。
|
||
* 由{@link PluginManager}统一管理.
|
||
* 继承工具的类之间是相互互斥的(一次只能开启一个工具)
|
||
* @augments PluginBase
|
||
*/
|
||
class Tool extends PluginBase {
|
||
_isHide: boolean;
|
||
/**
|
||
* @param {PluginManager} prents
|
||
* @param {Object} optins
|
||
*/
|
||
constructor(prents: any, optins: any);
|
||
/**
|
||
* 界面关闭且数据可用时为true
|
||
* @type {boolean}
|
||
* @readonly
|
||
*/
|
||
readonly isHide: boolean;
|
||
/**
|
||
* 工具开启时为非隐藏状态
|
||
*/
|
||
_init(): void;
|
||
/**
|
||
* 隐藏界面和清除交互逻辑
|
||
*/
|
||
_hide(): void;
|
||
hide(): any;
|
||
/**
|
||
* 完全关闭工具
|
||
*/
|
||
_close(): void;
|
||
}
|
||
|
||
/**
|
||
* 作者:董波
|
||
* 部门:数字地球研究院
|
||
* 邮箱:dongb@geovis.com
|
||
* 日期:2019-3-18
|
||
*/
|
||
/**
|
||
* (挂件类基类)需要用户继承该类实现自己的类。
|
||
* 由{@link PluginManager}统一管理.
|
||
* 继承挂件的类之间是不互斥的(多了个挂件可以同时开启)
|
||
* @augments PluginBase
|
||
*/
|
||
class Widget extends PluginBase {
|
||
/**
|
||
* @param {PluginManager} prents
|
||
* @param {Object} optins
|
||
*/
|
||
constructor(prents: any, optins: any);
|
||
}
|
||
|
||
|
||
/**
|
||
* 作者:张耀元
|
||
* 日期:2020-08-05
|
||
*/
|
||
/**
|
||
* DQG网格计算行内网格经差
|
||
* @param n 行号
|
||
*/
|
||
function log2_d(n: number): number;
|
||
/**
|
||
* 计算球心到相机视点在地球上投影点的距离
|
||
* @param camera
|
||
* @returns {number} 球面上点到圆心的距离
|
||
*/
|
||
function computeRadius(camera: any): number;
|
||
/**
|
||
* 判断初始四个大格网是否在视窗体内(是否可见)
|
||
* @param zeroTile 要判断的格网
|
||
* @param cameraInfo 场景中的相机相关信息
|
||
*/
|
||
function zeroTileVisible(zeroTile: TriangleTile | QuadTile, cameraInfo: any): boolean;
|
||
/**
|
||
* 判断四边形格网是否在视窗体内(是否可见)
|
||
* @param {QuadTile} quadTile 要判断的格网
|
||
* @param {any} cameraInfo 场景中的相机相关信息
|
||
*/
|
||
function isQuadTileVisible(quadTile: QuadTile, cameraInfo: any): boolean;
|
||
/**
|
||
* 判断网格是否与矩形框相交或包含
|
||
* @param tile 网格
|
||
* @param rect 矩形框
|
||
*/
|
||
function isRectContainTile(tile: TriangleTile | QuadTile, rect: any): boolean;
|
||
/**
|
||
* 经纬度转DQG编码的行列号
|
||
* @param lon 经度
|
||
* @param lat 纬度
|
||
* @param level 网格层级
|
||
* @return obj 包含行列号
|
||
*/
|
||
function lonLatToRowCol(lon: number, lat: number, level: number): any;
|
||
/**
|
||
* 经纬度和高程转DQG编码的行列高
|
||
* @param lon 经度
|
||
* @param lat 纬度
|
||
* @param alt 海拔
|
||
* @param level 网格层级
|
||
* @param relativeHeight 网格单元高度(可选,默认值为10019000 >> level)
|
||
* @param height 网格单元底部高度(可选, 默认值为0.1)
|
||
* @return obj 包含行列高
|
||
*/
|
||
function lonLatAltToRowColHei(lon: number, lat: number, alt: number, level: number, relativeHeight?: number, height?: number): any;
|
||
/**
|
||
* 行列号转经纬度
|
||
* @param row 行号
|
||
* @param col 列号
|
||
* @param level 层级
|
||
*/
|
||
function rowColToLonLat(row: number, col: number, level: number): any;
|
||
/**
|
||
* 绘制格网轮廓线
|
||
* @param {*} cameraInfo 相机相关信息
|
||
* @param {*} tileList 格网列表
|
||
* @param {*} outlineInstances 格网几何信息
|
||
*/
|
||
function outlineInstance(cameraInfo: any, tileList: any, outlineInstances: any): Cesium.Primitive;
|
||
/**
|
||
* 创建格网面片(或网格体)
|
||
* @param {*} cameraInfo 相机相关信息
|
||
* @param {*} tileList 格网列表
|
||
* @param {*} surfaceInstances 格网几何信息
|
||
*/
|
||
function surfaceInstance(cameraInfo: any, tileList: any, surfaceInstances: any): Cesium.Primitive;
|
||
/**
|
||
* 显示网格编码
|
||
* @param {*} cameraInfo 相机相关信息
|
||
* @param {*} tileList 格网列表
|
||
* @param {*} outlineInstances 格网几何信息
|
||
*/
|
||
function labelInstance(tileList: any, labelInstances: any): void;
|
||
/**
|
||
* 四边形网格
|
||
*/
|
||
class QuadTile {
|
||
private _code;
|
||
private _preCode;
|
||
private _level;
|
||
private _west;
|
||
private _south;
|
||
private _east;
|
||
private _north;
|
||
private _bHeight;
|
||
private _tHeight;
|
||
private _cenLon;
|
||
private _cenLat;
|
||
private _center;
|
||
private _LTChild;
|
||
private _RTChild;
|
||
private _LBChild;
|
||
private _RBChild;
|
||
private _LMChild;
|
||
private _BMChild;
|
||
private _RMChild;
|
||
private _TMChild;
|
||
private _MMChild;
|
||
private _row;
|
||
private _col;
|
||
boundingBox: any;
|
||
intersection: any;
|
||
changeColor: boolean;
|
||
constructor(options: any);
|
||
code: any;
|
||
level: any;
|
||
west: any;
|
||
south: any;
|
||
east: any;
|
||
north: any;
|
||
bHeight: any;
|
||
tHeight: any;
|
||
cenLon: any;
|
||
cenLat: any;
|
||
readonly center: any;
|
||
LTChild: any;
|
||
RTChild: any;
|
||
LBChild: any;
|
||
RBChild: any;
|
||
readonly row: number;
|
||
readonly col: number;
|
||
a: number;
|
||
/**
|
||
* 更新格网的信息(二维单尺度DQG网格)
|
||
* @param {*} tileList 存储格网的队列
|
||
* @param {*} cameraInfo 存储相机的相关信息
|
||
*/
|
||
update(tileList: any[], cameraInfo: any): void;
|
||
initUpdate(tileList: Array<QuadTile>, level: number, scale: number, cameraInfo: any, condition: number): void;
|
||
/**
|
||
* 更新格网的信息(二维单尺度DQG网格)
|
||
* @param {*} tileList 存储格网的队列
|
||
* @param {*} cameraInfo 存储相机的相关信息
|
||
*/
|
||
DQGUpdate(tileList: Array<QuadTile>, cameraInfo: any): void;
|
||
/**
|
||
* 更新格网的信息(二维单尺度DQG网格)
|
||
* @param {*} tileList 存储格网的队列
|
||
* @param {*} cameraInfo 存储相机的相关信息
|
||
*/
|
||
staticUpdate(tileList: Array<QuadTile>, cameraInfo: any, rect: any): void;
|
||
/**
|
||
* 计算子格网
|
||
*/
|
||
computeChildren(): void;
|
||
/**
|
||
* 计算子格网
|
||
*/
|
||
computeNineChildren(): void;
|
||
/**
|
||
* 计算子格网
|
||
*/
|
||
computeDQGChildren(): void;
|
||
/**
|
||
* 计算子格网
|
||
*/
|
||
computeCustomChildren(code: string, level: number, west: number, south: number, east: number, north: number, cenLon: number, cenLat: number): void;
|
||
/**
|
||
* 销毁格网
|
||
*/
|
||
destory(): void;
|
||
}
|
||
/**
|
||
* 三角形网格(只有在绘制DQG网格时才会用到)
|
||
*/
|
||
class TriangleTile {
|
||
private _code;
|
||
private _oct;
|
||
private _level;
|
||
private _west;
|
||
private _south;
|
||
private _east;
|
||
private _north;
|
||
private _bHeight;
|
||
private _tHeight;
|
||
private _cenLon;
|
||
private _cenLat;
|
||
private _center;
|
||
private _LTChild;
|
||
private _RTChild;
|
||
private _LBChild;
|
||
private _RBChild;
|
||
private _row;
|
||
private _col;
|
||
boundingBox: any;
|
||
intersection: any;
|
||
changeColor: boolean;
|
||
constructor(options: any);
|
||
code: any;
|
||
level: any;
|
||
west: any;
|
||
south: any;
|
||
east: any;
|
||
north: any;
|
||
bHeight: any;
|
||
tHeight: any;
|
||
cenLon: any;
|
||
cenLat: any;
|
||
readonly center: any;
|
||
LTChild: any;
|
||
RTChild: any;
|
||
LBChild: any;
|
||
RBChild: any;
|
||
readonly row: number;
|
||
readonly col: number;
|
||
/**
|
||
* 更新格网的信息(二维单尺度DQG网格)
|
||
* @param {*} tileList 存储格网的队列
|
||
* @param {*} cameraInfo 存储相机的相关信息
|
||
*/
|
||
update(tileList: Array<TriangleTile | QuadTile>, cameraInfo: any): void;
|
||
/**
|
||
* 更新静态格网的信息
|
||
* @param {*} tileList 存储格网的队列
|
||
* @param {*} cameraInfo 存储相机的相关信息
|
||
*/
|
||
staticUpdate(tileList: Array<TriangleTile | QuadTile>, cameraInfo: any, rect: any): void;
|
||
/**
|
||
* 计算子格网
|
||
*/
|
||
computeChildren(): void;
|
||
/**
|
||
* 计算DQG子格网
|
||
*/
|
||
computeDQGChildren(): void;
|
||
/**
|
||
* 销毁格网
|
||
*/
|
||
destory(): void;
|
||
}
|
||
|
||
class Fog {
|
||
near: any;
|
||
far: any;
|
||
nearFog: any;
|
||
farFog: any;
|
||
viewer: Cesium.Viewer;
|
||
private value;
|
||
color: any;
|
||
constructor(viewer: Cesium.Viewer, options?: Object);
|
||
remove(): void;
|
||
enabled: Boolean;
|
||
static fragmentShader: String;
|
||
}
|
||
|
||
/**
|
||
* 全球海洋特效
|
||
* (创建GeoCanvas时自动在SceneOptions类进行实例化,
|
||
* 具体使用方法参见SceneOptions类说明)
|
||
*/
|
||
class GlobalWater {
|
||
private viewer;
|
||
private worldRectangle;
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**
|
||
* 显示全球海洋
|
||
*/
|
||
showGlobalWater(): void;
|
||
/**
|
||
* 关闭全球海洋
|
||
*/
|
||
closeGlobalWater(): void;
|
||
/**
|
||
* 波纹数 value>0,默认 10000
|
||
*/
|
||
frequency: Number;
|
||
/**
|
||
* 播放速度 value>0 默认 0.01
|
||
*/
|
||
animationSpeed: Number;
|
||
/**
|
||
* 颜色深度 value>0 默认 1.0
|
||
*/
|
||
amplitude: Number;
|
||
}
|
||
|
||
/**
|
||
* 经纬网
|
||
*/
|
||
class Graticule {
|
||
private layer;
|
||
private viewer;
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**
|
||
* 显示
|
||
*/
|
||
show(): void;
|
||
/**
|
||
* 隐藏
|
||
*/
|
||
remove(): void;
|
||
/**
|
||
* 线颜色(css 样式)
|
||
*/
|
||
color: string;
|
||
/**
|
||
* 线宽度
|
||
*/
|
||
width: number;
|
||
/**
|
||
* 字体格式
|
||
*/
|
||
textFont: string;
|
||
/**
|
||
* 字体颜色(css 样式)
|
||
*/
|
||
textColor: string;
|
||
/**
|
||
* 字体轮廓颜色(css 样式)
|
||
*/
|
||
textOutlineColor: string;
|
||
}
|
||
|
||
class GraticuleLayer {
|
||
private _visible;
|
||
private _opt;
|
||
private _scene;
|
||
private _ellipsoid;
|
||
private _polylines;
|
||
private _groundPrimitive;
|
||
private _labels;
|
||
private _extent;
|
||
private _levels;
|
||
private _sexagesimal;
|
||
constructor(opt: GraticuleLayerOpt, viewer: Cesium.Viewer);
|
||
listenerFun: () => void;
|
||
private decToSex;
|
||
private gridPrecision;
|
||
/**将经度值限制到-PI到PI之间 */
|
||
private normalize;
|
||
private getNearestLongitude;
|
||
private getNearestLatitude;
|
||
/**获取相机视角范围 */
|
||
private getExtent;
|
||
private makeLabel;
|
||
/**绘制网格和文字 */
|
||
private drawGrid;
|
||
private getMS;
|
||
/**获取线颜色 */
|
||
/**设置线颜色 */
|
||
color: Cesium.Color;
|
||
/**获取线宽 */
|
||
/**设置线宽 */
|
||
width: number;
|
||
/**获取文字字体样式 */
|
||
/**设置文字字体样式 */
|
||
textFont: string;
|
||
/**获取文字颜色 */
|
||
/**设置文字颜色 */
|
||
textColor: Cesium.Color;
|
||
/**获取文字轮廓颜色 */
|
||
/**设置文字轮廓颜色 */
|
||
textOutlineColor: Cesium.Color;
|
||
/**获取经纬网是否显示状态 */
|
||
isVisible(): Boolean;
|
||
/**设置经纬网显示/隐藏 */
|
||
setVisible(show: Boolean): void;
|
||
}
|
||
class GraticuleLayerOpt {
|
||
color: Cesium.Color;
|
||
width: number;
|
||
textFont: string;
|
||
textColor: Cesium.Color;
|
||
textOutlineColor: Cesium.Color;
|
||
constructor(color?: string, w?: number, textFont?: string, textColor?: string);
|
||
}
|
||
|
||
/**
|
||
* 作者:张耀元
|
||
* 日期:2020-08-05
|
||
*/
|
||
/**
|
||
* @类型 网格类
|
||
* @描述 三维DQG网格
|
||
* @see <a href='../../../examples/gallery/editor.html#mapBox'>三维网格</a>
|
||
*/
|
||
class MapBox {
|
||
private viewer;
|
||
private timeID;
|
||
private destroyFlag;
|
||
private _visible;
|
||
private outlinePrimitive;
|
||
private surfacePrimitive;
|
||
private _outlineColor;
|
||
private _height;
|
||
private _extrudedHeight;
|
||
private _relativeHeight;
|
||
private _subdivFactor;
|
||
private _name;
|
||
private _changed;
|
||
private _error;
|
||
private _entityCollection;
|
||
private _entityCluster;
|
||
private _isLoading;
|
||
private _loading;
|
||
/**
|
||
*
|
||
* @param viewer GeoCanvas
|
||
* @param options 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let viewer = new GV.GeoCanvas('GEOVISContainer');
|
||
* // 创建静态网格
|
||
* let mapBox = new GV.MapBox({ subdivFactor: 3, outlineColor: 'rgb(100, 100, 100)', relativeHeight: 20000000, height: 1000000 });
|
||
* ```
|
||
*/
|
||
constructor(viewer: GeoCanvas, options?: MapBoxOpt);
|
||
/**
|
||
* 获取外边框颜色
|
||
*/
|
||
readonly outlineColor: string;
|
||
/**
|
||
* 获取网格底面相对于椭球面高度
|
||
*/
|
||
readonly height: number;
|
||
/**
|
||
* 获取网格单元体自身高度
|
||
*/
|
||
readonly relativeHeight: number;
|
||
/**
|
||
* 获取网格单元体挤压面距离椭球面高度
|
||
*/
|
||
readonly extrudedHeight: number;
|
||
/**
|
||
* 获取网格细分阈值
|
||
*/
|
||
readonly subdivFactor: number;
|
||
/**继承DataSource属性begin */
|
||
private name;
|
||
private readonly clock;
|
||
private readonly entities;
|
||
private readonly isLoading;
|
||
private readonly changedEvent;
|
||
private readonly errorEvent;
|
||
private readonly loadingEvent;
|
||
private show;
|
||
private clustering;
|
||
/**继承DataSource属性end */
|
||
/**
|
||
* 设置显隐
|
||
* @memberof MapSheet
|
||
*/
|
||
visible: boolean;
|
||
/**
|
||
* 移除
|
||
*/
|
||
private remove;
|
||
/**
|
||
* 重新设置网格参数(包括高度、颜色和细分阈值)
|
||
* @param options 参数对象
|
||
*/
|
||
reSet(options: MapBoxOpt): void;
|
||
/**
|
||
* 设置网格边框颜色
|
||
* @param outlineColor 网格边框颜色
|
||
*/
|
||
setOutlineColor(outlineColor?: string): void;
|
||
/**
|
||
* 设置网格底面和相对高度
|
||
* @param height 设置网格底面距离椭球面高度
|
||
* @param relativeHeight 设置网格高度
|
||
*/
|
||
setHeight(height: number): void;
|
||
/**
|
||
* 设置网格底面和相对高度
|
||
* @param height 设置网格底面距离椭球面高度
|
||
* @param relativeHeight 设置网格高度
|
||
*/
|
||
setRelativeHeight(relativeHeight: number): void;
|
||
/**
|
||
* 设置网格底面和相对高度
|
||
* @param height 设置网格底面距离椭球面高度
|
||
* @param relativeHeight 设置网格高度
|
||
*/
|
||
setExtrudedHeight(extrudedHeight: number): void;
|
||
/**
|
||
* 设置网格细分阈值
|
||
* @param subdivFactor 细分阈值
|
||
*/
|
||
setSubdivFactor(subdivFactor: number): void;
|
||
/**
|
||
* 回到默认设置状态
|
||
*/
|
||
backToDefault(): void;
|
||
/**
|
||
* DQG网格运行入口(初始化)
|
||
* @param tileList 挂载要绘制的网格
|
||
* @param cameraInfo 显示时挂载的与相机有关的信息
|
||
*/
|
||
private initialDQGUpdate;
|
||
/**
|
||
* 网格更新函数
|
||
* @param time
|
||
*/
|
||
private DQGUpdate;
|
||
/**
|
||
* 更新函数
|
||
* @param time
|
||
*/
|
||
private update;
|
||
private destroy;
|
||
}
|
||
class MapBoxOpt {
|
||
/** 网格线框颜色 */
|
||
outlineColor: string;
|
||
/** 网格单元体自身的高度(等于extrudedHeight - height) */
|
||
relativeHeight?: number;
|
||
/** 网格单元底面距椭球面高度 */
|
||
height?: number;
|
||
/** 网格单元挤压面距离椭球面的高度 */
|
||
extrudedHeight?: number;
|
||
/** 细分阈值 */
|
||
subdivFactor: number;
|
||
}
|
||
|
||
/**
|
||
* @类型 军用图幅
|
||
* @描述 1991年制订了新的《国家基本比例尺地形图分幅和编号》(GB/T 13989-92 )的国家标准
|
||
* @see <a href='../../../examples/gallery/editor.html#mapSheet'>军用图幅</a>
|
||
*/
|
||
class MapSheet {
|
||
private gridPrimitive;
|
||
private gridScale;
|
||
private scale;
|
||
private viewer;
|
||
private labels;
|
||
private labelInfo;
|
||
private colseRangeLabels;
|
||
private _visible;
|
||
private LatCharArray;
|
||
private latDArray;
|
||
private lonDArray;
|
||
private primitive;
|
||
private closeRangePrimitive;
|
||
private range;
|
||
private tileKeys;
|
||
private timeID;
|
||
private destroyFlag;
|
||
private _gridVisable;
|
||
private _mapSheetVisable;
|
||
private _name;
|
||
private _changed;
|
||
private _error;
|
||
private _entityCollection;
|
||
private _entityCluster;
|
||
private _isLoading;
|
||
private _loading;
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**继承DataSource属性begin */
|
||
private name;
|
||
private readonly clock;
|
||
private readonly entities;
|
||
private readonly isLoading;
|
||
private readonly changedEvent;
|
||
private readonly errorEvent;
|
||
private readonly loadingEvent;
|
||
private show;
|
||
private clustering;
|
||
/**继承DataSource属性end */
|
||
/**
|
||
* 设置显隐
|
||
* @memberof MapSheet
|
||
*/
|
||
visible: boolean;
|
||
gridVisible: boolean;
|
||
mapSheetVisible: boolean;
|
||
/**
|
||
* 移除
|
||
*/
|
||
private remove;
|
||
/**
|
||
* 根据经纬度获得编码
|
||
* @param lat 纬度
|
||
* @param lon 经度
|
||
* @param scaleID 比例尺编号
|
||
* 说明:不传scaleID时,默认为当前视口下比例尺编号
|
||
*/
|
||
getSheetNumber(lon: number, lat: number, scaleID: LevelCodeEnum): string;
|
||
/**
|
||
* 根据军标码计算图幅范围
|
||
* @param sheetNumber 军标码
|
||
* @param scaleID 比例尺编号
|
||
* 说明:不传scaleID时,默认为当前视口下比例尺编号
|
||
*/
|
||
getSheetRange(sheetNumber: string, scaleID: LevelCodeEnum): {
|
||
south: any;
|
||
east: number;
|
||
north: any;
|
||
west: number;
|
||
};
|
||
/**
|
||
* 判断军标码与比例尺是否一致
|
||
* @param sheetNumber
|
||
* @param scaleID
|
||
*/
|
||
private checkSheetToScale;
|
||
/**
|
||
* 划分地图
|
||
*/
|
||
private splitMap;
|
||
/**
|
||
* 添加线、label进入场景
|
||
* @param data
|
||
*/
|
||
private createPrimitive;
|
||
/**
|
||
* 单独label进入场景
|
||
* @param data
|
||
*/
|
||
private createLabel;
|
||
/**
|
||
* 根据层级行列号计算瓦片范围
|
||
*/
|
||
private getRectangle;
|
||
/**
|
||
* 递归法运行入口(初始化)
|
||
* @param tileList 挂载要绘制的网格
|
||
* @param level 比例尺层级(网格层级)
|
||
* @param scale 1:100万比例尺用到的剖分层级
|
||
* @param cameraInfo 显示时挂载的与相机有关的信息
|
||
*/
|
||
private initialCloseRangeUpdate;
|
||
/**
|
||
* 局部场景下启用递归法进行图幅编码绘制和展示
|
||
*/
|
||
private closeRangeUpdate;
|
||
/**
|
||
* 添加方里网
|
||
* @param westGrid
|
||
* @param northGrid
|
||
* @param eastGrid
|
||
* @param southGrid
|
||
*/
|
||
private addGridPrimitive;
|
||
/**
|
||
* 更新函数
|
||
* @param time
|
||
*/
|
||
private update;
|
||
destroy(): void;
|
||
}
|
||
|
||
/**
|
||
* 作者:张耀元
|
||
* 日期:2020-08-21
|
||
*/
|
||
/**
|
||
* @类型 路径规划
|
||
* @描述 基于网格的路径规划。由三部分组成,依次是空间依赖的背景网格(由StaticMapBox生成);表示不可达区域的网格;表示规划路径的网格。
|
||
* 其中,PathPlanningOpt中的属性比如网格底面高度(height)、网格相对高度(relativeHeight)、起止点颜色等都是对不可达区域和规划路径
|
||
* 等所在网格的属性赋值。设置空间依赖的背景网格需要专门调用this.staticMapBox()来进行创建和初始化,一般紧接着pathPlanning的初始化。
|
||
* @see <a href='../../../examples/gallery/editor.html#pathPlanning'>路径规划</a>
|
||
*/
|
||
class PathPlanning {
|
||
private viewer;
|
||
/** 表示不可达地区的网格 */
|
||
private inaccesPrimitive;
|
||
/** 表示后来自己添加的不可达地区网格 */
|
||
private additionInaccesPrimitive;
|
||
/** 表示轨迹的网格 */
|
||
private gridPathPrimitive;
|
||
/** 表示起始位置的网格 */
|
||
private startPosPrimitive;
|
||
/** 表示终止位置的网格 */
|
||
private endPosPrimitive;
|
||
private minLon;
|
||
private minLat;
|
||
private maxLon;
|
||
private maxLat;
|
||
private minAlt;
|
||
private maxAlt;
|
||
private startRow;
|
||
private startCol;
|
||
private endRow;
|
||
private endCol;
|
||
private startHei;
|
||
private endHei;
|
||
private inaccesGridArray;
|
||
/** 背景网格,轨迹网格的一切均发生在背景网格之内 */
|
||
private staticMapBox;
|
||
private additionalInaccess;
|
||
private level;
|
||
private _height;
|
||
private _relativeHeight;
|
||
/** 轨迹颜色 */
|
||
private _pathArrColor;
|
||
/** 不可达区域颜色 */
|
||
private _inaccesColor;
|
||
/** 起点颜色 */
|
||
private _strPosColor;
|
||
/** 终点颜色 */
|
||
private _endPosColor;
|
||
/** 是否是三维路径规划(默认值为false) */
|
||
private _is3DPathPlanning;
|
||
/** 背景网格选项,为整个场景提供网格背景和网格环境,应跟在pathPlanning之后初始化 */
|
||
private backgroundGridsOpt;
|
||
/** 不可达区域 */
|
||
inaccesRegions: Array<any>;
|
||
/** 经纬度转网格行列号 */
|
||
lonLatToRowCol: any;
|
||
/** 经纬度和高程转为行列高 */
|
||
lonLatAltToRowColHei: any;
|
||
/** 行列号转经纬度 */
|
||
rowColToLonLat: any;
|
||
/** 每个不可达区域数组对应的底面高度(minALt)和顶部高度(maxAlt),是个二维数组 */
|
||
inaccesRegionsAltArray: Array<any>;
|
||
/**
|
||
*
|
||
* @param viewer GeoCanvas
|
||
* @param options 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let viewer = new GV.GeoCanvas('GEOVISContainer');
|
||
* // 添加GeoPoint点围成的不可达区域(第一层不可达区域)
|
||
* let inaccesRegion1 = [
|
||
* new GV.GeoPoint(111.44, 17.28),
|
||
* new GV.GeoPoint(113.0, 18.03),
|
||
* new GV.GeoPoint(113.8, 16.97),
|
||
* new GV.GeoPoint(113.75, 16.48)
|
||
* ]
|
||
* // 第二层不可达区域(叠在第一层上面,范围比第一层小)
|
||
* let inaccesRegion2 = [
|
||
* new GV.GeoPoint(111.94, 17.0),
|
||
* new GV.GeoPoint(112.5, 17.53),
|
||
* new GV.GeoPoint(113.3, 16.47),
|
||
* new GV.GeoPoint(113.25, 16.08)
|
||
* ]
|
||
* // 初始化路径规划场景
|
||
* let pathPlanning = new GV.PathPlanning(viewer, { inaccesRegions: [inaccesRegion1, inaccesRegion2], inaccesRegionsAltArray: [[500, 7500], [7500, 14500]], level: 10, height: 400, relativeHeight: 7000 });
|
||
* // 创建底图网格
|
||
* pathPlanning.setBackgroundGrids({ west: 108.5, south: 14.5, east: 116.5, north: 18.7, level: 10, heightLevel: 2, height: 400, relativeHeight: 7000, outlineColor: 'rgb(150, 150, 150)', color: 'rgba(100, 100, 100, 0.1)', isDrawEachGrid: false });
|
||
* ```
|
||
*/
|
||
constructor(viewer: GeoCanvas, options: PathPlanningOpt);
|
||
/** 设置路径网格颜色 */
|
||
/** 获取路径网格颜色 */
|
||
pathArrColor: string;
|
||
/** 设置不可达区域网格颜色 */
|
||
/** 获取不可达区域网格颜色 */
|
||
inaccesColor: string;
|
||
/** 设置起点网格颜色 */
|
||
/** 获取起点网格颜色 */
|
||
strPosColor: string;
|
||
/** 设置终点网格颜色 */
|
||
/** 获取终点网格颜色 */
|
||
endPosColor: string;
|
||
/** 设置网格单元高度 */
|
||
/** 获取网格单元高度 */
|
||
relativeHeight: number;
|
||
/** 设置是否是三维路径规划 */
|
||
/** 获取是否是三维路径规划 */
|
||
is3DPathPlanning: boolean;
|
||
/**
|
||
* 根据选取的起始点和终止点进行路径规划
|
||
* @param startPosX 起点行号
|
||
* @param startPosY 起点列号
|
||
* @param startPosZ 起点高度层号
|
||
* @param endPosX 终点行号
|
||
* @param endPosY 终点列号
|
||
* @param endPosZ 终点高度层号
|
||
* @param inaccesGridArray 不可达区域网格集
|
||
*/
|
||
private dynamicPlanning;
|
||
/**
|
||
* 选择起点(输入表示起点所在网格的经纬度和高程)
|
||
* @param lon 经度
|
||
* @param lat 纬度
|
||
* @param alt 海拔(可选,默认为网格最底面高度)
|
||
*/
|
||
selectStartGrid(lon: number, lat: number, alt?: number): void;
|
||
/**
|
||
* 选择起点(输入表示起点网格的行列号)
|
||
* @param row 行号
|
||
* @param col 列号
|
||
* @param hei 层号(或者高度号,最底层为0,默认值为0)
|
||
*/
|
||
setStartGrid(row: number, col: number, hei?: number): void;
|
||
/**
|
||
* 选择终点(输入表示终点所在网格的经纬度和高程)
|
||
* @param lon 经度
|
||
* @param lat 纬度
|
||
* @param alt 海拔(可选,默认为网格最底面高度)
|
||
*/
|
||
selectEndGrid(lon: number, lat: number, alt?: number): void;
|
||
/**
|
||
* 选择终点(输入表示终点网格的行列号)
|
||
* @param row 行号
|
||
* @param col 列号
|
||
* @param hei 层号(或者高度号,最底层为0,默认值为0)
|
||
*/
|
||
setEndGrid(row: number, col: number, hei?: number): void;
|
||
/**
|
||
* 添加单个不可达区域网格。根据输入点的经纬度和海拔来计算。
|
||
* @param lon 要添加不可达位置的经度
|
||
* @param lat 要添加不可达位置的纬度
|
||
* @param alt 要添加不可达位置的高度(可选,默认为网格最底面高度)
|
||
*/
|
||
addInaccesGrid(lon: number, lat: number, alt?: number): void;
|
||
/** 绘制路径 */
|
||
drawPath(): void;
|
||
/**
|
||
* 绘制不可达区域
|
||
* 说明:根据初始化时输入的不可达区域以及后面添加的不可达数据进行筛选,得到相应的网格,并进行可视化表达
|
||
*/
|
||
drawInaccesGrid(): void;
|
||
/**
|
||
* 设置背景网格
|
||
* pathPlanning创建后调用,因为如果想使路径规划生效,第一步必须先设置背景网格
|
||
*/
|
||
setBackgroundGrids(options: StaticMapBoxOpt): void;
|
||
/**
|
||
* 更新函数
|
||
*/
|
||
update(): void;
|
||
/**
|
||
* 创建不可达区域
|
||
* @param inaccesRegion 以GeoPoint点围成的不可达区域
|
||
* 说明: 返回创建后的不可达区域的一个索引
|
||
*/
|
||
createInaccesRegion(inaccesRegion: Array<GeoPoint>): any;
|
||
/**
|
||
* 清空路径
|
||
*/
|
||
clearPath(): void;
|
||
/**
|
||
* 清空不可达区域网格
|
||
*/
|
||
clearInaccesGrid(): void;
|
||
/**
|
||
* 清除路径网格和不可达区域网格,作用等同于destroy函数
|
||
*/
|
||
clearAll(): void;
|
||
/** 清空 */
|
||
destory(): void;
|
||
}
|
||
/** 路径规划选项 */
|
||
class PathPlanningOpt {
|
||
/** 不可达区域 */
|
||
inaccesRegions: Array<any>;
|
||
/** 层级 */
|
||
level?: number;
|
||
/** 底面相对于椭球面高度 */
|
||
height?: number;
|
||
/** 单个网格的相对高度 */
|
||
relativeHeight?: number;
|
||
/** 是否是3维路径规划 */
|
||
is3DPathPlanning?: boolean;
|
||
/** 路径颜色 */
|
||
pathArrColor?: string;
|
||
/** 不可达区域颜色 */
|
||
inaccesColor?: string;
|
||
/** 起点位置颜色 */
|
||
strPosColor?: string;
|
||
/** 终点位置颜色 */
|
||
endPosColor?: string;
|
||
/**
|
||
* 每一个不可达区域对应一个底面高度和顶部高度数组,整体是个二维数组
|
||
* 如[[不可达区域1对应的的值:minAlt, maxAlt], [不可达区域2对应的高度值:minAlt, maxAlt],...]
|
||
*/
|
||
inaccesRegionsAltArray?: Array<any>;
|
||
}
|
||
|
||
class Rain {
|
||
angle: any;
|
||
speed: any;
|
||
private viewer;
|
||
private value;
|
||
/**
|
||
*
|
||
* @param viewer
|
||
* @param options 具有以下属性
|
||
* @param {Number} [options.angle=-15] 雨滴与地面法线的夹角,单位度
|
||
* @param {Number} [options.speed=240] 雨滴降落的速度
|
||
*/
|
||
constructor(viewer: Cesium.Viewer, options?: any);
|
||
remove(): void;
|
||
enabled: Boolean;
|
||
static fragmentShader: String;
|
||
}
|
||
|
||
/**
|
||
* 场景配置类枚举
|
||
*/
|
||
enum WeatherEnmu {
|
||
/**
|
||
* 关闭天气
|
||
*/
|
||
None = 0,
|
||
/**
|
||
* 开启雨
|
||
*/
|
||
Rain = 1,
|
||
/**
|
||
* 开启雪
|
||
*/
|
||
Snow = 2,
|
||
/**
|
||
* 开启雾
|
||
*/
|
||
Fog = 3
|
||
}
|
||
/**
|
||
* 各级比例尺编号
|
||
*/
|
||
enum LevelCodeEnum {
|
||
/**
|
||
* 1:100万比例尺
|
||
*/
|
||
LevelCodeZero = 0,
|
||
/**
|
||
* 1:50万比例尺
|
||
*/
|
||
LevelCodeOne = 1,
|
||
/**
|
||
* 1:25万比例尺
|
||
*/
|
||
LevelCodeTwo = 2,
|
||
/**
|
||
* 1:10万比例尺
|
||
*/
|
||
LevelCodeThree = 3,
|
||
/**
|
||
* 1:5万比例尺
|
||
*/
|
||
LevelCodeFour = 4,
|
||
/**
|
||
* 1:2.5万比例尺
|
||
*/
|
||
LevelCodeFive = 5,
|
||
/**
|
||
* 1:1万比例尺
|
||
*/
|
||
LevelCodeSix = 6
|
||
}
|
||
/**
|
||
* @类别 无需创建,初始化球时自动创建并且与球对应的类 <br>
|
||
* @描述 场景配置类:管理 雨,雪,经纬网 <br>
|
||
* @see <a href='../../../examples/gallery/editor.html#jingWeiWang'>经纬网</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#weather_snow_rain'>雨雪</a>
|
||
* ```
|
||
* 示例代码:
|
||
* var viewer = new GV.GeoCanvas('GEOVISContainer', {
|
||
* sceneOptions:{
|
||
* graticule:true,
|
||
* weather:GV.WeatherEnmu.Rain
|
||
* }
|
||
* });
|
||
* ```
|
||
*/
|
||
class SceneOptions {
|
||
/**
|
||
* 地理画布
|
||
*/
|
||
private viewer;
|
||
/**
|
||
* 天气
|
||
*/
|
||
private sky;
|
||
/**
|
||
* 经纬网
|
||
*/
|
||
private jingwei;
|
||
private _graticule;
|
||
/**
|
||
* 太阳产生阴影
|
||
*/
|
||
private _shadowFlag;
|
||
/**
|
||
* 图幅编码
|
||
*/
|
||
private _mapSheet;
|
||
private _tufu;
|
||
/**
|
||
* 三维网格
|
||
*/
|
||
private _mapBox;
|
||
/**
|
||
* 静态三维网格
|
||
*/
|
||
private _staticMapBox;
|
||
/**
|
||
* 全球海洋
|
||
*/
|
||
private _globalWater;
|
||
private _globalWaterVisible;
|
||
/**
|
||
* 设置或获取控制经纬网字段
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.sceneOptions.graticule = true
|
||
* ```
|
||
*/
|
||
graticule: Boolean;
|
||
private _weather;
|
||
shadowFlag: boolean;
|
||
/**
|
||
* 设置或获取控制天气字段
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.sceneOptions.weather = WeatherEnmu.Rain
|
||
* ```
|
||
*/
|
||
weather: WeatherEnmu;
|
||
/**
|
||
* 国际图幅编码
|
||
*/
|
||
readonly mapSheet: MapSheet;
|
||
/**
|
||
* 三维网格
|
||
*/
|
||
readonly mapBox: MapBox;
|
||
/**
|
||
* 静态三维网格
|
||
*/
|
||
readonly staticMapBox: StaticMapBox;
|
||
/**
|
||
* 全球海洋特效
|
||
*/
|
||
globalWater: boolean;
|
||
readonly globalWaterObj: GlobalWater;
|
||
/**
|
||
* 获取地图投影
|
||
* ```
|
||
* 示例代码:
|
||
* let projection = viewer.sceneOptions.mapProjection;
|
||
* ```
|
||
*/
|
||
readonly mapProjection: string;
|
||
/**
|
||
* 创建场景配置类
|
||
* @param viewer 地理画布
|
||
* @param options 场景配置对象
|
||
*/
|
||
constructor(viewer: GeoCanvas, options: Object);
|
||
}
|
||
|
||
class Snow {
|
||
alpha: any;
|
||
speed: any;
|
||
private viewer;
|
||
private value;
|
||
/**
|
||
*
|
||
* @param viewer
|
||
* @param options 具有以下属性
|
||
* @param {Number} [options.alpha=0.6] 雪在地面的累积程度,0表示地面没有雪,1表示地面完全被雪覆盖
|
||
* @param {Number} [options.speed=240] 雪花降落的速度
|
||
*/
|
||
constructor(viewer: Cesium.Viewer, options?: any);
|
||
remove(): void;
|
||
enabled: Boolean;
|
||
static fragmentShader: String;
|
||
}
|
||
|
||
/**
|
||
* 作者:张耀元
|
||
* 日期:2020-08-05
|
||
*/
|
||
/**
|
||
* @类型 网格类
|
||
* @描述 静态三维DQG网格
|
||
* @see <a href='../../../examples/gallery/editor.html#staticMapBox'>静态三维网格</a>
|
||
*/
|
||
class StaticMapBox {
|
||
private viewer;
|
||
private _visible;
|
||
private outlinePrimitive;
|
||
private surfacePrimitive;
|
||
private timeID;
|
||
private destroyFlag;
|
||
private isDraw;
|
||
/** 实体西边框经度 */
|
||
private _west;
|
||
/** 实体南边框纬度 */
|
||
private _south;
|
||
/** 实体东边框经度 */
|
||
private _east;
|
||
/** 实体北边框纬度 */
|
||
private _north;
|
||
/** 实体网格剖分层级,相当于细分阈值 */
|
||
private _level;
|
||
/** 实体网格相对椭球面的高度 */
|
||
private _height;
|
||
/** 实体网格挤压面相对于椭球面的高度 */
|
||
private _extrudedHeight;
|
||
/** 实体网格单元自身的高度 */
|
||
private _relativeHeight;
|
||
/** 实体网格径向(高度维)上网格层级或数量 */
|
||
private _heightLevel;
|
||
/** 实体网格外边框颜色 */
|
||
private _outlineColor;
|
||
/** 实体网格体颜色 */
|
||
private _color;
|
||
/** 实体网格是否单独绘制每个网格体,默认false, 若为true可能会影响绘制效率 */
|
||
private _isDrawEachGrid;
|
||
/** 所有要展现出来的网格 */
|
||
resultTileList: Array<TriangleTile | QuadTile>;
|
||
private _name;
|
||
private _changed;
|
||
private _error;
|
||
private _entityCollection;
|
||
private _entityCluster;
|
||
private _isLoading;
|
||
private _loading;
|
||
/**
|
||
*
|
||
* @param viewer GeoCanvas
|
||
* @param options 参数对象
|
||
* ```
|
||
* 示例代码
|
||
* let viewer = new GV.GeoCanvas('GEOVISContainer');
|
||
* // 创建静态网格
|
||
* let staticMapBox = new GV.StaticMapBox({ west: 108.5, south: 14.5, east: 116.5, north: 18.7, level: 10, heightLevel: 2, height: 400, relativeHeight: 7000, outlineColor: 'rgb(150, 150, 150)', color: 'rgba(100, 100, 100, 0.1)', isDrawEachGrid: false });
|
||
* ```
|
||
*/
|
||
constructor(viewer: GeoCanvas, options?: StaticMapBoxOpt);
|
||
/**
|
||
* 获取网格西边框经度
|
||
*/
|
||
readonly west: number;
|
||
/**
|
||
* 获取网格南边框纬度
|
||
*/
|
||
readonly south: number;
|
||
/**
|
||
* 获取网格东边框经度
|
||
*/
|
||
readonly east: number;
|
||
/**
|
||
* 获取网格北边框纬度
|
||
*/
|
||
readonly north: number;
|
||
/**
|
||
* 获取网格剖分层级
|
||
*/
|
||
readonly level: number;
|
||
/**
|
||
* 获取网格单元距离椭球面的高度
|
||
*/
|
||
readonly height: number;
|
||
/**
|
||
* 获取网格单元体自身高度
|
||
*/
|
||
readonly relativeHeight: number;
|
||
/**
|
||
* 获取网格单元体挤压面距离椭球面的高度
|
||
*/
|
||
readonly extrudedHeight: number;
|
||
/**
|
||
* 获取网格径向(高度维)上网格层级或数量
|
||
*/
|
||
readonly heightLevel: number;
|
||
/**
|
||
* 获取网格实体颜色
|
||
*/
|
||
readonly color: string;
|
||
/**
|
||
* 获取网格边框颜色
|
||
*/
|
||
readonly outlineColor: string;
|
||
isDrawEachGrid: any;
|
||
/**继承DataSource属性begin */
|
||
private name;
|
||
private readonly clock;
|
||
private readonly entities;
|
||
private readonly isLoading;
|
||
private readonly changedEvent;
|
||
private readonly errorEvent;
|
||
private readonly loadingEvent;
|
||
private show;
|
||
private clustering;
|
||
/**继承DataSource属性end */
|
||
/**
|
||
* 设置显隐
|
||
* @memberof StaticMapBox
|
||
*/
|
||
visible: boolean;
|
||
/**
|
||
* 移除
|
||
*/
|
||
private remove;
|
||
/**
|
||
* 重新设置所有静态网格参数(包括范围、高度、颜色和层级)
|
||
* @param options 参数对象
|
||
*/
|
||
reSet(options: StaticMapBoxOpt): void;
|
||
/**
|
||
* 设置实体框范围
|
||
* @param west 实体西边框经度,默认为0
|
||
* @param south 实体南边框纬度,默认为0
|
||
* @param east 实体东边框经度,默认为0
|
||
* @param north 实体北边框纬度,默认为0
|
||
* @param level 网格实体剖分层次,默认值为3(层次越高,网格越密)
|
||
* @param heightLevel 径向(高度维)网格数量
|
||
*/
|
||
setRange(west: number, south: number, east: number, north: number, heightLevel?: number, level?: number): void;
|
||
/**设置网格剖分层次 */
|
||
setLevel(level: number): void;
|
||
/**设置网格径向(高度维)剖分层次 */
|
||
setHeightLevel(heightLevel: number): void;
|
||
/**
|
||
* 设置网格单元体自身高度
|
||
* @param relativeHeight 网格单元高度
|
||
*/
|
||
setRelativeHeight(relativeHeight: number): void;
|
||
/**
|
||
* 设置网格单元底面与椭球面的高度
|
||
* @param height 网格单元底面高度
|
||
* 说明:网格单元顶部高度extrudedHeight可以直接赋值也可由height + relativeHeight求得
|
||
*/
|
||
setHeight(height: number): void;
|
||
/**
|
||
* 设置网格单元挤压面(顶面)与椭球面的高度
|
||
* @param extrudedHeight 网格单元底面高度
|
||
* 说明:网格单元顶部高度extrudedHeight可以直接赋值也可由height + relativeHeight求得
|
||
*/
|
||
setExtrudedHeight(extrudedHeight: number): void;
|
||
/**
|
||
* 设置网格单元边框颜色
|
||
* @param outlineColor 网格边框颜色
|
||
*/
|
||
setOutlineColor(outlineColor: string): void;
|
||
/**
|
||
* 设置网格单元体颜色
|
||
* @param color 网格实体颜色
|
||
*/
|
||
setColor(color: string): void;
|
||
/**
|
||
* 回到默认设置状态
|
||
*/
|
||
backToDefault(): void;
|
||
/**
|
||
* DQG网格初始化
|
||
* @param tileList 挂载要绘制的网格
|
||
* @param cameraInfo 显示时挂载的与相机有关的信息
|
||
* @param rect 要绘制网格的矩形框范围
|
||
*/
|
||
private initialstaticTileUpdate;
|
||
/**
|
||
* 静态三维网格运行入口
|
||
*/
|
||
private staticTileUpdate;
|
||
/**
|
||
* 更新函数
|
||
* @param time
|
||
*/
|
||
private update;
|
||
/** 销毁函数 */
|
||
destroy(): void;
|
||
}
|
||
class StaticMapBoxOpt {
|
||
/** 矩形西边框经度 */
|
||
west: number;
|
||
/** 矩形南边框经度 */
|
||
south: number;
|
||
/** 矩形东边框经度 */
|
||
east: number;
|
||
/** 矩形北边框经度 */
|
||
north: number;
|
||
/** 要剖分的网格层级 */
|
||
level?: number;
|
||
/** 网格单元体自身的高度(等于extrudedHeight - height) */
|
||
relativeHeight?: number;
|
||
/** 网格单元底面距椭球面高度 */
|
||
height?: number;
|
||
/** 网格单元挤压面距离椭球面的高度 */
|
||
extrudedHeight?: number;
|
||
/** 径向(高度维)上的网格层级 */
|
||
heightLevel?: number;
|
||
/** 网格边框颜色 */
|
||
outlineColor?: string;
|
||
/** 网格体颜色 */
|
||
color?: string;
|
||
/** 实体网格是否单独绘制每个网格体,默认false, 若为true可能会影响绘制效率 */
|
||
isDrawEachGrid?: boolean;
|
||
}
|
||
|
||
/**
|
||
* 天气-雨雪
|
||
* (创建GeoCanvas时自动在SceneOptions类进行实例化,
|
||
* 具体使用方法参见SceneOptions类说明)
|
||
*/
|
||
class Weather {
|
||
private viewer;
|
||
fog: Fog;
|
||
rain: Rain;
|
||
snow: Snow;
|
||
constructor(viewer: Cesium.Viewer);
|
||
/**
|
||
* 雨雪显示高度
|
||
*/
|
||
displayHeight: number;
|
||
private calculateCamera;
|
||
private _rain;
|
||
private _snow;
|
||
/**
|
||
* 显示雨
|
||
*/
|
||
showRain(): void;
|
||
/**
|
||
* 关闭雨
|
||
*/
|
||
closeRain(): void;
|
||
private getRainShader;
|
||
/**
|
||
* 显示雪
|
||
*/
|
||
showSnow(): void;
|
||
/**
|
||
* 关闭雪
|
||
*/
|
||
closeSnow(): void;
|
||
private getSnowShader;
|
||
/**
|
||
* 显示雾
|
||
*/
|
||
showFog(): void;
|
||
/**
|
||
* 关闭雾
|
||
*/
|
||
closeFog(): void;
|
||
}
|
||
|
||
class GM26400 {
|
||
/**
|
||
* 解决控制点跨越180度经度问题
|
||
* @param controlPoints
|
||
*/
|
||
static modifyControlPoints(controlPoints: Array<GeoPoint>): void;
|
||
static distance(p1: GeoPoint, p2: GeoPoint): number;
|
||
static getAngle(p1: GeoPoint, p2: GeoPoint): number;
|
||
/**
|
||
* 计算X符号
|
||
* @param p X中心点
|
||
* @param angle 旋转角(单位:弧度)
|
||
* @param symbol_len
|
||
* @param results
|
||
*/
|
||
static getXCoords(p: GeoPoint, angle: number, symbol_len: number, results?: Array<GeoPoint>): Array<GeoPoint>;
|
||
/**
|
||
* 计算箭头
|
||
* @param p 箭头尾点
|
||
* @param angle 箭头朝向角(单位:弧度)
|
||
* @param length 箭头长度
|
||
* @param dir
|
||
* @param results
|
||
*/
|
||
static getArraw(p: GeoPoint, angle: number, length: number, dir: boolean, results?: Array<GeoPoint>): Array<GeoPoint>;
|
||
static toVertice_Alg1(pts: Array<GeoPoint>, numArray: Array<number>): Array<GeoPoint> | undefined;
|
||
static toVertice_Alg2(pts: Array<GeoPoint>, numArray: Array<number>): Array<GeoPoint> | undefined;
|
||
static toVertice_Alg3(pts: Array<GeoPoint>, numArray: Array<number>): Array<GeoPoint> | undefined;
|
||
static toVertice_Alg4(pts: Array<GeoPoint>, numArray: Array<number>): Array<GeoPoint> | undefined;
|
||
static toVertice_Alg5(pts: Array<GeoPoint>, numArray: Array<number>): Array<GeoPoint> | undefined;
|
||
static toVertice_Alg6(pts: Array<GeoPoint>, numArray: Array<number>): Array<GeoPoint> | undefined;
|
||
static toVertice_Alg7(pts: Array<GeoPoint>, numArray: Array<number>): Array<GeoPoint> | undefined;
|
||
/**
|
||
* @param code 军标码
|
||
* @param positions 控制点集
|
||
*/
|
||
static getPositionsByCode(code: string, positions: Array<GeoPoint>): any;
|
||
}
|
||
|
||
/// <reference path="../../../src/Types/cesium.d.ts" />
|
||
class BuildGeometry {
|
||
private _slice;
|
||
private _circlePts;
|
||
constructor();
|
||
/**
|
||
* 构建单位圆
|
||
* @param slice 被切分的份数
|
||
*/
|
||
private buildCircle;
|
||
/**
|
||
* 计算并且获取单位圆的顶点数组
|
||
* @param slice 单位圆被切分的份数(默认值为60)
|
||
*/
|
||
getCircleVertex(slice?: number): Cartesian2[];
|
||
/**
|
||
* 获取单位圆被切分的份数
|
||
*/
|
||
getSlice(): number;
|
||
/**
|
||
* 创建由Triangle构建的圆geometry对象,一般用于非贴地圆形几何体对象,其primitive中可设置modelMatrix参数
|
||
* @param r 半径
|
||
* @param offsetPos 顶点偏移量(防止包含原点的Triangle绘制不出来,默认值为不偏移)
|
||
* @param slice 圆被切分的份数(默认值为60)
|
||
*/
|
||
createCircleGeometry_Triangles(r: number, offsetPos?: Cesium.Cartesian3, slice?: number): Cesium.Geometry;
|
||
/**
|
||
* 创建由Triangle构建的圆geometry对象(2D显示专用)
|
||
* @param center 圆心点
|
||
* @param r 半径
|
||
* @param slice 圆被切分的份数(默认值为60)
|
||
*/
|
||
createCircleGeometry2D_Triangles(center: GeoPoint, r: number, slice?: number): Cesium.Geometry;
|
||
/**
|
||
* 创建圆的多边形geometry对象,一般用于贴地圆形对象的绘制
|
||
* @param r 半径
|
||
* @param m 圆心点位置的变换矩阵(作用是将圆变换到相应的地理位置)
|
||
* @param offsetPos 顶点偏移量(防止包含原点的Triangle绘制不出来,默认值为不偏移)
|
||
* @param slice 圆被切分的份数(默认值为60)
|
||
*/
|
||
createCircleGeometry_Polygon(r: number, m: Cesium.Matrix4, offsetPos?: Cesium.Cartesian3, slice?: number): any;
|
||
/**
|
||
* 创建截圆锥体(上下半径相等时为圆柱体)geometry对象,中心点为底面圆心点
|
||
* @param topRadius 顶部圆半径
|
||
* @param bottomRadius 底部圆半径
|
||
* @param height 高度
|
||
* @param slice 圆被切分的份数(默认值为60)
|
||
* @param useNormals 是否计算法线(默认值为true,即计算法线)
|
||
*/
|
||
createTruncatedConeGeometry(topRadius: number, bottomRadius: number, height: number, slice?: number, useNormals?: boolean): Cesium.Geometry;
|
||
}
|
||
|
||
/**
|
||
* @类别 无需创建,初始化球时自动创建并且与球对应的类</br>
|
||
* @描述 通用计算类</br>
|
||
* @see <a href='../../../examples/gallery/editor.html#spaceDis'>距离面积计算</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#paowu'>曲线点集计算</a>
|
||
*
|
||
*/
|
||
class Calculate {
|
||
/**
|
||
* 解决控制点跨越180度经度问题,将经度转换为都大于0的值,或者都转换为都小于0的值。
|
||
*/
|
||
static modifyControlPoints(controlPoints: Array<GeoPoint>, result?: Array<GeoPoint>): GeoPoint[];
|
||
/**
|
||
* 将两个坐标系下的位置和姿态叠加,计算叠加后的变换矩阵,最终将变换矩阵转换为经纬高和姿态。
|
||
* 第一个参数是经纬高+三姿态(滚动角、偏航角和俯仰角),WGS84椭球体坐标系
|
||
* 第二个参数是XYZ+三姿态(滚动角、偏航角和俯仰角),局部坐标系
|
||
* 返回object对象{position,heading,pitch,roll}
|
||
* ```
|
||
* 示例代码:
|
||
* let parent = {
|
||
* position: new GV.GeoPoint(114, 32, 10000),
|
||
* roll: 5,
|
||
* heading: 60,
|
||
* pitch: -40
|
||
* };
|
||
* let child = {
|
||
* x: 0.5,
|
||
* y: -0.2,
|
||
* z: -0.8,
|
||
* roll: -5,
|
||
* heading: 30,
|
||
* pitch: 0
|
||
* };
|
||
* let res = Calculate.calculateMatrix(parent, child);
|
||
* //将计算的结果应用到cylinderGraphic标绘对象
|
||
* cylinderGraphic.position = res.position;
|
||
* cylinderGraphic.heading = res.heading;
|
||
* cylinderGraphic.pitch = res.pitch;
|
||
* cylinderGraphic.roll = res.roll;
|
||
* ```
|
||
*/
|
||
static calculateMatrix(parentGesture: any, childGesture: any): {
|
||
position: GeoPoint;
|
||
heading: number;
|
||
pitch: number;
|
||
roll: number;
|
||
};
|
||
/**
|
||
* 将变换矩阵转换为椭球体坐标系下的位置与姿态。
|
||
* 返回object对象{position,heading,pitch,roll}
|
||
* ```
|
||
* 示例代码:
|
||
*
|
||
* ```
|
||
*/
|
||
static matrixToHdr(uMMatrix: Cesium.Matrix4): {
|
||
position: GeoPoint;
|
||
heading: number;
|
||
pitch: number;
|
||
roll: number;
|
||
};
|
||
private static _surfaceDistance;
|
||
private static _getAngle;
|
||
private static _getBearing;
|
||
/**
|
||
* 获取点集的空间面积
|
||
* @param geoPoints 点集信息
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let geoPoints = [{lon:80,lat:50,alt:50000},{lon:90,lat:45,alt:50000},{lon:85,lat:30,alt:50000}]
|
||
* let result = GV.Calculate.spaceArea(geoPoints);
|
||
* ```
|
||
*/
|
||
static spaceArea(geoPoints: Array<GeoPoint>): number;
|
||
/**
|
||
* 根据给定的经纬度点坐标,以及距离和方向,计算目标点经纬度
|
||
* @param pt 经纬度点坐标
|
||
* @param distance 距离(单位:米)
|
||
* @param bearing 方向值(单位:角度,0度为正北方向,90度为正东方向)
|
||
* @return 目标点
|
||
* ```
|
||
* 示例代码:
|
||
* let geoPoint = new GeoPoint(120, 26);
|
||
* let result = GV.Calculate.rhumbDestination(geoPoint, 3000, 90);
|
||
* ```
|
||
*/
|
||
static rhumbDestination(pt: GeoPoint, distance: number, bearing: number, options?: {
|
||
units: string;
|
||
}): GeoPoint;
|
||
/**
|
||
* 获取点集的贴地面积
|
||
* @param geoPoints 点集信息
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let geoPoints = [{lon:80,lat:50,alt:50000},{lon:90,lat:45,alt:50000},{lon:85,lat:30,alt:50000}]
|
||
* let result = GV.Calculate.groundArea(geoPoints);
|
||
* ```
|
||
*/
|
||
static groundArea(geoPoints: Array<GeoPoint>): number;
|
||
/**
|
||
* 获取点集的贴地距离
|
||
* @param geoPoints 点集信息
|
||
* @param viewer
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let geoPoints = [{lon:80,lat:50,alt:50000},{lon:90,lat:45,alt:50000},{lon:85,lat:30,alt:50000}]
|
||
* let result = GV.Calculate.groundDistance(geoPoints);
|
||
* ```
|
||
*/
|
||
static groundDistance(geoPoints: Array<GeoPoint>, viewer: Cesium.Viewer): number;
|
||
/**
|
||
* 获取点集的空间距离
|
||
* @param geoPoints 点集信息
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let geoPoints = [{lon:80,lat:50,alt:50000},{lon:90,lat:45,alt:50000},{lon:85,lat:30,alt:50000}]
|
||
* let result = GV.Calculate.spaceDistance(geoPoints);
|
||
* ```
|
||
*/
|
||
static spaceDistance(geoPoints: Array<GeoPoint>): number;
|
||
/**
|
||
* 获取二次贝塞尔曲线点集坐标
|
||
* @param geoPoints 控制点集信息
|
||
* @param step 点集数量 默认值:100 范围:>=2 && <= 100
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let geoPoints = [{lon:80,lat:50,alt:50000},{lon:90,lat:45,alt:50000},{lon:85,lat:30,alt:50000}]
|
||
* let result = GV.Calculate.getBezier(geoPoints);
|
||
* ```
|
||
*/
|
||
static getBezier(geoPoints: Array<GeoPoint>, step?: number): Array<GeoPoint>;
|
||
/**
|
||
* 获取抛物线点集坐标
|
||
* @param fromPoint 起始点
|
||
* @param toPoint 终止点
|
||
* @param factor 曲率(抛物线高度)范围:>=1000 && <= 10000000
|
||
* @param step 点集数量 默认值:100 范围:>=2 && <= 100
|
||
* ```
|
||
* 示例代码:
|
||
* let result = GV.Calculate.getParabola({lon:80,lat:50,alt:50000},{lon:90,lat:45,alt:50000},50000);
|
||
* ```
|
||
*/
|
||
static getParabola(fromPoint: GeoPoint, toPoint: GeoPoint, factor: number, step?: number): any[];
|
||
/**
|
||
* 判断经纬度点是否在多边形区域内
|
||
* @param point 被判断点
|
||
* @param polygon 多边形区域位置数组
|
||
* @returns
|
||
* @see <a href='../../../examples/gallery/editor.html#simlarScene'>模拟场景</a>
|
||
*/
|
||
static pointInPolygon(point: GeoPoint, polygon: Array<GeoPoint>): boolean;
|
||
/**
|
||
* 判断经纬度点是否在圆形区域内
|
||
* @param point 被判断点
|
||
* @param centerPoint 圆心位置点
|
||
* @param radius 圆半径,单位:米
|
||
* @returns
|
||
* @see <a href='../../../examples/gallery/editor.html#simlarScene'>模拟场景</a>
|
||
*/
|
||
static pointInCircle(point: GeoPoint, centerPoint: GeoPoint, radius: number): boolean;
|
||
/**
|
||
* 判断点是否在直线段上
|
||
* @param point
|
||
* @param lineStart 线段起始点
|
||
* @param lineEnd 线段终止点
|
||
* @returns true:在线段上;false:不在线段上
|
||
*/
|
||
static pointOnLine(point: GeoPoint, lineStart: GeoPoint, lineEnd: GeoPoint): boolean;
|
||
/**
|
||
* 获取椭圆点集
|
||
* @param center 中心坐标
|
||
* @param xSemiAxis 长轴 单位:米
|
||
* @param ySemiAxis 短轴 单位:米
|
||
* @param steps 点集数量,取值范围应大于等于4,即至少5个点才能构成椭圆
|
||
* @returns
|
||
* @see <a href='../../../examples/gallery/editor.html#polygonDiff'>多边形交并差</a>
|
||
*/
|
||
static getEllipsePositions(center: GeoPoint, xSemiAxis: number, ySemiAxis: number, steps?: number): GeoPoint[];
|
||
/**
|
||
* 获取圆形点集
|
||
* @param center 圆心坐标
|
||
* @param radius 圆半径 单位:米
|
||
* @param steps 点集数量
|
||
* @returns
|
||
* @see <a href='../../../examples/gallery/editor.html#polygonDiff'>多边形交并差</a>
|
||
*/
|
||
static getCirclePositions(center: GeoPoint, radius: number, steps?: number): GeoPoint[];
|
||
/**
|
||
* 计算给定半径和中心点的圆的扇形,位于(顺时针)startAngle和endAngle之间;0方位为中心点以北,顺时针正。
|
||
* @param center 圆心坐标
|
||
* @param radius 圆半径 单位:米
|
||
* @param startAngle 起始角度
|
||
* @param endAngle 终止角度
|
||
* @param steps 整个圆的等分数量,默认为64
|
||
* @returns
|
||
*/
|
||
static getSectorPositions(center: GeoPoint, radius: number, startAngle?: number, endAngle?: number, steps?: number): GeoPoint[];
|
||
/**
|
||
* 获取两个多边形相交区域
|
||
* @param polygon1 多边形点集
|
||
* @param polygon2 多边形点集
|
||
* @returns 多边形的交集或者undefined(没有相交)
|
||
* @see <a href='../../../examples/gallery/editor.html#polygonDiff'>多边形交并差</a>
|
||
*/
|
||
static getIntersect(polygon1: Array<GeoPoint>, polygon2: Array<GeoPoint>): Array<GeoPoint>;
|
||
/**
|
||
* 合并两个多边形区域
|
||
* @param polygon1 多边形点集
|
||
* @param polygon2 多边形点集
|
||
* @returns object对象,格式为{type: 'Polygon', geometry: [[GeoPoint,GeoPoint,...], [GeoPoint,GeoPoint,...], ...]};
|
||
* type属性为'Polygon'表示普通多边形/带洞多边形(geometry的数值长度大于1);type属性为'MultiPolygon'表示有多个多边形
|
||
* @see <a href='../../../examples/gallery/editor.html#polygonDiff'>多边形交并差</a>
|
||
*/
|
||
static getUnion(polygon1: Array<GeoPoint>, polygon2: Array<GeoPoint>): {
|
||
type: string;
|
||
geometry: {};
|
||
};
|
||
/**
|
||
* 获取第一个多边形和第二个多边形作差的点集
|
||
* @param polygon1 多边形点集
|
||
* @param polygon2 多边形点集
|
||
* @returns 多边形的差集或者undefined
|
||
* @see <a href='../../../examples/gallery/editor.html#polygonDiff'>多边形交并差</a>
|
||
*/
|
||
static getDiffer(polygon1: Array<GeoPoint>, polygon2: Array<GeoPoint>): Array<GeoPoint>;
|
||
/**
|
||
* 计算两个点的方位角
|
||
* @param point1 位置点
|
||
* @param point2 位置点
|
||
* @return 返回方位角
|
||
*/
|
||
static getAngle(point1: GeoPoint, point2: GeoPoint): number;
|
||
/**
|
||
* 计算两个点的屏幕方位角度
|
||
* @param point1 {x:10,y:10}
|
||
* @param point2 {x:20,y:20}
|
||
*/
|
||
static getScreenAngle(point1: {
|
||
x: number;
|
||
y: number;
|
||
}, point2: {
|
||
x: number;
|
||
y: number;
|
||
}): number;
|
||
/**
|
||
* 水平面剔除判断
|
||
* @param point 位置点
|
||
* @param viewer
|
||
*/
|
||
static pointInEarthSide(point: GeoPoint, viewer: GeoCanvas): boolean;
|
||
/**
|
||
* 获取面中心点,首尾需重合,至少需要4个点
|
||
* @param posArr 位置点,如:[[0.0, 0.0],[20.0, 10.0],[0.0, 33.0],[0.0, 0.0]]
|
||
*/
|
||
static centerOfMass(posArr: Array<Array<number>>): GeoPoint;
|
||
/**
|
||
* 多个多边形求并集,多个多边形合到一块,条件不满足则为独立的,返回一个数组
|
||
* @param allPolygon 所有多边形的集合点
|
||
* @param resPolygon 所有多边形的集合点
|
||
* @return resArray Array
|
||
*/
|
||
static getUnions(originAllPolygon: any, resPolygon?: any): void;
|
||
}
|
||
|
||
/**
|
||
* @类别 无需创建,初始化球时自动创建并且与球对应的类</br>
|
||
* @描述 Canvas转换成各种图片工具库</br>
|
||
* @see <a href='../../../examples/gallery/editor.html#screenShot'>场景转换图片</a>
|
||
*/
|
||
class Canvas2Image {
|
||
private static support;
|
||
private static downloadMime;
|
||
private static scaleCanvas;
|
||
private static getDataURL;
|
||
private static saveFile;
|
||
private static genImage;
|
||
private static fixType;
|
||
private static encodeData;
|
||
private static getImageData;
|
||
private static makeURI;
|
||
/**
|
||
* create bitmap image
|
||
* 按照规则生成图片响应头和响应体
|
||
*/
|
||
private static genBitmapImage;
|
||
/**
|
||
* saveAsImage
|
||
* @param canvasElement
|
||
* @param {String} image type
|
||
* @param {Number} [optional] png width
|
||
* @param {Number} [optional] png height
|
||
*/
|
||
private static saveAsImage;
|
||
private static convertToImage;
|
||
/**
|
||
* 保存为png格式
|
||
* @param canvas dom元素
|
||
* @param {number} width 保存的宽度
|
||
* @param {number} height 保存的高度
|
||
* ```
|
||
* 示例代码:
|
||
* const ratio = viewer.canvas.width / viewer.canvas.height;
|
||
* const img = GV.Canvas2Image.saveAsPNG(viewer.canvas, 400, 400 / ratio)
|
||
* ```
|
||
*/
|
||
static saveAsPNG(canvas: Element, width: number, height: number): void;
|
||
/**
|
||
* 保存为jpeg格式
|
||
* @param canvas dom元素
|
||
* @param {number} width 保存的宽度
|
||
* @param {number} height 保存的高度
|
||
* ```
|
||
* 示例代码:
|
||
* const ratio = viewer.canvas.width / viewer.canvas.height;
|
||
* const img = GV.Canvas2Image.saveAsJPEG(viewer.canvas, 400, 400 / ratio)
|
||
* ```
|
||
*/
|
||
static saveAsJPEG(canvas: Element, width: number, height: number): void;
|
||
/**
|
||
* 保存为gif格式
|
||
* @param canvas dom元素
|
||
* @param {number} width 保存的宽度
|
||
* @param {number} height 保存的高度
|
||
* ```
|
||
* 示例代码:
|
||
* const ratio = viewer.canvas.width / viewer.canvas.height;
|
||
* const img = GV.Canvas2Image.saveAsGIF(viewer.canvas, 400, 400 / ratio)
|
||
* ```
|
||
*/
|
||
static saveAsGIF(canvas: Element, width: number, height: number): void;
|
||
/**
|
||
* 保存为bmp格式
|
||
* @param canvas dom元素
|
||
* @param {number} width 保存的宽度
|
||
* @param {number} height 保存的高度
|
||
* ```
|
||
* 示例代码:
|
||
* const ratio = viewer.canvas.width / viewer.canvas.height;
|
||
* const img = GV.Canvas2Image.saveAsBMP(viewer.canvas, 400, 400 / ratio)
|
||
* ```
|
||
*/
|
||
static saveAsBMP(canvas: Element, width: number, height: number): void;
|
||
/**
|
||
* 转换成png格式
|
||
* @param canvas dom元素
|
||
* @param {number} width 转换后的宽度
|
||
* @param {number} height 转换后的高度
|
||
* @return base64数据
|
||
* ```
|
||
* 示例代码:
|
||
* const ratio = viewer.canvas.width / viewer.canvas.height;
|
||
* const img = GV.Canvas2Image.convertToPNG(viewer.canvas, 400, 400 / ratio)
|
||
* ```
|
||
*/
|
||
static convertToPNG(canvas: Element, width: number, height: number): string;
|
||
/**
|
||
* 转换成jpeg格式
|
||
* @param canvas dom元素
|
||
* @param {number} width 转换后的宽度
|
||
* @param {number} height 转换后的高度
|
||
* @return base64数据
|
||
* ```
|
||
* 示例代码:
|
||
* const ratio = viewer.canvas.width / viewer.canvas.height;
|
||
* const img = GV.Canvas2Image.convertToJPEG(viewer.canvas, 400, 400 / ratio)
|
||
* ```
|
||
*/
|
||
static convertToJPEG(canvas: Element, width: number, height: number): string;
|
||
/**
|
||
* 转换成gif格式
|
||
* @param canvas dom元素
|
||
* @param {number} width 转换后的宽度
|
||
* @param {number} height 转换后的高度
|
||
* @return base64数据
|
||
* ```
|
||
* 示例代码:
|
||
* const ratio = viewer.canvas.width / viewer.canvas.height;
|
||
* const img = GV.Canvas2Image.convertToGIF(viewer.canvas, 400, 400 / ratio)
|
||
* ```
|
||
*/
|
||
static convertToGIF(canvas: Element, width: number, height: number): string;
|
||
/**
|
||
* 转换成bmp格式
|
||
* @param canvas dom元素
|
||
* @param {number} width 转换后的宽度
|
||
* @param {number} height 转换后的高度
|
||
* @return base64数据
|
||
* ```
|
||
* 示例代码:
|
||
* const ratio = viewer.canvas.width / viewer.canvas.height;
|
||
* const img = GV.Canvas2Image.convertToBMP(viewer.canvas, 400, 400 / ratio)
|
||
* ```
|
||
*/
|
||
static convertToBMP(canvas: Element, width: number, height: number): string;
|
||
/**
|
||
* 转换成svg格式
|
||
* @param canvas dom元素
|
||
* @return 转换后的svg字符串
|
||
* ```
|
||
* 示例代码:
|
||
* const svgStr = GV.Canvas2Image.convertToSvg(viewer.canvas)
|
||
* ```
|
||
*/
|
||
static convertToSvg(canvas: HTMLCanvasElement): string;
|
||
/**
|
||
* 通过地址下载图片
|
||
* @param src 资源路径
|
||
* @param fileName 文件名字如(局部高清影像.jpeg)
|
||
*/
|
||
static downloadImg(src: string, fileName: string): void;
|
||
}
|
||
|
||
/**
|
||
* @类别 无需创建,初始化球时自动创建并且与球对应的类</br>
|
||
* @描述 通用检测类</br>
|
||
*/
|
||
class Check {
|
||
/**
|
||
* 检查参数是否为布尔值
|
||
* @param value 被检测对象
|
||
* @return 返回值true or false
|
||
* ```
|
||
* 示例代码:
|
||
* let res = GV.Check.isBoolean(false);
|
||
* ```
|
||
*/
|
||
static isBoolean(value: any): boolean;
|
||
/**
|
||
* 检查参数是否为json对象
|
||
* @param value 被检测对象
|
||
* @return 返回值true or false
|
||
*/
|
||
static isJson(value: any): boolean;
|
||
/**
|
||
* 判定是否为字符串
|
||
* @param value 被检测对象
|
||
* @return 返回值true or false
|
||
*/
|
||
static isString(value: any): boolean;
|
||
/**
|
||
* 判定是否为数值
|
||
* @param value 被检测对象
|
||
* @return 返回值true or false
|
||
*/
|
||
static isNumber(value: any): boolean;
|
||
/**
|
||
* 判定参数是否为数组
|
||
* @param value 被检测对象
|
||
* @return 返回值true or false
|
||
*/
|
||
static isArray(value: any): boolean;
|
||
/**
|
||
* 判断字符串是否为十六进制颜色。
|
||
* @param value 被检测对象
|
||
* @return 返回值true or false
|
||
*/
|
||
static isCssColor(value: any): boolean;
|
||
}
|
||
|
||
/**
|
||
* @类别 颜色配置表类
|
||
* @描述 提供颜色渐变色带生成
|
||
*/
|
||
class ColorTable {
|
||
static colorRgb(sColor: any): any;
|
||
static colorHex(rgb: any): any;
|
||
/**
|
||
* @name: 获取颜色带
|
||
* @msg: 暂仅支持hex颜色格式
|
||
* @param {startColor} String 开始颜色hex格式
|
||
* @param {endColor} String 结束颜色hex格式
|
||
* @param {step} Number 几个阶级(几步)
|
||
* @return Array<string>
|
||
*/
|
||
static getColorRamp(startColor: String, endColor: String, step: number): Array<String>;
|
||
/**
|
||
* @name: rgb颜色转换
|
||
* @param {color} String rgb格式
|
||
* @return String
|
||
*/
|
||
static colorRGBtoHex(color: any): String;
|
||
}
|
||
|
||
/**
|
||
* @类别 外部使用类
|
||
* @描述 高清制图工具
|
||
* @see <a href='../../../examples/gallery/editor.html#compoundImage'>高清制图</a>
|
||
*/
|
||
class CompoundImage {
|
||
/**
|
||
* 捕捉深度:范围 2或3
|
||
*/
|
||
private static _level;
|
||
/**
|
||
* 目标制图 dpi
|
||
*/
|
||
private static _dpi;
|
||
/**
|
||
* @ignore
|
||
* 记录需要临时改变的标绘
|
||
* */
|
||
private static _originItem;
|
||
/**
|
||
* @ignore
|
||
* 球的对象
|
||
* */
|
||
private static viewer;
|
||
/**
|
||
* @ignore
|
||
* 制图时的捕捉方法
|
||
* */
|
||
private static _doCaptcher;
|
||
/**
|
||
* @ignore
|
||
* 高清制图的 base64 结果未处理压缩的资源
|
||
* */
|
||
private static _originSrc;
|
||
/**
|
||
* @ignore
|
||
* 选择起始位置所形成的地理经纬坐标
|
||
*/
|
||
private static _selectGeoPoint;
|
||
/**
|
||
* @ignore
|
||
* 高清制图的 base64 结果
|
||
* */
|
||
private static _resSrc;
|
||
/**
|
||
* @ignore
|
||
* 是否正在制图中
|
||
* */
|
||
private static _isDoingCaptcher;
|
||
/**
|
||
* @ignore
|
||
* 自动截图时的计时器
|
||
* */
|
||
private static _autoTimer;
|
||
/**
|
||
* @ignore
|
||
* 自动截图时每次等待的时间
|
||
*/
|
||
private static _delay;
|
||
/**
|
||
* @ignore
|
||
* 本静态工具类的 Promise 的 resolve 方法,reject 方法
|
||
*/
|
||
private static resolve;
|
||
private static reject;
|
||
/**
|
||
* @ignore
|
||
* @param hdvImageOpt
|
||
* 出图的结果数据包
|
||
*/
|
||
private static hdvImgData;
|
||
/**
|
||
* 开始进行高清截图
|
||
* @param hdvImageOpt 参数选项
|
||
* @描述 传入参数选项后将进行自动截图并合成,返回对象为 Promise,最终结果为处理后的 base64,任意时刻仅能同时执行1个任务
|
||
* 示例代码:
|
||
* ```
|
||
* let imgPromise = GV.CompoundImage.createHDVImage({
|
||
* viewer: viewer,
|
||
startPoint: [10,10]
|
||
endPoint:[100, 100]
|
||
* })
|
||
* if(imgPromise){
|
||
* imgPromise
|
||
* .then(img => {
|
||
// img 为 base64 结果
|
||
}).catch(()=>{
|
||
alert('异常中断或停止制图~')
|
||
})
|
||
* }
|
||
* ```
|
||
*/
|
||
static createHDVImage(hdvImageOpt: HDVImageOption): Promise<HDVImageData>;
|
||
/**
|
||
* @描述 制图工具进入制图状态,两点确定一个矩形范围,开始截取范围内的高清图片并合成,输入屏幕坐标后进行范围检测,此过程消耗时间较长,只为解决标绘的比例问题;调用该方法后如需自动模式请调用 autoCaptcher 方法选择传入延迟参数,如需自定义进行捕捉动作则调用 next 方法。当捕捉完毕高清合成后自动调用回调函数返回结果
|
||
* @param startX 起始屏幕 x 坐标
|
||
* @param startY 起始屏幕 y 坐标
|
||
* @param endX 终点屏幕 x 坐标
|
||
* @param endY 终点屏幕 y 坐标
|
||
* ```
|
||
* 示例代码:
|
||
* compond.start(10,50,100,200,(imgSrc)=>{
|
||
* // imgSrc 取到高清制图结果的 base64
|
||
* console.log(imgSrc)
|
||
* })
|
||
* ```
|
||
*/
|
||
private static start;
|
||
/**
|
||
* @ignore
|
||
* @param {
|
||
* src: Array, 图片资源,必选
|
||
* width: number, 容器宽度,必选
|
||
* height: number, 容器高度,必填
|
||
* picWidth: number, 图片高度,必填
|
||
* picHeight: number,图片宽度,选填
|
||
* } options
|
||
* @param {Function} callback 回调函数,传入的参数是合成后的 img base64
|
||
*
|
||
* @notes : 根据提供的资源融合成一个大的图片
|
||
*/
|
||
private static _pictureFuse;
|
||
/**
|
||
* @描述 在制图状态开启时:非自动捕捉情况下,调用该方法进行下一个动作的捕获
|
||
*/
|
||
private static next;
|
||
/**
|
||
* @描述 进行自动捕捉截图
|
||
* @param delay 捕捉截图下一次的延迟时间
|
||
*/
|
||
private static autoCaptcher;
|
||
/**
|
||
* @描述 结束当前截图状态
|
||
*/
|
||
static stop(): void;
|
||
/**
|
||
* @ignore
|
||
* @描述 恢复部分标绘状态
|
||
*/
|
||
private static _recoverItem;
|
||
}
|
||
/**
|
||
* 高清制图的导出数据包
|
||
*/
|
||
class HDVImageData {
|
||
/**
|
||
* 处理结果后的目标图 base64
|
||
*/
|
||
image: string;
|
||
/**
|
||
* 原合成后的图片结果
|
||
*/
|
||
originImg: string;
|
||
/**
|
||
* 目标图的宽
|
||
*/
|
||
width: number;
|
||
/**
|
||
* 目标图的高
|
||
*/
|
||
height: number;
|
||
/**
|
||
* 目标图的 dpi
|
||
*/
|
||
dpi: number;
|
||
/**
|
||
* 矩形区域的西经南纬东经北纬
|
||
*/
|
||
rectangle: Array<number>;
|
||
/**
|
||
* 矩形区域的起始经纬度
|
||
*/
|
||
selectGeoPoint: Array<GeoPoint>;
|
||
}
|
||
class HDVImageOption {
|
||
/**
|
||
* 目标画布
|
||
*/
|
||
viewer: GeoCanvas;
|
||
/**
|
||
* 起始屏幕坐标 [x,y] -> [0,0]
|
||
*/
|
||
startPoint: Array<number>;
|
||
/**
|
||
* 终点屏幕坐标 [x,y] -> [0,0]
|
||
*/
|
||
endPoint: Array<number>;
|
||
/**
|
||
* 截图深度,范围内横向截取 2^n 数,默认 2
|
||
*/
|
||
level?: number;
|
||
/**
|
||
* 用于根据实际框选的尺寸获取最终目标 dpi 对应的像素,默认 96
|
||
*/
|
||
dpi?: number;
|
||
/**
|
||
* 每拍摄时将等待下一次的时间 ms
|
||
*/
|
||
delay?: number;
|
||
}
|
||
|
||
class encryptUtil {
|
||
static Decrypt(word: any): any;
|
||
static Encrypt(word: any): any;
|
||
static IsValidDate(str: any): boolean;
|
||
}
|
||
|
||
/**
|
||
* 第一人称控制器
|
||
*/
|
||
class FirstPersonControl {
|
||
private startTime;
|
||
private endTime;
|
||
private currentTime;
|
||
private pathArr;
|
||
private viewer;
|
||
private samplePtProperty;
|
||
private handler;
|
||
private mousePosition;
|
||
private startMousePosition;
|
||
private mouseFlag;
|
||
private duration;
|
||
private dtTime;
|
||
/**
|
||
* 初始化
|
||
* @param viewer
|
||
* @param path 路径点
|
||
* @param duration 时长 单位分
|
||
*/
|
||
constructor(viewer: Cesium.Viewer, path: Array<Cesium.Cartesian3>, duration?: number);
|
||
/**
|
||
* 初始化
|
||
*/
|
||
private init;
|
||
/**
|
||
* 计算摄像机初始位置及参数
|
||
* 说明:为防止camera.flyTo等异步方法造成计算摄像机初始姿态错误,异步方法结束后可执行此方法更新
|
||
*/
|
||
calculateCamera(): void;
|
||
/**
|
||
* 键盘、鼠标控制摄像机
|
||
*/
|
||
private controlCamera;
|
||
private getFlagForKeyCode;
|
||
/**
|
||
* 更新
|
||
*/
|
||
private update;
|
||
/**
|
||
* 清除控件,清除后视角飞回{lon:104, lat:33, alt:15139621}地区
|
||
*/
|
||
clear(): void;
|
||
}
|
||
|
||
/**
|
||
* @类别 需要用户创建的类
|
||
* @描述 GeoPoint经纬度坐标对象</br>
|
||
* 提供了经纬度坐标系和各种坐标系之间的相互转换
|
||
*/
|
||
class GeoPoint {
|
||
/**
|
||
* 经度
|
||
*/
|
||
lon: number;
|
||
/**
|
||
* 维度
|
||
*/
|
||
lat: number;
|
||
/**
|
||
* 高度
|
||
*/
|
||
alt?: number;
|
||
constructor(lon: number, lat: number, alt?: number);
|
||
toJson(): number[];
|
||
add(p: GeoPoint): void;
|
||
subtract(p: GeoPoint): void;
|
||
multiply(v: number): void;
|
||
normalize(): void;
|
||
static add(p1: GeoPoint, p2: GeoPoint, res?: GeoPoint): GeoPoint;
|
||
static subtract(p1: GeoPoint, p2: GeoPoint, res?: GeoPoint): GeoPoint;
|
||
static multiply(p: GeoPoint, v: number, res?: GeoPoint): GeoPoint;
|
||
private static _transformlat;
|
||
private static _transformlng;
|
||
/**
|
||
* Cartesian3坐标转GeoPoint(经纬度)坐标
|
||
* @param Cart3Point
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let geoPoint = GV.GeoPoint.fromCartesian3(new Cesium.Cartesian3(8065, 3650, 150000))
|
||
* ```
|
||
*/
|
||
static fromCartesian3(Cart3Point: Cesium.Cartesian3): GeoPoint;
|
||
/**
|
||
* GeoPoint(经纬度)坐标转Cartesian3坐标
|
||
* @param geoPoint
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let cart3 = GV.GeoPoint.toCartesian3({lon:80,lat:40,alt:50000})
|
||
* ```
|
||
*/
|
||
static toCartesian3(geoPoint: GeoPoint): Cesium.Cartesian3;
|
||
/**
|
||
* 墨卡托坐标转GeoPoint(经纬度)坐标
|
||
* @param x
|
||
* @param y
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let geoPoint = GV.GeoPoint.fromMercator(8905559.263461886, 4865942.279503175)
|
||
* ```
|
||
*/
|
||
static fromMercator(x: number, y: number): GeoPoint;
|
||
/**
|
||
* GeoPoint(经纬度)坐标转墨卡托坐标
|
||
* @param geoPoint
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let mct = GV.GeoPoint.toMercator({lon:80,lat:40,alt:50000})
|
||
* ```
|
||
*/
|
||
static toMercator(geoPoint: GeoPoint): object;
|
||
/**
|
||
* 屏幕坐标转GeoPoint(经纬度)坐标(注:屏幕坐标范围必须在地球显示范围内)
|
||
* @param x 屏幕x轴坐标
|
||
* @param y 屏幕y轴坐标
|
||
* @param viewer
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let mct = GV.GeoPoint.fromScreen(50,40,viewer)
|
||
* ```
|
||
*/
|
||
static fromScreen(x: number, y: number, viewer: Cesium.Viewer): GeoPoint;
|
||
/**
|
||
* GeoPoint(经纬度)坐标转屏幕坐标
|
||
* @param geoPoint
|
||
* @param viewer
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let cart2 = GV.GeoPoint.toScreen({lon:8,lat:40,alt:5000},viewer)
|
||
* ```
|
||
*/
|
||
static toScreen(geoPoint: GeoPoint, viewer: Cesium.Viewer): Cesium.Cartesian2;
|
||
/**
|
||
* 火星坐标转GeoPoint(经纬度)坐标
|
||
* @param gcjPoint {x:y:}
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let geoPoint = GV.GeoPoint.fromGCJ02({x:8.013949658676198, y:39.99879386130122})
|
||
* ```
|
||
*/
|
||
static fromGCJ02(gcjPoint: any): GeoPoint;
|
||
/**
|
||
* GeoPoint(经纬度)坐标转火星坐标
|
||
* @param geoPoint
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let gcj = GV.GeoPoint.toGCJ02({lon:8,lat:40,alt:5000});
|
||
* ```
|
||
*/
|
||
static toGCJ02(geoPoint: GeoPoint): object;
|
||
/**
|
||
* geoPoint转换成数组
|
||
* @param geoPoint 点信息
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let res = GV.GeoPoint.pack({lon:8,lat:40,alt:5000})
|
||
* ```
|
||
*/
|
||
static pack(geoPoint: GeoPoint): Array<number>;
|
||
/**
|
||
* 数组转换成geoPoint
|
||
* @param arr 数组信息
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let res = GV.GeoPoint.unpack([50,45,1555])
|
||
* ```
|
||
*/
|
||
static unpack(arr: any): GeoPoint;
|
||
/**
|
||
* 批量geoPoint转换成数组
|
||
* @param geoPoints 点数组信息
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let res = GV.GeoPoint.packArray([{lon:8,lat:40,alt:5000},{lon:45,lat:30,alt:55}])
|
||
* ```
|
||
*/
|
||
static packArray(geoPoints: Array<GeoPoint>): Array<Array<number>>;
|
||
/**
|
||
* 批量数组转换成geoPoint
|
||
* @param arr 数组信息
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let res = GV.GeoPoint.unpackArray([[50,45,1555],[22,54,4545]])
|
||
* ```
|
||
*/
|
||
static unpackArray(arr: any): Array<GeoPoint>;
|
||
/**
|
||
* 判断经纬坐标点是否相等
|
||
* @param point1
|
||
* @param point2
|
||
*/
|
||
static isEqual(point1: GeoPoint, point2: GeoPoint): boolean;
|
||
/**
|
||
* 判断经纬坐标数组是否相等
|
||
* @param arr1
|
||
* @param arr2
|
||
*/
|
||
static isEqualArr(arr1: Array<GeoPoint>, arr2: Array<GeoPoint>): boolean;
|
||
/**
|
||
* 深度复制
|
||
*/
|
||
static clone(point: GeoPoint, res?: GeoPoint): GeoPoint;
|
||
/**
|
||
* 度转度分秒
|
||
* @param value
|
||
*/
|
||
private static _formatDegree;
|
||
/**
|
||
* 度分秒转度数
|
||
* @param value
|
||
*/
|
||
private static _degreeConvertBack;
|
||
/**
|
||
* 度转换度分秒
|
||
* @param point
|
||
*/
|
||
static formatDegree(point: GeoPoint): FormatGeoPoint;
|
||
static degreeConvertBack(value: FormatGeoPoint): GeoPoint;
|
||
}
|
||
/**
|
||
* 度分秒形势表示坐标
|
||
*/
|
||
class FormatGeoPoint {
|
||
/**
|
||
* 经度
|
||
*/
|
||
lon: {
|
||
direction: string /**方位 west 或 east*/;
|
||
degrees: number /**度 */;
|
||
minutes: number /**分 */;
|
||
seconds: number; /**秒 */
|
||
};
|
||
/**
|
||
* 纬度
|
||
*/
|
||
lat: {
|
||
direction: string /**方位 south 或 north*/;
|
||
degrees: number /**度 */;
|
||
minutes: number /**分 */;
|
||
seconds: number; /**秒 */
|
||
};
|
||
}
|
||
/**
|
||
* 创建标绘的偏移量,x/y的值为偏移的像素值或百分比,如果是数字则按像素处理
|
||
*/
|
||
let ViewOffset: {
|
||
x: number | string;
|
||
y: number | string;
|
||
};
|
||
/**
|
||
* @ignore
|
||
* @description: 获取偏移后的坐标
|
||
* @param {number} pos 位置像素
|
||
* @param {string} axis 坐标轴 "x"、"y"
|
||
* @return {number} 位置像素
|
||
*/
|
||
function getOffsetedPosition(pos: number, axis: string): number;
|
||
|
||
/**
|
||
* @类别 需要用户创建的类
|
||
* @描述 提供路径回调函数
|
||
*/
|
||
class Path {
|
||
private _id;
|
||
private _callback;
|
||
private _pathPositions;
|
||
private _startTime;
|
||
private posProperty;
|
||
private _endTime;
|
||
private _onStop;
|
||
private _doneStopAction;
|
||
private _actions;
|
||
private _viewer;
|
||
private _pathManager;
|
||
constructor(viewer: Cesium.Viewer | GeoCanvas, startTime?: Cesium.JulianDate);
|
||
readonly id: string;
|
||
/**
|
||
* @name: 设置开始时间
|
||
* @msg:
|
||
* @param {JulianDate} startTime
|
||
* @return {*}
|
||
*/
|
||
startTime: Cesium.JulianDate;
|
||
readonly endTime: Cesium.JulianDate;
|
||
/**
|
||
* 设置关键点
|
||
*/
|
||
pathPositions: Array<{
|
||
point: GeoPoint;
|
||
time: number;
|
||
}>;
|
||
pathManager: PathManager;
|
||
/**
|
||
* 动画结束事件
|
||
* 说明:当动画结束时要执行的回调函数,一个动画只会调用一次结束动作
|
||
*/
|
||
onStop: any;
|
||
private _init;
|
||
pathFun: (currentTime: any) => void;
|
||
/**
|
||
* @name: 绑定相机
|
||
* @msg:
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
bindCamera(action: Action["cameraMove"]): void;
|
||
/**
|
||
* @name: 绑定图形
|
||
* @msg:
|
||
* @param {*} graphic // 绑定的图形对象
|
||
* @param {*} relativePosParam // 相对位置参数
|
||
* @param {*} action // 绑定的图形对象所要执行的动作
|
||
*/
|
||
bindGraphic(graphic: any, relativePosParam: RelativePosParam, action: Action): void;
|
||
private _addAction;
|
||
private _doAction;
|
||
/**
|
||
* @name: 动态改变像素
|
||
* @msg:
|
||
* @param {*} action 动作对象
|
||
* @param {*} pixelSizeParam 图形的像素参数
|
||
* @return {*}
|
||
*/
|
||
private _changePixelSize;
|
||
/**
|
||
* @name: 修改透明度
|
||
* @msg: 暂仅支持rgba颜色格式
|
||
* @param {*} action 动作对象
|
||
* @param {*} diluteParam 图形的透明度参数
|
||
* @return {*}
|
||
*/
|
||
private _changeTransparent;
|
||
/**
|
||
* @name: 解析rgb字符串
|
||
* @msg:
|
||
* @param {*}
|
||
* @return {*}
|
||
*/
|
||
private _parseRGB;
|
||
/**
|
||
* 设置回调函数
|
||
*/
|
||
callback: Function;
|
||
}
|
||
/**
|
||
* @name: 相对位置
|
||
*/
|
||
interface RelativePosParam {
|
||
x: number;
|
||
y: number;
|
||
z: number;
|
||
heading: number;
|
||
pitch: number;
|
||
roll: number;
|
||
}
|
||
/**
|
||
* @name: 动作
|
||
*/
|
||
interface Action {
|
||
cameraMove?: {
|
||
startTime?: number;
|
||
endTime?: number;
|
||
operation?: string;
|
||
isTrack?: boolean;
|
||
relativePosParam?: any;
|
||
callback?: Function;
|
||
}[];
|
||
pixelSize?: {
|
||
startTime?: number;
|
||
endTime?: number;
|
||
graphic?: any;
|
||
operation?: string;
|
||
factor?: number;
|
||
}[];
|
||
visible?: {
|
||
startTime?: number;
|
||
endTime?: number;
|
||
graphic?: any;
|
||
operation?: string;
|
||
frequency?: number;
|
||
}[];
|
||
dilute?: {
|
||
startTime?: number;
|
||
endTime?: number;
|
||
graphic?: any;
|
||
operation?: string;
|
||
factor?: number;
|
||
}[];
|
||
move?: {
|
||
startTime?: number;
|
||
endTime?: number;
|
||
graphic?: any;
|
||
operation?: string;
|
||
relativePosParam?: any;
|
||
moveCallback?: Function;
|
||
}[];
|
||
}
|
||
|
||
class PathManager {
|
||
private _state;
|
||
private _pathCollection;
|
||
private _startTime;
|
||
private _endTime;
|
||
private _tickListener;
|
||
private _clock;
|
||
private _multiplier;
|
||
private _viewer;
|
||
private _stopCallBack;
|
||
private _startCallBack;
|
||
private _pauseCallBack;
|
||
private _runCallBack;
|
||
constructor(viewer: any);
|
||
speed: number;
|
||
addPath(path: Path): void;
|
||
delPath(path: Path): void;
|
||
clearPaths(): void;
|
||
start(): void;
|
||
pause(): void;
|
||
reStart(): void;
|
||
stop(): void;
|
||
setStartCallBack(startCallBack: any): void;
|
||
setPauseCallBack(pauseCallBack: any): void;
|
||
setRunCallBack(runCallBack: any): void;
|
||
setStopCallBack(stopCallBack: any): void;
|
||
private _listenerFun;
|
||
private _removeTickListener;
|
||
calcTimeBound(): void;
|
||
}
|
||
/**
|
||
* 动画执行状态
|
||
*/
|
||
enum PathsStateEnum {
|
||
/**
|
||
* 未开始
|
||
*/
|
||
NotStart = "notstart",
|
||
/**
|
||
* 正在运行
|
||
*/
|
||
Start = "start",
|
||
/**
|
||
* 暂停
|
||
*/
|
||
Pause = "pause",
|
||
/**
|
||
* 停止
|
||
*/
|
||
Stop = "stop",
|
||
/**
|
||
* 重新运行
|
||
*/
|
||
ReStart = "restart"
|
||
}
|
||
enum PathModeEnum {
|
||
/**
|
||
* 重复
|
||
*/
|
||
Loop = "loop",
|
||
/**
|
||
* 一次
|
||
*/
|
||
Single = "single"
|
||
}
|
||
|
||
class Picking {
|
||
private _viewer;
|
||
private scratchPerspectiveFrustum;
|
||
private scratchPerspectiveOffCenterFrustum;
|
||
private scratchOrthographicFrustum;
|
||
private scratchOrthographicOffCenterFrustum;
|
||
private scratchPerspPickingFrustum;
|
||
private scratchOrthoPickingFrustum;
|
||
private scratchOrthoDirection;
|
||
constructor(viewer: Cesium.Viewer);
|
||
getPickOrthographicCullingVolume(scene: any, drawingBufferPosition: any, width: any, height: any, viewport: any): any;
|
||
getPickPerspectiveCullingVolume(scene: any, drawingBufferPosition: any, width: any, height: any, viewport: any): Cesium.CullingVolume;
|
||
getPickCullingVolume(scene: any, drawingBufferPosition: any, width: any, height: any, viewport: any): any;
|
||
renderTranslucentDepthForPick(scene: any, drawingBufferPosition: any): void;
|
||
/**
|
||
* 根据屏幕坐标拾取世界坐标(对开启深度测试的标绘对象有效,对关闭深度测试的标绘对象无效,本接口返回undefined值)
|
||
* @param x
|
||
* @param y
|
||
*/
|
||
pickCoordinate(x: number, y: number): any;
|
||
/**
|
||
* 根据屏幕坐标拾取地理坐标,即经纬高坐标(对开启深度测试的标绘对象有效,对关闭深度测试的标绘对象无效,本接口返回undefined值)
|
||
* @param x
|
||
* @param y
|
||
*/
|
||
pickGeoPoint(x: number, y: number): GeoPoint;
|
||
}
|
||
|
||
/**
|
||
* @private
|
||
*/
|
||
class DateHelper {
|
||
static toggleTime(date: Date): string;
|
||
static toggleTimeIso(date: Date): string;
|
||
static addDate(date: Date, days: any): string;
|
||
static getFormatDate(arg: any): string;
|
||
static getStrNow(): string;
|
||
static getStr(date: Date): string;
|
||
private static getTodayZeroDate;
|
||
private static getTodayMaxDate;
|
||
static getTodayStartStr(): string;
|
||
static getTodayEndStr(): string;
|
||
static getTomorrowStartStr(): string;
|
||
static getTomorrowEndStr(): string;
|
||
static getWeekStartStr(): string;
|
||
static getWeekEndStr(): string;
|
||
static getMonthStartStr(): string;
|
||
static getMonthEndStr(): string;
|
||
static getYearStartStr(): string;
|
||
static getYearEndStr(): string;
|
||
static getDate15(): Date;
|
||
static getDate60(): Date;
|
||
static getDate120(): Date;
|
||
static addSecond(data: Date, ss: number): Date;
|
||
static addMinutes(data: Date, MM: number): Date;
|
||
}
|
||
|
||
/**
|
||
* 算法类
|
||
*/
|
||
class GxMath {
|
||
/**
|
||
* 计算两个点的方位角
|
||
* @param x1
|
||
* @param y1
|
||
* @param x2
|
||
* @param y2
|
||
* @return 返回方位角
|
||
*/
|
||
static calculateAngle(x1: any, y1: any, x2: any, y2: any): number;
|
||
/**
|
||
* 根据卫星根数,计算获得卫星周期(单位:分钟)
|
||
* @param tle1 卫星根数1,例如:'1 25544U 98067A 13149.87225694 .00009369 00000-0 16828-3 0 9031'
|
||
* @param tle2 卫星根数2,例如:'2 25544 051.6485 199.1576 0010128 012.7275 352.5669 15.50581403831869'
|
||
*/
|
||
static calculatePeriod(tle1: string, tle2: string): number;
|
||
/**
|
||
* 计算一个周期内的卫星ECI坐标(闭合的圆)
|
||
* @param beginTime 起始时间
|
||
* @param tle1 卫星根数1,例如:'1 25544U 98067A 13149.87225694 .00009369 00000-0 16828-3 0 9031'
|
||
* @param tle2 卫星根数2,例如:'2 25544 051.6485 199.1576 0010128 012.7275 352.5669 15.50581403831869'
|
||
* @param period 时长(单位:分钟),默认值为一个周期时长
|
||
* @param cnt 采样点个数
|
||
*/
|
||
static calculateOrbitEci(beginTime: Date, tle1: string, tle2: string, period?: number, cnt?: number): Array<GeoVector3>;
|
||
/**
|
||
* 获取卫星在某一时间点的Eci位置
|
||
* @param t 时间
|
||
* @param tle1 卫星根数1,例如:'1 25544U 98067A 13149.87225694 .00009369 00000-0 16828-3 0 9031'
|
||
* @param tle2 卫星根数2,例如:'2 25544 051.6485 199.1576 0010128 012.7275 352.5669 15.50581403831869'
|
||
*/
|
||
static getEciPosition(t: Date, tle1: string, tle2: string): Cesium.Cartesian3;
|
||
/**
|
||
* 计算一个周期内的卫星ECF坐标(非闭合的圆)
|
||
* @param beginTime 起始时间
|
||
* @param tle1 卫星根数1,例如:'1 25544U 98067A 13149.87225694 .00009369 00000-0 16828-3 0 9031'
|
||
* @param tle2 卫星根数2,例如:'2 25544 051.6485 199.1576 0010128 012.7275 352.5669 15.50581403831869'
|
||
* @param period 时长(单位:分钟),默认值为一个周期时长
|
||
* @param cnt 采样点个数
|
||
*/
|
||
static calculateOrbitEcf(beginTime: Date, tle1: string, tle2: string, period?: number, cnt?: number): Array<GeoVector3>;
|
||
/**
|
||
* 获取卫星在某一时间点的Ecf位置
|
||
* @param t 时间
|
||
* @param tle1 卫星根数1,例如:'1 25544U 98067A 13149.87225694 .00009369 00000-0 16828-3 0 9031'
|
||
* @param tle2 卫星根数2,例如:'2 25544 051.6485 199.1576 0010128 012.7275 352.5669 15.50581403831869'
|
||
*/
|
||
static getEcfPosition(t: Date, tle1: string, tle2: string): Cesium.Cartesian3;
|
||
/**
|
||
* 计算一个周期内的卫星地理坐标(经纬高)
|
||
* @param beginTime 起始时间
|
||
* @param tle1 卫星根数1,例如:'1 25544U 98067A 13149.87225694 .00009369 00000-0 16828-3 0 9031'
|
||
* @param tle2 卫星根数2,例如:'2 25544 051.6485 199.1576 0010128 012.7275 352.5669 15.50581403831869'
|
||
* @param period 时长(单位:分钟),默认值为一个周期时长
|
||
* @param cnt 采样点个数
|
||
*/
|
||
static calculateOrbitGeodetic(beginTime: Date, tle1: string, tle2: string, period?: number, cnt?: number): Array<GeoVector3>;
|
||
/**
|
||
* 获取卫星在某一时间点的地理位置
|
||
* @param t 时间
|
||
* @param tle1 卫星根数1,例如:'1 25544U 98067A 13149.87225694 .00009369 00000-0 16828-3 0 9031'
|
||
* @param tle2 卫星根数2,例如:'2 25544 051.6485 199.1576 0010128 012.7275 352.5669 15.50581403831869'
|
||
*/
|
||
static getGeoPosition(t: Date, tle1: string, tle2: string): GeoPoint;
|
||
/**
|
||
* 根据笛卡尔坐标换算经度
|
||
* @param cartesian3
|
||
* @param viewer
|
||
*/
|
||
static getLongitudeByCartesian3(cartesian3: Cesium.Cartesian3, viewer: Cesium.Viewer): number;
|
||
/**
|
||
* 根据笛卡尔坐标换算维度
|
||
*/
|
||
static getLatitudeByCartesian3(cartesian3: Cesium.Cartesian3, viewer: Cesium.Viewer): number;
|
||
/**
|
||
* 根据笛卡儿直角坐标算高度
|
||
*/
|
||
static getHeightByCartesian3(cartesian3: Cesium.Cartesian3, viewer: Cesium.Viewer): number;
|
||
/**
|
||
* 根据设置高度返回笛卡尔坐标
|
||
* @param cartesian3
|
||
* @param height
|
||
*/
|
||
static getHeightdefineByXYZ(cartesian3: Cesium.Cartesian3, height: number, viewer: Cesium.Viewer): Cesium.Cartesian3;
|
||
/**
|
||
* 转换屏幕坐标(来自于鼠标的各种event)为地理坐标
|
||
* @param {screen position from mouse} screenPos
|
||
* @private
|
||
*/
|
||
static screen2lonlat(screenPos: any, viewer: any): number[];
|
||
/**
|
||
* 转换地理坐标到cesium cartesian
|
||
* @param {地理坐标} lonlat
|
||
* @param {高度值} height
|
||
* @private
|
||
*/
|
||
static lonlat2Cartesian(lonlat: any, height?: number): Cesium.Cartesian3;
|
||
/**
|
||
*
|
||
* @private
|
||
*/
|
||
static lonlathei2Cartesian(lonlathei: any): Cesium.Cartesian3;
|
||
/**
|
||
*
|
||
* @private
|
||
*/
|
||
static cartesian2lonlat(cartesian: any): number[];
|
||
/**
|
||
*
|
||
* @private
|
||
*/
|
||
static screen2Cartesian(screenPos: any, height: number, viewer: any): Cesium.Cartesian3;
|
||
/**
|
||
* @param {* java script date} date
|
||
* @Return iso8601 date string like 2012-04-30T12:00:00Z
|
||
* @private
|
||
*/
|
||
static dateToString(date: any): string;
|
||
/**
|
||
* 将date日期转换为Julian日期对象,如果date为空,则获取当前时间
|
||
* @param {JulianDate} date
|
||
* @private
|
||
*/
|
||
static julianDate(date?: any): Cesium.JulianDate;
|
||
/**
|
||
* @private
|
||
* @param cart1
|
||
* @param cart2
|
||
*/
|
||
static distance(cart1: any, cart2: any): number;
|
||
/**
|
||
*
|
||
* @private
|
||
*/
|
||
static cartesian2turfPoint(cartesian: any): any;
|
||
/**
|
||
*
|
||
* @private
|
||
*/
|
||
static turfGeometry2Cartesians(g: any, height?: number): any;
|
||
/**
|
||
*
|
||
* @private
|
||
*/
|
||
static deleteEnts(ents: any, viewer: any): void;
|
||
}
|
||
|
||
class SpecularReflection {
|
||
private viewer;
|
||
private value;
|
||
constructor(viewer: Cesium.Viewer);
|
||
remove(): void;
|
||
add(): void;
|
||
destroy(): void;
|
||
enabled: Boolean;
|
||
static fragmentShader: string;
|
||
}
|
||
|
||
class StatusCheck {
|
||
static licTimer: any;
|
||
static licDom: any;
|
||
private static getData;
|
||
static start(): Promise<boolean>;
|
||
private static iekey;
|
||
static checkFalse(): void;
|
||
private static createDom;
|
||
static startWebSocket(timeout?: number): Promise<void>;
|
||
static isDecodeSuccess(key: any): boolean;
|
||
}
|
||
|
||
class EarthTheme {
|
||
/**
|
||
* @name: 获取底图主题
|
||
* @msg:
|
||
* @param {string} url xyz瓦片地址
|
||
* @return {*}
|
||
*/
|
||
static getTheme(url?: string): Cesium.UrlTemplateImageryProvider;
|
||
}
|
||
class SkyboxTheme {
|
||
/**
|
||
* @name: 获取天空盒子
|
||
* @msg: 天空盒子命名规则PositiveX、NegativeX、PositiveY、NegativeY、PositiveZ、NegativeZ,如果为高清图则加上hd_前缀
|
||
* @param {string} url 天空盒子基础路径
|
||
* @param {boolean} isHD 是否为高清图
|
||
* @param {string} format
|
||
* @return {*}
|
||
*/
|
||
static getSkyBox(url?: string, isHD?: boolean, format?: string): Cesium.SkyBox;
|
||
}
|
||
|
||
/**
|
||
* @类别 无需创建,初始化球时自动创建并且与球对应的类
|
||
* @描述 通用基础方法集
|
||
*/
|
||
class Util {
|
||
/**
|
||
* 传入相对于GEOVIS.web.js的相对路径获得完整资源路径
|
||
* @param url 相对与GEOVIS.web.js路径
|
||
* @return 完整路径
|
||
* ```
|
||
* 示例代码:
|
||
* let url = GV.Util.formatUrlByBaseJs('./data.png')
|
||
* ```
|
||
*/
|
||
static formatUrlByBaseJs(url: string): string;
|
||
private static getBaseUrlFromGEOVISScript;
|
||
/**
|
||
* 生成唯一的随机id
|
||
* @return
|
||
*/
|
||
static createGuid(): string;
|
||
/**
|
||
* 返回默认参数
|
||
* @param a
|
||
* @param b
|
||
*/
|
||
static defaultValue(a: any, b: any): any;
|
||
/**
|
||
* 路径拼接根据原始路径及原始路径的相对路径获得完整路径
|
||
* @param originPath 原始路径
|
||
* @param file 原始路径的相对路径
|
||
*/
|
||
static formatURLByCustom(originPath: string, file: string): string;
|
||
/**
|
||
* 路径拼接获得当前html的原始路径与相对路径拼接获得完整路径
|
||
* @param file 相对于html的相对路径
|
||
*/
|
||
static formatURL(file: string): string;
|
||
/**
|
||
* 同步获取text
|
||
* @param path
|
||
*/
|
||
static syncGetText(path: any): string;
|
||
/**
|
||
* 同步获取json数据
|
||
*/
|
||
static syncGetJson(path: any): any;
|
||
static formatURL2(originPath: any, file: any): any;
|
||
/**
|
||
* 将html标签转成canvas
|
||
* @param container html容器
|
||
* @param option 配置
|
||
* @param callback 反馈
|
||
*/
|
||
static html2canvas(container: any, option: any, callback?: any): void;
|
||
/**
|
||
* 将EPSG:3857坐标转换为EPSG:4326坐标系下坐标
|
||
* @param x
|
||
* @param y
|
||
*/
|
||
static epsg3857To4326(x: any, y: any): any;
|
||
/**
|
||
* 将EPSG:4326坐标转换为EPSG:3857坐标系下坐标
|
||
* @param lon 经度(degree)
|
||
* @param lat 维度(degree)
|
||
*/
|
||
static epsg4326To3857(lon: any, lat: any): any;
|
||
/**
|
||
* 根据地理编码获取范围
|
||
* @param {Number} x The tile X coordinate.
|
||
* @param {Number} y The tile Y coordinate.
|
||
* @param {Number} level The tile level.
|
||
* @returns {Cesium.Rectangle} the area Cartographic position
|
||
*/
|
||
static getRectangleFromcode(level: any, x: any, y: any): Cesium.Rectangle;
|
||
/**
|
||
* 根据地理编码获取范围
|
||
* @param viewer
|
||
* @param {Cartesian} mousePos The screen positon
|
||
* @returns {object} the area Cartographic position
|
||
* {
|
||
"level": 5,
|
||
"x": 2,
|
||
"y": x,
|
||
"resolution":"9公里"
|
||
|
||
}
|
||
*/
|
||
static getCodeFromScreenPosition(viewer: any, mousePos: any): {
|
||
"level": number;
|
||
"x": number;
|
||
"y": number;
|
||
"resolution": any;
|
||
};
|
||
/**
|
||
* 前置整数
|
||
*/
|
||
static PrefixInteger(num: any, n: any): string;
|
||
/**
|
||
* 计算某地理坐标一定距离和角度的地理坐标
|
||
* @param {number} lon The geoposition of longitude,in degreee
|
||
* @param {number} lat The geoposition of latitude,in degreee
|
||
* @param {number} height
|
||
* @param {number} dis The distance to the geoposition
|
||
* @param {number} angel The angle to the north,in degreee
|
||
* @returns {object} the new geoposition ,in degree
|
||
* {
|
||
"lon": 120.0,
|
||
"lat": 30.0
|
||
}
|
||
*/
|
||
static calculateNewGeoposition(viewer: any, lon: any, lat: any, height: any, dis: any, angel: any): {
|
||
"lon": number;
|
||
"lat": number;
|
||
};
|
||
/**
|
||
* @描述 将高清制图画到球上
|
||
* @param viewer 目标的球
|
||
* @param src 上球图片的资源
|
||
* @param rectangle 可选,为上球的矩形范围 [西经,南纬,东经,北纬],如果资源为高清导出的图片,无需填写。
|
||
* @returns 返回结果为 Promise 对象,成功结果为 ImageryProvider 图层
|
||
*/
|
||
static drawImgToEarth(viewer: any, src: string, rectangle?: Array<number>): Promise<Cesium.ImageryProvider>;
|
||
private static _drawOriginImgToEarth;
|
||
/**
|
||
* @描述 获取两点与地形的交点
|
||
* @param viewer 目标的球
|
||
* @param fromPosition 起点
|
||
* @param toPosition 终点
|
||
* @returns 返回结果为相交点,如果没有相交点,返回undefined
|
||
*/
|
||
static intersectionWithTerrain(viewer: Cesium.Viewer, fromPosition: Cesium.Cartesian3, toPosition: Cesium.Cartesian3): Cesium.Cartesian3;
|
||
/**
|
||
* 判断坐标点是否可见(支持二三维)
|
||
* @param point 坐标点
|
||
* @param viewer 球
|
||
* @return boolean 可见为 true
|
||
*/
|
||
static pointIsVisible(point: GeoPoint, viewer: Cesium.Viewer): boolean;
|
||
/**
|
||
* 计算数值保留指定小数位的对应精度值
|
||
* @param v 数值
|
||
* @param decimal 小数位数
|
||
*/
|
||
static getPrecision(v: number, decimal?: number): number;
|
||
/**
|
||
* 将请求的PBF ArrayBuffer 代码解析成GeoJSON数组数据
|
||
* @param data PBF ArrayBuffer 类型
|
||
*/
|
||
static getGeoJSONFromPbf(data: any, level: any, x: any, y: any): any;
|
||
/**
|
||
* GET方式获取地址
|
||
* @param url 服务地址
|
||
* @param data 数据
|
||
*/
|
||
static get(url: string): Promise<any>;
|
||
/**
|
||
* POST方式获取地址
|
||
* @param url 服务地址
|
||
* @param data 数据
|
||
*/
|
||
static post(url: string, data: object): Promise<any>;
|
||
/**
|
||
*@ignore
|
||
*/
|
||
private static getCGCSArea;
|
||
/**
|
||
* 根据全国20个子版块的欧拉矢量模型计算基于CGCS2000的每年改正数
|
||
* * @param viewer 球
|
||
* @param lon {number} 经度
|
||
* @param lat {number} 纬度
|
||
* @returns {object} 返回每年修正后的笛卡尔坐标改正量,单位:米
|
||
* {
|
||
"dx": 0.03,
|
||
"dy": 0.01,
|
||
"dz": 0.01
|
||
|
||
}
|
||
*/
|
||
static toCGCS000(viewer: Cesium.Viewer, lon: number, lat: number): {
|
||
"dx": number;
|
||
"dy": number;
|
||
"dz": number;
|
||
};
|
||
/**
|
||
* 判断多边形是否为凸多边形
|
||
* @param posArray 多边形数组
|
||
* @returns {number} 返回值:1为凸多边形, -1为凹多边形,0为其他
|
||
*/
|
||
static isConvex(posArray: Array<GeoPoint>): 0 | 1 | -1;
|
||
/**
|
||
* @ignore
|
||
* 聚合算法
|
||
*/
|
||
static clustering: any;
|
||
}
|
||
|
||
/**
|
||
* @类别 需要用户创建的类
|
||
* @描述 视角点
|
||
*/
|
||
class ViewPoint {
|
||
/**
|
||
* 经度
|
||
*/
|
||
lon: number;
|
||
/**
|
||
* 纬度
|
||
*/
|
||
lat: number;
|
||
/**
|
||
* 高度
|
||
*/
|
||
alt: number;
|
||
/**
|
||
* 顺/逆时针旋转角度 范围: >=0 && <=360 (如果为负值会转换成相对应的正向角度数,如:-30 =》 330)
|
||
*/
|
||
heading: number;
|
||
/**
|
||
* 俯仰 范围:>=-90 && <=90
|
||
*/
|
||
pitch: number;
|
||
/**
|
||
* 旋转 范围:>=0 && <=360
|
||
*/
|
||
roll: number;
|
||
constructor(lon: number, lat: number, alt?: number, heading?: number, pitch?: number, roll?: number);
|
||
/**
|
||
* viewPoint转换成数组
|
||
* @param viewPoint 视角点
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let viewPoint = new GV.ViewPoint(100,20,500000)
|
||
* let pack = GV.ViewPoint.pack(viewPoint)
|
||
* ```
|
||
*/
|
||
static pack(viewPoint: any): Array<number>;
|
||
/**
|
||
* 数组转换成viewPoint
|
||
* @param arr 数组
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let arr = [100,20,500000,-90,0,0]
|
||
* let pack = GV.ViewPoint.unpack(arr)
|
||
* ```
|
||
*/
|
||
static unpack(arr: any): ViewPoint;
|
||
}
|
||
|
||
/**
|
||
* @类别 无需创建,初始化球时自动创建并且与球对应的类</br>
|
||
* @描述 GEOVIS Camera 视口操作器 </br>
|
||
* 提供了视口操作的通用接口,支持绕点旋转定位飞行等功能</br>
|
||
* @see <a href='../../../examples/gallery/editor.html#rotate'>旋转</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#zoom'>缩放</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#rotateByCurrent'>原地观测</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#pitch'>俯仰</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#fly'>视角飞行</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#rotateByPoint'>绕点观测</a>
|
||
* @see <a href='../../../examples/gallery/editor.html#flyHome'>视角飞回</a>
|
||
*/
|
||
class Camera {
|
||
private _viewer;
|
||
private _viewPoint;
|
||
private _home;
|
||
private _moveEnd;
|
||
private _moveStart;
|
||
private _changed;
|
||
private _timeExection;
|
||
/**
|
||
* 在创建GeoCanvas后通过viewer.iCamera调用
|
||
* ```
|
||
* 示例代码
|
||
* let viewer = new GV.GeoCanvas('geoCanvas')
|
||
* viewer.iCamera
|
||
* ```
|
||
*/
|
||
constructor(viewer: GeoCanvas);
|
||
/**
|
||
* 相机移动过程结束时所执行操作
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
*viewer.iCamera.moveEnd.addEventListener(function(){
|
||
* console.log("moveEnd")
|
||
* })
|
||
* ```
|
||
*/
|
||
readonly moveEnd: Cesium.Event;
|
||
/**
|
||
* 相机移动过程开始时所执行操作
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.iCamera.moveStart.addEventListener(function(){
|
||
* console.log("moveStart")
|
||
* })
|
||
* ```
|
||
*/
|
||
readonly moveStart: Cesium.Event;
|
||
/**
|
||
* 相机变动时所执行操作
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.iCamera.changed.addEventListener(function(){
|
||
* console.log("changed")
|
||
* })
|
||
* ```
|
||
*/
|
||
readonly changed: Cesium.Event;
|
||
/**
|
||
* 获取视角点信息
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* let viewPoint = viewer.iCamera.viewPoint;//获取当前相机视角信息
|
||
* ```
|
||
*/
|
||
readonly viewPoint: ViewPoint;
|
||
/**
|
||
* 设置或获取home视角
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.iCamera.home = new GV.ViewPoint(104,33,15139621,360,-89,0)//设置home视角信息
|
||
* let home = viewer.iCamera.home;//获取home视角信息
|
||
* ```
|
||
*/
|
||
home: ViewPoint;
|
||
private _getCameraCenter;
|
||
private _getCameraTransform;
|
||
/**
|
||
* 飞行到某一视角点
|
||
* @param viewPoint 视角点信息
|
||
* @param duration 飞行周期(单位:秒)(范围:>0 && <=10)
|
||
* @param completeCallbak 飞行完成时回调函数
|
||
* @param cancelCallback 飞行取消时回调函数
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.iCamera.flyTo(new GV.ViewPoint(80,33,5000,360,-89,0),2,function(){
|
||
* console.log('complete')
|
||
* })
|
||
* ```
|
||
*/
|
||
flyTo(viewPoint: ViewPoint, duration?: number, completeCallbak?: any, cancelCallback?: any): void;
|
||
/**
|
||
* 飞行到某一矩形区域
|
||
* @param minlon 矩形区域最小经度
|
||
* @param maxlon 矩形区域最大经度
|
||
* @param minlat 矩形区域最小纬度
|
||
* @param maxlat 矩形区域最大纬度
|
||
* @param duration 飞行周期(单位:秒)(范围:>0 && <=10)
|
||
* @param completeCallbak 飞行完成时回调函数
|
||
* @param cancelCallback 飞行取消时回调函数
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.iCamera.flyToRect(110,118,30,40,2,function(){
|
||
* console.log('complete')
|
||
* })
|
||
* ```
|
||
*/
|
||
flyToRect(minlon: number, maxlon: number, minlat: number, maxlat: number, duration?: number, completeCallbak?: any, cancelCallback?: any): void;
|
||
/**
|
||
* 获取当前地图层级(最大瓦片层级)
|
||
*/
|
||
readonly currentLevel: Number;
|
||
/**
|
||
* 飞回主视角
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.iCamera.flyToHome()
|
||
* ```
|
||
*/
|
||
flyToHome(): void;
|
||
/**
|
||
* 俯仰
|
||
* @param degree 度数 范围: >=-90 && <=90
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.iCamera.pitch(-30)
|
||
* ```
|
||
*/
|
||
pitch(degree: number): void;
|
||
/**
|
||
* 旋转
|
||
* @param degree 度数 范围:>=-360 && <=360
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.iCamera.rotate(-30)
|
||
* ```
|
||
*/
|
||
rotate(degree: number): void;
|
||
/**
|
||
* 原地观测
|
||
* @param duration 观测一周所用时间(单位:s)(范围:>0 && <= 360)
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.iCamera.lookCenter(20)
|
||
* ```
|
||
*/
|
||
lookCenter(duration?: number): void;
|
||
/**
|
||
* 绕点观测
|
||
* @param geoPoint
|
||
* @param duration 观测一周所用时间(单位:s) (范围:>=0 && <=360)
|
||
* @param distance 观测点和相机间的距离
|
||
* @param pitch 俯仰度数
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.iCamera.lookAround({lon:112,lat:40,alt:50000})
|
||
* ```
|
||
*/
|
||
lookAround(geoPoint: GeoPoint, duration?: number, distance?: number, pitch?: number): void;
|
||
/**
|
||
* 停止观测
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.iCamera.lookStop()
|
||
* ```
|
||
*/
|
||
lookStop(): void;
|
||
/**
|
||
* 放大
|
||
* @param rate 倍率范围:>=-360 && <=360
|
||
* @return
|
||
* ```
|
||
* 示例代码:
|
||
* viewer.iCamera.zoom(10)
|
||
* ```
|
||
*/
|
||
zoom(rate?: number): void;
|
||
}
|
||
|
||
/**
|
||
* 地理画布入口
|
||
*/
|
||
class GeoCanvas extends Cesium.Viewer {
|
||
private _sceneOptions;
|
||
private _layerManager;
|
||
private _camera;
|
||
private _analysis;
|
||
private _pluginManager;
|
||
private _JBConfig;
|
||
private _$bus;
|
||
/**
|
||
* @param {Element} container 地理画布父div元素
|
||
* @param {Object} [options] 地图配置属性
|
||
* @param {String} [options.baseJbUrl] 军标服务路径
|
||
* @param {String} [options.baseLayerPicker=false] 基础影像
|
||
*/
|
||
constructor(container: any, options: any);
|
||
private init;
|
||
readonly JBConfig: any;
|
||
readonly pluginManager: PluginManager;
|
||
/**
|
||
* 场景参数
|
||
*/
|
||
readonly sceneOptions: SceneOptions;
|
||
/**
|
||
* 图层管理
|
||
*/
|
||
readonly layerManager: LayerManager;
|
||
/**
|
||
* 相机参数
|
||
*/
|
||
readonly iCamera: Camera;
|
||
/**
|
||
* 高效绘制图层
|
||
*/
|
||
/**
|
||
* 卫星图层
|
||
*/
|
||
readonly satelliteLayer: SatelliteLayer;
|
||
/**
|
||
* 标绘图层
|
||
*/
|
||
readonly graphicLayer: GraphicLayer;
|
||
/**
|
||
* 影像图层
|
||
*/
|
||
readonly imageLayer: ImageLayer;
|
||
/**
|
||
* 目标图层
|
||
*/
|
||
readonly targetLayer: TargetLayer;
|
||
/**
|
||
* 瓦片图层
|
||
*/
|
||
readonly tileLayer: TileLayer;
|
||
/**
|
||
* 动画图层
|
||
*/
|
||
readonly actionLayer: ActionLayer;
|
||
/**
|
||
* 分析工具
|
||
*/
|
||
readonly analysis: Analysis;
|
||
/**
|
||
* 场景抗锯齿
|
||
* true 开启
|
||
*/
|
||
fxaa: boolean;
|
||
/**
|
||
* 事件消息处理器
|
||
* on 注册事件
|
||
* fire 触发事件
|
||
* off 解除事件
|
||
*/
|
||
readonly $bus: Event;
|
||
destroy(): void;
|
||
}
|
||
|
||
} |