///
///
declare module 'bcgis-sdk/dist/bcgis.base.min';
declare module 'bcgis-sdk/dist/bcgis.core.min';
declare namespace BC {
export declare let Namespace = {
Cesium
};
///
/**
* 场景动画基类
*/
declare abstract class Animation_2 {
protected _viewer: Viewer;
protected _options: any;
/* Excluded from this release type: __constructor */
/**
* 绑定事件
*/
protected abstract _bindEvent(): any;
/**
* 解绑事件
*/
protected abstract _unbindEvent(): any;
/**
* 开始动画
* @returns
*/
start(): this;
/**
* 停止动画
* @returns
*/
stop(): this;
}
export { Animation_2 as Animation }
export declare let AnimationType: any;
/**
* 点位环绕构造函数选项
*/
export declare namespace AroundPoint {
export type ConstructorOptions = {
/**
* 偏移角度
*/
heading: number;
/**
* 翻转角度
*/
pitch: number;
/**
* 距离
*/
range: number;
/**
* 间隔,单位:秒,当此值大于0时,callback才会生效
*/
duration: number;
/**
* 完成回调函数
*/
callback: Function;
/**
* 回调函数执行上下文
*/
context: any;
};
}
/**
* 点位环绕
* ```ts
* let aroundPoint = new BC.AroundPoint(viewer, '120.121, 31.12')
* aroundPoint.start()
* ```
*/
export declare class AroundPoint extends Animation_2 {
private _position;
private _heading;
private _aroundAmount;
/**
*
* @param viewer 3D 场景
* @param position 点位
* @param options 选项
*/
constructor(viewer: Viewer, position: Position | string | string[] | number[], options?: AroundPoint.ConstructorOptions);
/* Excluded from this release type: type */
/**
* 位置
*/
set position(position: Position | string | string[] | number[]);
/**
* 环绕量,控制环绕速度
*/
set aroundAmount(aroundAmount: number);
/**
* 绑定事件
*/
protected _bindEvent(): void;
/**
* 解绑事件
*/
protected _unbindEvent(): void;
/**
*
* @param scene
* @param time
*/
private _onAround;
}
/**
* 相机环绕构造函数选项
*/
export declare namespace AroundView {
export type ConstructorOptions = {
/**
* 偏移角度
*/
heading: number;
/**
* 翻转角度
*/
pitch: number;
/**
* 距离
*/
range: number;
/**
* 间隔,单位:秒,当此值大于0时,callback才会生效
*/
duration: number;
/**
* 完成回调函数
*/
callback: Function;
/**
* 回调函数执行上下文
*/
context: any;
};
}
/**
* 相机环绕
* @example
* ```ts
* let aroundPoint = new BC.AroundPoint(viewer, '120.121, 31.12')
* aroundPoint.start()
* ```
*/
export declare class AroundView extends Animation_2 {
private _heading;
private _aroundAmount;
/**
* @param viewer 3D 场景
* @param options
*/
constructor(viewer: Viewer, options?: AroundView.ConstructorOptions);
/* Excluded from this release type: type */
/**
* 环绕量,控制环绕速度
*/
set aroundAmount(aroundAmount: any);
protected _bindEvent(): void;
protected _unbindEvent(): void;
/**
*
* @param scene
* @param time
* @private
*/
private _onAround;
}
/**
* 攻击箭头
* @noInheritDoc
* @example
* ```ts
* let attackArrow = new BC.AttackArrow('-90.0,32.0;-94.0,36.0;-94.0,38.0')
* ```
*/
export declare class AttackArrow extends Overlay {
/**
* @hidden
*/
private _positions;
/**
* @hidden
*/
private headHeightFactor;
/**
* @hidden
*/
private headWidthFactor;
/**
* @hidden
*/
private neckHeightFactor;
/**
* @hidden
*/
private neckWidthFactor;
/**
* @hidden
*/
private tailWidthFactor;
/**
* @hidden
*/
private headTailFactor;
/**
* @hidden
*/
private _primitive;
/**
* @param {T_Position} positions
* @return {*}
*/
constructor(positions: T_Position[]);
get type(): any;
set positions(positions: T_Position[]);
get positions(): T_Position[];
protected _updatePrimitive(): void;
_getArrowPoints(positions: any): any[];
_getArrowHeadPoints(points: any, tailLeft: any, tailRight: any): any[];
protected _getArrowBodyPoints(points: any, neckLeft: any, neckRight: any, tailWidthFactor: any): any[];
protected _getHierarchy(): Cesium.PolygonHierarchy;
_mountedHook(): void;
setLabel(text: string, textStyle: any): this;
/**
* 设置箭头风格
* 详情参考:@see {@link Polygon}
* @param style
* @returns {AttackArrow}
*/
setStyle(style: any): this;
}
declare class BaiduImageryProvider {
_url: any;
_labelStyle: any;
_tileWidth: number;
_tileHeight: number;
_maximumLevel: number;
_crs: any;
_tilingScheme: any;
_rectangle: any;
_credit: any;
_token: any;
_style: any;
_errorEvent: Cesium.Event<(...args: any[]) => void>;
constructor(options?: any);
get url(): any;
get token(): any;
get tileWidth(): number;
get tileHeight(): number;
get maximumLevel(): number;
get minimumLevel(): number;
get tilingScheme(): any;
get rectangle(): any;
get ready(): boolean;
get credit(): any;
get hasAlphaChannel(): boolean;
get errorEvent(): Cesium.Event<(...args: any[]) => void>;
getTileCredits(x: any, y: any, level: any): void;
/**
* Request Image
* @param x
* @param y
* @param level
* @returns {Promise}
*/
requestImage(x: any, y: any, level: any): Promise;
}
declare type BcCesium = typeof Cesium;
/**
* 图标
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let billboard = new BC.Billboard(position, "*.png")
* billboard.size = [20, 20]
* ```
*/
export declare class Billboard extends Overlay {
/**
* @hidden
*/
private _position;
/**
* @hidden
*/
private _icon;
/**
* @hidden
*/
private _size;
/**
*
* @param position 位置
* @param icon 图标
*/
constructor(position: T_Position, icon: Cesium.Property | string | HTMLCanvasElement);
get type(): any;
set position(position: T_Position);
/**
* 坐标位置
*/
get position(): T_Position;
set icon(icon: string | HTMLCanvasElement | Cesium.Property);
/**
* 图标
*/
get icon(): string | HTMLCanvasElement | Cesium.Property;
set size(size: number[]);
/**
* 尺寸
*/
get size(): number[];
/**
* @hidden
*/
_mountedHook(): void;
/**
*
* @param style
* @returns {Billboard}
* @example
* ```json
* // 样式参数(可选)
* {
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "scale": 1, //比例
* "pixelOffset": { "x": 0, "y": 0 }, //偏移像素
* "rotation": 0, //旋转角度
* "translucencyByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置透明度
* "scaleByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置比例
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "disableDepthTestDistance": 0 // 深度检测距离,用于防止剪切地形,设置为零时,将始终应用深度测试。设置为Number.POSITIVE_INFINITY时,永远不会应用深度测试。
* }
* ```
*/
setStyle(style: any): this;
/**
* Entity转换为Overlay
* @param entity
* @returns {Billboard}
*/
static fromEntity(entity: Cesium.Entity): Billboard | undefined;
}
/**
* 图标图元
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let billboard = new BC.BillboardPrimitive(position, '*.png')
* billboard.size = [20, 20]
* ```
*/
export declare class BillboardPrimitive extends Overlay {
protected _position: Position;
protected _icon: Cesium.Property | string | HTMLCanvasElement;
protected _size: number[];
/**
*
* @param position 坐标
* @param icon 图标
*/
constructor(position: T_Position, icon: Cesium.Property | string | HTMLCanvasElement);
get type(): any;
set position(position: T_Position);
get position(): T_Position;
set icon(icon: string | HTMLCanvasElement | Cesium.Property);
get icon(): string | HTMLCanvasElement | Cesium.Property;
set size(size: number[]);
get size(): number[];
_mountedHook(): void;
/**
*
* @param style
*/
setStyle(style: any): this;
}
/**
* 黑白效果
* @example
* ```ts
* viewer.effect.blackAndWhite.enable = true
* ```
*/
export declare class BlackAndWhite {
private _viewer;
private _delegate;
private _enable;
private _gradations;
private _selected;
private _state;
constructor();
/**
* 类型
* @ignore
*/
get type(): string;
/**
* 是否启用
*/
set enable(enable: boolean);
get enable(): boolean;
/**
* 强度
*/
set gradations(gradations: number);
get gradations(): number;
/**
* 设置后期作用的覆盖物
*/
set selected(selected: any[]);
get selected(): any[];
/**
*
*/
private _createPostProcessStage;
/**
* 添加特效
* @param viewer
* @returns {BlackAndWhite}
* @ignore
*/
addTo(viewer: Cesium.Viewer): BlackAndWhite;
}
/**
* 泛光效果
* @example
* ```ts
* viewer.effect.bloom.enable = true
* ```
*/
export declare class Bloom {
private _viewer;
private _enable;
private _contrast;
private _brightness;
private _glowOnly;
private _delta;
private _sigma;
private _stepSize;
private _selected;
private _state;
private _delegate;
constructor();
/**
* 类型
* @ignore
*/
get type(): string;
/**
* 是否启用
*/
set enable(enable: boolean);
get enable(): boolean;
/**
* 对比度
*/
set contrast(contrast: number);
get contrast(): number;
/**
* 亮度
*/
set brightness(brightness: number);
get brightness(): number;
/**
* 只发光
*/
set glowOnly(glowOnly: boolean);
get glowOnly(): boolean;
/**
* Delta
*/
set delta(delta: number);
get delta(): number;
/**
* Sigma
*/
set sigma(sigma: number);
get sigma(): number;
/**
* StepSize
*/
set stepSize(stepSize: number);
get stepSize(): number;
/**
* 设置后期作用的覆盖物
*/
set selected(selected: any[]);
get selected(): any[];
/**
*
*/
private _createPostProcessStage;
/**
* 添加效果
* @param viewer
* @returns {Bloom}
* @ignore
*/
addTo(viewer: Cesium.Viewer): Bloom;
}
/**
* 跳动图标图元
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let billboard = new BC.BounceBillboardPrimitive(position, '*.png')
* billboard.size = [20, 20]
* ```
*/
export declare class BounceBillboardPrimitive extends BillboardPrimitive {
private _currentOffset;
private _isUp;
/**
*
* @param position 坐标
* @param icon 图标
*/
constructor(position: T_Position, icon: Cesium.Property | string | HTMLCanvasElement);
get type(): any;
/**
*
* @param frameState
*/
update(frameState: any): void;
destroy(): void;
}
/**
* 跳动注记图元
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let label = new BC.BounceLabelPrimitive(position, 'test')
* ```
*/
export declare class BounceLabelPrimitive extends LabelPrimitive {
protected _currentOffset: Cesium.Cartesian2;
protected _isUp: boolean;
protected _state: string;
protected _show: boolean;
protected _style: any;
protected _delegate: any;
/**
*
* @param position 坐标
* @param text 文本
*/
constructor(position: T_Position, text: string);
get type(): any;
/**
*
* @param frameState
*/
update(frameState: any): void;
destroy(): void;
}
/**
* 盒子
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let box = new BC.Box(position, 20, 30, 40)
* ```
*/
export declare class Box extends Overlay {
/**
* @hidden
*/
private _position;
/**
* @hidden
*/
private _length;
/**
* @hidden
*/
private _width;
/**
* @hidden
*/
private _height;
/**
*
* @param position 位置
* @param length 长度
* @param width 宽度
* @param height 高度
*/
constructor(position: T_Position, length: number, width: number, height: number);
get type(): any;
set position(position: T_Position);
/**
* 位置
*/
get position(): T_Position;
set length(length: number);
get length(): number;
set width(width: number);
get width(): number;
set height(height: number);
get height(): number;
/**
* @hidden
*/
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {Box}
* @example
* ```json
* // 样式参数(可选)
* {
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "fill": true, //是否用提供的材料填充多边形。
* "material": BC.Color.WHITE, //材质
* "outline": false, //是否显示边框
* "outlineColor": BC.Color.BLACK, //边框颜色
* "outlineWidth": 0, //边框宽度
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* } //根据距离设置可见
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 明亮效果
* @example
* ```ts
* viewer.effect.brightness.enable = true
* ```
*/
export declare class Brightness {
private _viewer;
private _delegate;
private _enable;
private _intensity;
private _selected;
private _state;
constructor();
/**
* 类型
* @ignore
*/
get type(): string;
/**
* 设置类型
*/
set enable(enable: boolean);
/**
* 强度
*/
get enable(): boolean;
/**
* 设置强度
*/
set intensity(intensity: number);
/**
* 强度
*/
get intensity(): number;
/**
* 设置后期作用的覆盖物
*/
set selected(selected: any[]);
get selected(): any[];
/**
*
*/
private _createPostProcessStage;
/**
* 添加效果
* @param viewer
* @returns {Brightness}
* @ignore
*/
addTo(viewer: Cesium.Viewer): Brightness;
}
export declare const CallbackProperty: typeof globalThis.Cesium.CallbackProperty;
export declare const Cartesian2: typeof globalThis.Cesium.Cartesian2;
export declare const Cartesian3: typeof globalThis.Cesium.Cartesian3;
declare const Cesium_2: BcCesium;
/**
* 圆
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let circle = new BC.Circle(position, 200)
* ```
*/
export declare class Circle extends Overlay {
private _center;
private _radius;
private _rotateAmount;
private _stRotation;
/**
*
* @param center 中心点位置
* @param radius 半径
*/
constructor(center: T_Position, radius: number);
get type(): any;
set center(center: T_Position);
get center(): T_Position;
set radius(radius: number);
get radius(): number;
set rotateAmount(amount: number);
get rotateAmount(): number;
private _computeHierarchy;
_mountedHook(): void;
/**
* Sets Text with Style
* @param text
* @param textStyle
* @returns {Circle}
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @returns {Circle}
* @example
* ```json
* // 样式参数(可选)
* {
* "height": 1, //高度
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "extrudedHeight": 0, //拉升高度
* "rotation": 0, //顺时针旋转角度
* "stRotation": 0, //逆时针旋转角度
* "fill": true, //是否用提供的材料填充多边形。
* "material": BC.Color.WHITE, //材质
* "outline": false, //是否显示边框
* "outlineColor": BC.Color.BLACK, //边框颜色
* "outlineWidth": 0, //边框宽度
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* "zIndex": 0 //层级
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 模糊圆材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.CircleBlurMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class CircleBlurMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 扩散圆材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.CircleDiffuseMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class CircleDiffuseMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 逐渐消逝圆材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.CircleFadeMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class CircleFadeMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 脉冲圆材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.CirclePulseMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class CirclePulseMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 扫描圈
* @example
* ```ts
* let circleScan = new BC.CircleScan(viewer, '120, 20', 200)
* circleScan.start()
* ```
*/
export declare class CircleScan extends Animation_2 {
private _delegate;
private _position;
private _radius;
private _color;
private _speed;
/**
*
* @param viewer 3D场景
* @param position 位置
* @param radius 半径
* @param options 属性
*/
constructor(viewer: Viewer, position: Position | string | string[] | number[], radius: number, options?: {
/**颜色 */
color: Cesium.Color;
/**速度 */
speed: number;
});
/* Excluded from this release type: type */
private _mountContent;
/**
* 开始
* @returns
*/
start(): this;
/**
* 结束
*/
stop(): this;
protected _bindEvent(): void;
protected _unbindEvent(): void;
}
/**
* 扫描圆材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.CircleScanMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class CircleScanMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 螺旋圆材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.CircleSpiralMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class CircleSpiralMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 多彩圆材质
* @example
* @noInheritDoc
* ```ts
* let material = new BC.CircleVaryMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class CircleVaryMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 波纹圆材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.CircleWaveMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class CircleWaveMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* 数量
*/
count: number;
/**
* 强度
*/
gradient: number;
/**
*
* @param options 属性
*/
constructor(options?: {
/**颜色 */
color: Cesium.Color;
/** 速度*/
speed?: number;
/**数量 */
count?: number;
/**强度 */
gradient?: number;
});
/* Excluded from this release type: isConstant */
/* Excluded from this release type: definitionChanged */
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
export declare const ClassificationType: typeof globalThis.Cesium.ClassificationType;
export declare class ClippingTerrain {
_viewer: any;
_clippingPlanes: Cesium.ClippingPlaneCollection;
constructor();
get viewer(): any;
get clippingPlanes(): Cesium.ClippingPlaneCollection;
clipTerrain(positions: T_Position[], ishole?: boolean): void;
createPlane(p1: Cesium.Cartesian3, p2: Cesium.Cartesian3): Cesium.ClippingPlane;
isClockWise(latLngArr: any): boolean;
/**
*
* @param viewer
*/
install(viewer: any): void;
clear(): void;
destroy(): void;
uninstall(viewer: any): void;
}
export declare class ClippingTileset {
_viewer: Viewer;
_clippingPlanes: Cesium.ClippingPlaneCollection;
constructor();
get viewer(): Viewer;
get clippingPlanes(): Cesium.ClippingPlaneCollection;
clipTileset(tileset: Cesium.Cesium3DTileset, positions: T_Position[], ishole?: boolean): void;
createPlane(p1: Position, p2: Position, inverseTransform: Cesium.Matrix4, ishole: boolean): Cesium.ClippingPlane;
isClockWise(latLngArr: any): boolean;
/**
*
* @param viewer
*/
install(viewer: Viewer): void;
clear(): void;
destroy(): void;
uninstall(viewer: any): void;
}
/**
* 云效果
* @example
* ```ts
* viewer.weather.cloud.enable = true
* viewer.weather.cloud.rotateAmount = 0.02
* ```
*/
export declare class Cloud {
private _id;
private _viewer;
private _delegate;
private _rotateAmount;
private _enable;
private _heading;
private _state;
constructor();
/**
* 类型
*/
get type(): string;
/**
* 是否启用
*/
set enable(enable: boolean);
get enable(): boolean;
/**
* 移动增量,可为负数
*/
set rotateAmount(rotateAmount: number);
get rotateAmount(): number;
/**
*
* @param scene
* @param time
*/
private _onRotate;
/**
*
* @private
*/
private _createPrimitive;
/* Excluded from this release type: addTo */
}
/**
* 云图元
* @noInheritDoc
*/
export declare class CloudPrimitive extends Overlay {
private _position;
/**
*
* @param position 坐标
*/
constructor(position: T_Position);
get type(): any;
set position(position: T_Position);
get position(): T_Position;
_mountedHook(): void;
/**
*
* @param style
*/
setStyle(style: any): this;
}
/**
* 聚合图层
* @noInheritDoc
* @example
* ```ts
* let layer = new BC.ClusterLayer('id')
* viewer.addLayer(layer)
* ```
*/
export declare class ClusterLayer extends Layer {
_cache: any;
private _options;
protected _delegate: Cesium.CustomDataSource;
/**
* @param id ID
* @param options 聚合图层选项
* @example
* ```ts
* // 属性参数(可选)
{
"size": 48, //聚合的尺寸
"pixelRange": 40, //像素范围
"gradient": {
"0.0001": BC.Color.DEEPSKYBLUE,
"0.001": BC.Color.GREEN,
"0.01": BC.Color.ORANGE,
"0.1": BC.Color.RED
}, // 幅度颜色设置
"style": "circle", // circle 和 clustering
"fontSize": 12, // 字体大小
"fontColor": BC.Color.BLACK // 字体颜色
}
* ```
*/
constructor(id: string, options?: ClusterLayerOptions);
/**
* 项目类型
*/
get type(): string;
/**
* 是否聚合
*/
set enableCluster(enableCluster: boolean);
/**
* 绘制圆
* @param color 颜色
* @param numLength
* @returns {*}
* @private
*/
private _drawCircle;
/**
* 绘制聚合
* @param color
* @param numLength
* @returns {*}
*/
private _drawClustering;
/**
* 聚合事件句柄
* @param {*} clusteredEntities
* @param {*} cluster
*/
private _clusterEventHandler;
/**
* 清空聚合图层
*/
clear(): this;
setStyle(style: any): void;
}
declare interface ClusterLayerOptions {
size: number;
pixelRange: number;
gradient: {
0.0001: any;
0.001: any;
0.01: any;
0.1: any;
};
fontSize: number;
fontColor: Cesium.Color;
style: string;
}
export declare const Color: typeof globalThis.Cesium.Color;
export declare const ColorMaterialProperty: typeof globalThis.Cesium.ColorMaterialProperty;
/**
* 指北针
* @noInheritDoc
* @example
* ```ts
* viewer.compass.enable = true/false
* ```
*/
declare class Compass extends Widget {
protected _wrapper: any;
private _compassRectangle;
private _outRing;
private _gyro;
private _rotation_marker;
private _orbitCursorAngle;
private _orbitCursorOpacity;
private _orbitLastTimestamp;
private _orbitFrame;
private _orbitIsLook;
private _rotateInitialCursorAngle;
private _rotateFrame;
private _mouseMoveHandle;
private _mouseUpHandle;
/**
* 状态
*/
_state: string;
protected _ready: boolean;
private _rotateInitialCameraAngle;
/**
* @hidden
*/
constructor();
/**
* @hidden
*/
get type(): any;
/**
* @hidden
*/
protected _installHook(): void;
/**
* @hidden
*/
protected _bindEvent(): void;
/**
* @hidden
*/
protected _unbindEvent(): void;
/**
* @hidden
*/
private _postRenderHandler;
/**
* @hidden
*/
protected _mountContent(): void;
/**
* @hidden
*/
private _handleMouseDown;
/**
* @hidden
*/
private _handleDoubleClick;
/**
* @hidden
*/
private _getCameraFocus;
/**
* @hidden
*/
private _orbit;
/**
* @hidden
*/
private _orbitTickFunction;
/**
* @hidden
*/
private _updateAngleAndOpacity;
/**
* @hidden
*/
private _orbitMouseMoveFunction;
/**
* @hidden
*/
private _orbitMouseUpFunction;
/**
* @hidden
*/
private _rotate;
/**
* @hidden
*/
private _rotateMouseMoveFunction;
/**
* @hidden
*/
private _rotateMouseUpFunction;
/**
* @hidden
*/
private _getVector;
}
declare const ConstructorOptions: {
/**最大可见距离 */
maxVisibleDistance: number;
/**最小可见距离 */
minVisibleDistance: number;
/**高度偏移 */
heightOffset: number;
};
/**
* 右击菜单
* @noInheritDoc
* @example
* ```ts
* let contextMenu = viewer.contextMenu
* contextMenu.enable = true
* contextMenu.DEFAULT_MENU = [
* {
* label: '测试',
* callback: (e) => {}, // e是一个对象主要包括 windowPosition,position,surfacePosition,overlay
* context: this,
* },
* ] // 设置默认的右击菜单,会影响全局右击菜单(慎用)。
* ```
*/
declare class ContextMenu extends Widget {
private _ulEl;
private _handler;
private _overlay;
private _position;
private _wgs84Position;
private _surfacePosition;
private _wgs84SurfacePosition;
private _windowPosition;
private _instanceId;
private _config;
private _defaultMenu;
private _overlayMenu;
/**
* @hidden
*/
constructor();
/**
* @hidden
*/
get type(): any;
/**
* @hidden
*/
set DEFAULT_MENU(menus: any);
set config(config: any);
/**
*
* @private
*/
_installHook(): void;
/**
*
* @private
*/
_bindEvent(): void;
/**
*
* @private
*/
_unbindEvent(): void;
/**
*
* @private
*/
_mountContent(): void;
/**
*
* @private
*/
_mountMenu(): void;
/**
*
* @param movement
* @private
*/
_onRightClick(movement: Cesium.ScreenSpaceEventHandler.PositionedEvent): void;
/**
*
* @param movement
* @private
*/
_onClick(movement: Cesium.ScreenSpaceEventHandler.PositionedEvent): void;
/**
*
* @param windowCoord
* @private
*/
_updateWindowCoord(windowCoord: {
x: number;
y: number;
}): void;
/**
*
* @private
*/
_setCustomClass(): void;
/**
*
* @param label
* @param method
* @param context
* @returns {ContextMenu}
* @private
*/
_addMenuItem(label: any, method: any, context: any): this;
}
export declare class ContourLine {
_viewer: Viewer;
options: any;
constructor();
get viewer(): Viewer;
addContourLine(options: any): void;
removeContourLine(): void;
destroy(): void;
/**
*
* @param viewer
*/
install(viewer: Viewer): void;
uninstall(viewer: any): void;
}
export declare class CoordTransform {
/**
* BD-09 To GCJ-02
* @param lng
* @param lat
* @returns {number[]}
*/
static BD09ToGCJ02(lng: any, lat: any): number[];
/**
* GCJ-02 To BD-09
* @param lng
* @param lat
* @returns {number[]}
* @constructor
*/
static GCJ02ToBD09(lng: any, lat: any): number[];
/**
* WGS-84 To GCJ-02
* @param lng
* @param lat
* @returns {number[]}
*/
static WGS84ToGCJ02(lng: any, lat: any): any[];
/**
* GCJ-02 To WGS-84
* @param lng
* @param lat
* @returns {number[]}
* @constructor
*/
static GCJ02ToWGS84(lng: any, lat: any): any[];
/**
*
* @param lng
* @param lat
* @returns {number[]}
*/
static delta(lng: any, lat: any): any[];
/**
*
* @param lng
* @param lat
* @returns {number}
*/
static transformLng(lng: any, lat: any): any;
/**
*
* @param lng
* @param lat
* @returns {number}
*/
static transformLat(lng: any, lat: any): number;
/**
*
* @param lng
* @param lat
* @returns {boolean}
*/
static out_of_china(lng: any, lat: any): boolean;
}
/**
* 走廊
* @noInheritDoc
* @example
* ```ts
* let corridor = new BC.Corridor('120,20;120,30')
* corridor.setStyle({
* width: 10,
* })
* ```
*/
export declare class Corridor extends Overlay {
private _positions;
/**
*
* @param positions 坐标串
*/
constructor(positions: string | T_Position[]);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
_mountedHook(): void;
/**
*
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @returns {Corridor}
* @example
* ```json
* // 样式参数(可选)
* {
* "width": 1, //线宽
* "height": 0, //高度
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "cornerType": 0, //转角类别,0:圆角、1:直角、2:斜角
* "fill": true, //是否用提供的材料填充多边形。
* "material": BC.Color.WHITE, //材质
* "outline": false, //是否显示边框
* "outlineColor": BC.Color.BLACK, //边框颜色
* "outlineWidth": 0, //边框宽度
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* "zIndex": 0 //层级
* }
* ```
*/
setStyle(style: any): this;
/**
* Entity 转换为 Overlay
* @param entity
* @returns {Corridor}
*/
static fromEntity(entity: Cesium.Entity): Corridor | undefined;
}
/**
* 自定义图标
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let billboard = new BC.CustomBillboard(position, '*.png')
* billboard.size = [20, 20]
* ```
*/
export declare class CustomBillboard extends Overlay {
_position: Position;
_icon: any;
_size: number[];
constructor(position: T_Position, icon: any);
get type(): any;
set position(position: Position);
get position(): Position;
set icon(icon: any);
get icon(): any;
set size(size: number[]);
get size(): number[];
_mountedHook(): void;
/**
* Sets label
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
*/
setStyle(style: any): this;
/**
* Sets VLine style
* @param style
*/
setVLine(style?: any): this;
/**
* @param {*} radius
* @param {*} style
* @param {*} rotateAmount
*/
setBottomCircle(radius: number, style?: {}, rotateAmount?: number): this;
}
/**
* 自定义注记
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let label = new BC.CustomLabel(position, 'test')
* ```
*/
export declare class CustomLabel extends Overlay {
_position: Position;
_text: string;
constructor(position: T_Position, text: any);
get type(): any;
set position(position: T_Position);
get position(): T_Position;
set text(text: string);
get text(): string;
_mountedHook(): void;
/**
*
* @param style
* @example
* ```json
*
* ```
*/
setStyle(style: any): this;
/**
* Sets VLine style
* @param style
*/
setVLine(style?: any): this;
/**
* Sets bottom circle
* @param radius
* @param style
* @param rotateAmount
*/
setBottomCircle(radius: number, style?: {}, rotateAmount?: number): this;
}
export declare class CustomPrimitive extends Overlay {
/**
*
* @param positions 坐标串
* @param holes 空心坐标串
*/
constructor(options: any);
get type(): any;
_mountedHook(): void;
setStyle(style: any): this;
}
export declare const CustomShader: typeof globalThis.Cesium.CustomShader;
export declare const CustomShaderMode: typeof globalThis.Cesium.CustomShaderMode;
export declare const CustomShaderTranslucencyMode: typeof globalThis.Cesium.CustomShaderTranslucencyMode;
export declare class CutFill {
_viewer: Viewer;
_db: Cesium.CustomDataSource;
totalFillVolume: number;
totalCutVolume: number;
constructor();
get viewer(): Viewer;
get db(): Cesium.CustomDataSource;
/**
* 计算多边形的重心点, 用于展示label标签
* @param {*} positions
*/
computeCentroidOfPolygon(positions: any): Cesium.Cartographic;
/**
* 计算方量
* @param {*} positions 点串
* @param {*} cutAndFillBaseHeight 填挖高度
* @param {*} precision 精度,默认64
*/
computeCutVolume(positions: Position[], cutAndFillHeight?: number, precision?: number): number | false;
/**
* 计算三角形的面积
* @param {*} pos1
* @param {*} pos2
* @param {*} pos3
*/
computeAreaOfTriangle(pos1: any, pos2: any, pos3: any): number;
clear(): void;
destroy(): void;
/**
*
* @param viewer
*/
install(viewer: Viewer): void;
uninstall(viewer: any): void;
}
/**
* 圆柱
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let cylinder = new BC.Cylinder(position, 20, 30, 40)
* ```
*/
export declare class Cylinder extends Overlay {
private _position;
private _length;
private _topRadius;
private _bottomRadius;
/**
*
* @param position 位置
* @param length 长度
* @param topRadius 上半径
* @param bottomRadius 下半径
*/
constructor(position: T_Position, length: number, topRadius: number, bottomRadius: number);
get type(): any;
set position(position: T_Position);
get position(): T_Position;
set length(length: number);
get length(): number;
set topRadius(topRadius: number);
get topRadius(): number;
set bottomRadius(bottomRadius: number);
get bottomRadius(): number;
_mountedHook(): void;
/**
*
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @returns {Cylinder}
* @example
* ```json
* // 样式参数(可选)
* {
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "fill": true, //是否用提供的材料填充多边形。
* "material": BC.Color.WHITE, //材质
* "outline": false, //是否显示边框
* "outlineColor": BC.Color.BLACK, //边框颜色
* "outlineWidth": 0, //边框宽度
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* } //根据距离设置可见
* }
* ```
*/
setStyle(style: any): this;
}
/**
* Czml 图层,用于加载 Czml 数据
* @noInheritDoc
* @example
* ```js
* let layer = new BC.CzmlLayer('id', '**\/**.czml')
* layer.eachOverlay((item) => {
* if (item.polyline) {
* //todo
* }
* if (item.polygon) {
* //todo
* }
* if (item.billboard) {
* //todo
* }
* })
* ```
*/
export declare class CzmlLayer extends Layer {
protected _delegate: Promise;
/**
* @param id 图层唯一标识
* @param url 数据地址
* @param options 属性配置
*/
constructor(id: string, url?: string, options?: {});
/**
* 类型
*/
get type(): string;
/**
* 是否显示
*/
set show(show: boolean);
get show(): boolean;
/**
* 遍历覆盖物
* @param method 回调方法
* @param context
* @returns {CzmlLayer}
*/
eachOverlay(method: {
(item: {
attr: {
[x: string]: any;
};
}): void;
call?: any;
}, context: this): this;
setStyle(style: any): void;
clear(): void;
}
declare const DEF_OPTS: {
clampToGround: boolean;
clampToTileset: boolean;
interpolationType: string;
interpolationDegree: number;
endDelayTime: number;
headingOffset: number;
};
/**
* 景深效果
* @example
* ```ts
* viewer.effect.depthOfField.enable = true
* ```
*/
export declare class DepthOfField {
private _viewer;
private _delegate;
private _enable;
private _focalDistance;
private _delta;
private _sigma;
private _stepSize;
private _selected;
private _state;
constructor();
/**
* 类型
* @ignore
*/
get type(): string;
/**
* 是否启用
*/
set enable(enable: boolean);
get enable(): boolean;
/**
* 焦距
*/
set focalDistance(focalDistance: number);
get focalDistance(): number;
/**
* Delta
*/
set delta(delta: number);
get delta(): number;
/**
* Sigma
*/
set sigma(sigma: number);
get sigma(): number;
/**
* StepSize
*/
set stepSize(stepSize: number);
get stepSize(): number;
/**
* 设置后期作用的覆盖物
*/
set selected(selected: any[]);
get selected(): any[];
/**
*
* @private
*/
private _createPostProcessStage;
/**
* 添加效果
* @param viewer
* @returns {DepthOfField}
* @ignore
*/
addTo(viewer: Cesium.Viewer): DepthOfField;
}
/**
* 扩散墙图元
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let wall = new BC.DiffuseWallPrimitive(position, 2000, 1000)
* ```
*/
export declare class DiffuseWallPrimitive extends Overlay {
private _center;
private _height;
private _radius;
private _currentHeight;
private _currentRadius;
/**
*
* @param center 坐标
* @param radius 半径
* @param height 高度
*/
constructor(center: T_Position, radius: number, height: number);
get type(): any;
set center(position: T_Position);
get center(): T_Position;
set radius(radius: number);
get radius(): number;
set height(height: number);
get height(): number;
/**
*
* @private
*/
private _getPositions;
/**
*
* @param length
* @param hegiht
* @private
*/
private _getHeights;
/**
*
* @param frameState
*/
update(frameState: any): boolean;
/**
* 设置风格
* @param style
* @example
* ```json
* // 样式参数(可选)
* {
* "minRadius": 10, // 动画最小半径
* "minHeight": 30, // 动画最小高度
* "color": BC.Color.RED, // 墙体颜色
* "slices": 128, //边数
* "speed": 10 //速度
* }
* ```
*/
setStyle(style: any): this;
destroy(): void;
}
/**
* 比例尺
* @noInheritDoc
* @example
* ```ts
* viewer.distanceLegend.enable = true
* ```
*/
declare class DistanceLegend extends Widget {
private _labelEl;
private _scaleBarEl;
private _lastUpdate;
/**
* @hidden
*/
constructor();
/**
* @hidden
*/
get type(): any;
/**
*
* @private
*/
_installHook(): void;
/**
*
* @private
*/
_bindEvent(): void;
/**
*
* @private
*/
_unbindEvent(): void;
/**
*
* @param scene
* @param time
* @returns
* @private
*/
_updateContent(scene: any, time: any): void;
/**
*
* @private
*/
_mountContent(): void;
}
/**
* DivIcon
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let divIcon = new BC.DivIcon(position, '')
* ```
*/
export declare class DivIcon extends Overlay {
private _position;
/**
*
* @param position 坐标
* @param content 内容
*/
constructor(position: T_Position, content: any);
get type(): any;
set show(show: boolean);
get show(): boolean;
set position(position: T_Position);
get position(): T_Position;
set content(content: any);
get content(): any;
/**
* Updates style
* @param windowCoord
* @param distance
* @param isFront
* @private
*/
_updateStyle(windowCoord: any, distance: any, isFront: any): void;
/**
*
* @param layer
* @private
*/
_onAdd(layer: Layer): void;
/**
*
* @private
*/
_onRemove(): void;
/**
* Sets text
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @example
* ```json
* // 样式参数(可选)
* {
* "className": "test", //样式名
* "scaleByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置比例
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* } //根据距离设置可见
* }
* ```
*/
setStyle(style: any): this;
/**
* entity转换为overlay
* @param entity
* @param content
*/
static fromEntity(entity: Cesium.Entity, content: any): any;
}
/**
* DOM工具类
*/
export declare class DomUtil {
/**
* 根据id获取dom
* @param id 要素 ID
* @returns
*/
static get(id: string): HTMLElement | any;
/**
* 返回元素上指定样式属性的值,包括计算值或通过CSS设置的值
* @param el DOM元素
* @param style 样式名称
* @returns {null|*}
*/
static getStyle(el: HTMLElement, style: string): null | any;
/**
* 创建 dom
* @param tagName 标签名
* @param className 样式名,多个用空格隔开
* @param container 父容器
* @returns {HTMLElement}
*/
static create(tagName: string, className: string, container?: HTMLElement | string): HTMLElement;
/**
* 移除元素
* @param el 被移除的要素
*/
static remove(el: Element): void;
/**
* 移除元素的所有子元素
* @param el 元素
*/
static empty(el: Element): void;
/**
* 判断元素是否具有指定的类
* @param el DOM元素
* @param name 类名
*/
static hasClass(el: Element, name: string): boolean;
/**
* 添加类
* @param el DOM元素
* @param name 类名
*/
static addClass(el: Element, name: string): void;
/**
* 删除元素指定的类
* @param el DOM元素
* @param name 类名
*/
static removeClass(el: Element, name: string): void;
/**
* 设置元素的类
* @param el DOM元素
* @param name
*/
static setClass(el: Element, name: string): void;
/**
* 返回元素的类
* @param el
*/
static getClass(el: Element): any;
/**
* 创建SVG
* @param width 宽度
* @param height 高度
* @param path 路径
* @param container 父容器
* @returns
*/
static createSvg(width: string, height: string, path: string, container: Element): SVGElement;
/**
* 字符串转 Dom
* @param domStr dom 字符串
* @param withWrapper 返回是否含有父容器
* @param className 类样式名称
* @returns {HTMLDivElement|NodeListOf}
*/
static parseDom(domStr: string, withWrapper: boolean, className: string): HTMLDivElement | NodeListOf;
/**
* 进入全屏
* @param el 要素
*/
static enterFullscreen(el: Element): void;
/**
* 退出全屏
*/
static exitFullscreen(): void;
/**
* 创建视频节点
* @param url 视频地址
* @param className 样式名,多个用空格隔开
* @param container 父容器
* @returns {HTMLElement}
*/
static createVideo(url: string, className: string, container?: HTMLElement): HTMLElement;
}
/**
* 双箭头
* @noInheritDoc
* @example
* ```ts
* let doubleArrow = new BC.DoubleArrow('-90.0,32.0;-94.0,36.0;-94.0,38.0')
* ```
*/
export declare class DoubleArrow extends Overlay {
/**
* @hidden
*/
private _positions;
/**
* @hidden
*/
private headHeightFactor;
/**
* @hidden
*/
private headWidthFactor;
/**
* @hidden
*/
private neckHeightFactor;
/**
* @hidden
*/
private neckWidthFactor;
/**
* @hidden
*/
private _primitive;
/**
* @param {T_Position} positions
* @return {*}
*/
constructor(positions: T_Position[]);
get type(): any;
set positions(positions: T_Position[]);
get positions(): T_Position[];
protected _updatePrimitive(): void;
_getArrowPoints(pnt1: any, pnt2: any, pnt3: any, clockWise: any): any[];
_getArrowHeadPoints(points: any): any[];
protected _getArrowBodyPoints(points: any, neckLeft: any, neckRight: any, tailWidthFactor: any): any[];
_getTempPoint4(linePnt1: any, linePnt2: any, point: any): any;
protected _getHierarchy(): Cesium.PolygonHierarchy;
_mountedHook(): void;
setLabel(text: string, textStyle: any): this;
/**
* 设置箭头风格
* 详情参考:@see {@link Polygon}
* @param style
* @returns {DoubleArrow}
*/
setStyle(style: any): this;
}
/**
* 动态图标
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let billboard = new BC.DynamicBillboard(position, '*.png')
* billboard.size = [20, 20]
* ```
*/
export declare class DynamicBillboard extends DynamicOverlay {
_posistion: Position;
_icon: any;
_state: string;
_size: any[];
constructor(position: T_Position, icon: any);
get type(): any;
set icon(icon: any);
get icon(): any;
set size(size: any[]);
get size(): any[];
_mountedHook(): void;
/**
*
* @param style
* @returns {DynamicBillboard}
*/
setStyle(style: {
[x: string]: any;
}): this;
}
/**
* 动态图层,用于添加各类动态矢量数据(图标、模型等),将矢量数据按一定的逻辑分组,方便统一管理。
* @noInheritDoc
* @example
* ```ts
* let layer = new BC.DynamicLayer('id');
* viewer.addLayer(layer);
* ```
*/
export declare class DynamicLayer extends Layer {
/**
* @param id 图层唯一标识
*/
constructor(id: string);
/**
* 类型
*/
get type(): string;
/**
* 清除所有实体
* @returns {DynamicLayer}
*/
clear(): DynamicLayer;
setStyle(style: any): void;
}
/**
* 动态模型
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let model = new BC.DynamicModel(position, '*.glb')
* ```
*/
export declare class DynamicModel extends DynamicOverlay {
_posistion: Position;
_modelUrl: string;
_state: string;
constructor(position: T_Position, modelUrl: string);
get type(): any;
set modelUrl(modelUrl: string);
get modelUrl(): string;
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {DynamicModel}
*/
setStyle(style: any): this;
}
declare class DynamicOverlay extends Overlay {
_startTime: Cesium.JulianDate | undefined;
_lastTime: Cesium.JulianDate | undefined;
_sampledPosition: Cesium.SampledPositionProperty;
_cache: Cesium.JulianDate[];
_maxCacheSize: number;
constructor();
set maxCacheSize(maxCacheSize: number);
get maxCacheSize(): number;
get position(): Position;
/**
*
* @private
*/
_removePosition(): void;
/**
*
* @param position
* @param interval
*/
addPosition(position: T_Position, interval: number): this;
/**
*
* @param content
*/
bindDom(content: any): this;
}
/**
* 效果类
* @example
* ```ts
* let effect = new BC.Effect();
* viewer.use(effect);
* ```
*/
export declare class Effect {
private _comps;
/**
* 构造函数
*/
constructor();
/**
* 黑白效果
*/
get blackAndWhite(): BlackAndWhite;
/**
* 泛光效果
*/
get bloom(): Bloom;
/**
* 明亮效果
*/
get brightness(): Brightness;
/**
* 景深效果
*/
get depthOfField(): DepthOfField;
/**
* 镜头耀斑效果
*/
get lensFlare(): LensFlare;
/**
* 夜视效果
*/
get night(): NightVision;
/**
* 描边效果
*/
get silhouette(): Silhouette;
/**
* 注册效果
* @param viewer
* @ignore
*/
install(viewer: Cesium.Viewer): void;
}
/**
* 电弧球图元
* @noInheritDoc
* @example
* ```ts
* let elecEllipsoid = new BC.ElecEllipsoidPrimitive('120,20',{x:2000,y:2000:z:2000})
* ```
*/
export declare class ElecEllipsoidPrimitive extends Overlay {
private _position;
private _radius;
/**
*
* @param position 坐标
* @param radius x、y、z半径
*/
constructor(position: T_Position, radius: {
x: number;
y: number;
z: number;
});
get type(): any;
set position(position: T_Position);
get position(): T_Position;
set radius(radius: {
x: number;
y: number;
z: number;
});
get radius(): {
x: number;
y: number;
z: number;
};
/**
*
* @private
*/
_setAppearance(): void;
_mountedHook(): void;
/**
*
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @example
* ```json
* // 样式参数(可选)
* {
* "speed": 5, //速度
* "color": BC.Color.WHITE //颜色
* }
* ```
*/
setStyle(style?: {}): this;
}
/**
* 椭圆
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let ellipse = new BC.Ellipse(position, 20, 30)
* ```
*/
export declare class Ellipse extends Overlay {
private _position;
private _semiMajorAxis;
private _semiMinorAxis;
/**
*
* @param position 位置
* @param semiMajorAxis 长半轴
* @param semiMinorAxis 短半轴
*/
constructor(position: T_Position, semiMajorAxis: number, semiMinorAxis: number);
get type(): any;
set position(position: T_Position);
get position(): T_Position;
set semiMajorAxis(semiMajorAxis: number);
get semiMajorAxis(): number;
set semiMinorAxis(semiMinorAxis: number);
get semiMinorAxis(): number;
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {Ellipse}
* @example
* ```json
* // 样式参数(可选)
* {
* "height": 1, //高度
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "extrudedHeight": 0, //拉升高度
* "rotation": 0, //顺时针旋转角度
* "stRotation": 0, //逆时针旋转角度
* "fill": true, //是否用提供的材料填充多边形。
* "material": BC.Color.WHITE, //材质
* "outline": false, //是否显示边框
* "outlineColor": BC.Color.BLACK, //边框颜色
* "outlineWidth": 0, //边框宽度
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* "zIndex": 0 //层级
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 球体
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let ellipsoid = new BC.Ellipsoid(position, { x: 30, y: 30, z: 30 })
* ```
*/
export declare class Ellipsoid extends Overlay {
private _position;
private _radius;
/**
*
* @param position 位置
* @param radius x、y、z半径
*/
constructor(position: T_Position, radius: {
x: number;
y: number;
z: number;
});
get type(): any;
set position(position: T_Position);
get position(): T_Position;
set radius(radius: {
x: number;
y: number;
z: number;
});
get radius(): {
x: number;
y: number;
z: number;
};
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {Ellipsoid}
* @example
* ```json
* // 样式参数(可选)
* {
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "fill": true, //是否用提供的材料填充多边形。
* "material": BC.Color.WHITE, //材质
* "outline": false, //是否显示边框
* "outlineColor": BC.Color.BLACK, //边框颜色
* "outlineWidth": 0, //边框宽度
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* } //根据距离设置可见
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 电弧球材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.EllipsoidElectricMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class EllipsoidElectricMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 轨迹球材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.EllipsoidTrailMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class EllipsoidTrailMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
declare class Event_2 {
_cache: {};
constructor();
/**
* Event registration
* Subclasses need to override
* @protected
*/
protected _registerEvent(): void;
/**
* @param type
* @param callback
* @param context
* @returns {any}
* @private
*/
_on(type: any, callback: (e: any) => void, context: any): any;
/**
* @param type
* @param callback
* @param context
* @returns {boolean}
* @private
*/
_off(type: any, callback: any, context: any): boolean;
/**
* @param type
* @param params
* @private
*/
_fire(type: any, params: any): void;
/**
* Subscribe event
* @param type
* @param callback
* @param context
* @returns remove callback function
*/
on(type: any, callback: any, context: any): any;
/**
* Subscribe once event
* @param type
* @param callback
* @param context
*/
once(type: any, callback: (arg0: any) => void, context: any): void;
/**
* Unsubscribe event
* @param type
* @param callback
* @param context
* @returns Boolean
*/
off(type: any, callback: any, context: any): boolean;
/**
* Trigger subscription event
* @param type
* @param params
*/
fire(type: any, params: any): void;
/**
* Returns events by type
* @param type
* @returns Event
*/
getEvent(type: string | number): any;
}
/**
*
*/
export declare class FeatureGridLayer extends Layer {
private _url;
private _options;
private _levelLayers;
private _tileWidth;
private _tileHeight;
private _maximumLevel;
private _tilingScheme;
private _rectangle;
private _credit;
private _token;
private _imageryLayer;
private _imagery;
constructor(id: any, url: any, options?: {});
get type(): string;
get url(): any;
set show(show: boolean);
get show(): boolean;
get token(): any;
get tileWidth(): number;
get tileHeight(): number;
get maximumLevel(): any;
get minimumLevel(): number;
get tilingScheme(): any;
get rectangle(): any;
get ready(): boolean;
get credit(): any;
get hasAlphaChannel(): boolean;
/**
*
* @param {*} viewer
* @returns
*/
_onAdd(viewer: any): void;
_onRemove(): void;
getTileCredits(x: any, y: any, level: any): void;
/**
*
* @param {*} x
* @param {*} y
* @param {*} level
* @param {*} request
* @returns
*/
requestImage(x: any, y: any, level: any, request: any): HTMLCanvasElement;
/**
*
*/
clear(): void;
setStyle(style: any): void;
}
/**
* 细箭头
* @noInheritDoc
* @example
* ```ts
* let fineArrow = new BC.FineArrow('-90.0,32.0;-94.0,36.0;-94.0,38.0')
* ```
*/
export declare class FineArrow extends Overlay {
/**
* @hidden
*/
private _positions;
/**
* @hidden
*/
private headHeightFactor;
/**
* @hidden
*/
private headWidthFactor;
/**
* @hidden
*/
private neckHeightFactor;
/**
* @hidden
*/
private neckWidthFactor;
/**
* @hidden
*/
private tailWidthFactor;
/**
* @hidden
*/
private headAngle;
/**
* @hidden
*/
private neckAngle;
/**
* @hidden
*/
private _primitive;
/**
* @param {T_Position} positions
* @return {*}
*/
constructor(positions: T_Position[]);
get type(): any;
set positions(positions: T_Position[]);
get positions(): T_Position[];
protected _updatePrimitive(): void;
/**
* 获取箭头点集合
* @param {Array} pnt1 - 起点
* @param {Array} pnt2 - 终点
* @param {Array} pnt3 - 控制点(可能为undefined)
* @param {boolean} clockWise - 是否顺时针
* @return {Array} 箭头点集合
*/
_getArrowPoints(pnt1: any, pnt2: any, pnt3: any, clockWise: any): any[];
protected _getHierarchy(): Cesium.PolygonHierarchy;
_mountedHook(): void;
setLabel(text: string, textStyle: any): this;
/**
* 设置箭头风格
* 详情参考:@see {@link Polygon}
* @param style
* @returns {FineArrow}
*/
setStyle(style: any): this;
}
export declare class FloodByEntity {
_viewer: Viewer;
extrudedHeight: number;
entity: any;
options: any;
private _last_depthTestAgainstTerrain;
timeIdx: NodeJS.Timer;
constructor();
get height(): number;
set height(val: number);
get viewer(): Viewer;
start(entity: any, options: any): void;
stop(): void;
clear(): void;
destroy(): void;
updateHeight(height: any): void;
/**
*
* @param viewer
*/
install(viewer: Viewer): void;
uninstall(viewer: any): void;
}
/**
* 流动线图元
* @noInheritDoc
* @example
* ```ts
* let flowLinePrimitive = new BC.FlowLinePrimitive('120,20;120,30;122,30')
* ```
*/
export declare class FlowLinePrimitive extends Overlay {
private _positions;
private _width;
/**
*
* @param positions 坐标串
* @param width 宽度
*/
constructor(positions: T_Position[], width?: number);
get type(): any;
set positions(positions: T_Position[]);
get positions(): T_Position[];
/**
*
* @private
*/
_setAppearance(): void;
_mountedHook(): void;
/**
*
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @example
* ```json
* // 样式参数(可选)
* {
* "speed": 5, //速度
* "color": BC.Color.WHITE, //颜色
* "percent": 0.3, // 比例
* "gradient": 0.1 // 透明程度
* }
* ```
*/
setStyle(style?: any): this;
}
/**
* 定点巡航
* ```example
* let flying = new BC.Flying(viewer)
* flying.positions = ['121.234,21.212,0,-29', '121.435,21.212,0,-29']
* flying.start()
* ```
*/
export declare class Flying extends Animation_2 {
private _positions;
private _durations;
private _currentIndex;
private _timer;
/**
*
* @param viewer 3D场景
* @param options 选项
*/
constructor(viewer: Viewer, options?: {
/**是否循环 */
loop: boolean;
/**驻留时间 */
dwellTime: number;
/**回调函数 */
callback: any;
});
/* Excluded from this release type: type */
/**
* 巡航路线
*/
set positions(positions: any[]);
/**
* 巡航路线
*/
get positions(): any[];
/**
* 每个点位的飞行间隔时间,当数组长度为 1 时,每个间隔时间相同,
* 如果不为 1 时,长度必须和点位长度相等
*/
set durations(durations: number[]);
get durations(): number[];
protected _bindEvent(): void;
protected _unbindEvent(): void;
private _cameraFly;
/**
* 开始
*/
start(): this;
/**
* 暂停
*/
pause(): this;
/**
* 继续
*/
restore(): this;
}
/**
* 雾天效果
* @example
* ```ts
* viewer.weather.fog.enable = true
* viewer.weather.fog.fogColor = BC.Color.BLACK
* ```
*/
export declare class Fog {
private _id;
private _viewer;
private _delegate;
private _enable;
private _fogByDistance;
private _color;
private _state;
constructor();
/**
* 类型
*/
get type(): string;
set enable(enable: boolean);
/**
* 是否启用
*/
get enable(): boolean;
set fogByDistance(fogByDistance: {
near: number;
nearValue: number;
far: number;
farValue: number;
});
/**
* 距离可见,默认 `{ near: 10, nearValue: 0, far: 2000, farValue: 1.0 }`
*/
get fogByDistance(): {
near: number;
nearValue: number;
far: number;
farValue: number;
};
set color(color: Cesium.Color);
/**
* 颜色
*/
get color(): Cesium.Color;
/**
*
*/
private _createPostProcessStage;
/* Excluded from this release type: addTo */
}
/**
* 聚集地
* @noInheritDoc
* @example
* ```ts
* let gatheringPlace = new BC.GatheringPlace('-90.0,32.0;-94.0,36.0')
* ```
*/
export declare class GatheringPlace extends Overlay {
/**
* @hidden
*/
private _positions;
/**
* @hidden
*/
private t;
/**
* @param {T_Position} positions
* @return {*}
*/
constructor(positions: T_Position[]);
get type(): any;
set positions(positions: T_Position[]);
/**
* 坐标串
*/
get positions(): T_Position[];
protected _getHierarchy(): Cesium.PolygonHierarchy;
/**
* @hidden
*/
_mountedHook(): void;
/**
* @hidden
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* 详情参考:@see {@link Polygon}
* @param style
*/
setStyle(style: any): this;
}
export declare const GeographicTilingScheme: typeof globalThis.Cesium.GeographicTilingScheme;
/**
* GeoJson 图层,用于加载 GeoJson 格式数据
* @noInheritDoc
* @example
* ```ts
* let layer = new BC.GeoJsonLayer('id', '**\/**.geojson')
* layer.eachOverlay((item) => {
* // item 为一个entity,
* if (item.polyline) {
* //todo
* let polyline = BC.Polyline.fromEntity(item)
* }
* if (item.polygon) {
* //todo
* let polygon = BC.Polygon.fromEntity(item)
* }
* if (item.billboard) {
* //todo
* let point = BC.Point.fromEntity(item)
* let divIcon = BC.DivIcon.fromEntity(item)
* let billboard = BC.Billboard.fromEntity(item)
* }
* })
* ```
*/
export declare class GeoJsonLayer extends Layer {
/**
* @param id 图层唯一标识
* @param url 数据地址
* @param options 属性配置
*/
constructor(id: string, url: string, options?: {});
/**
* 类型
*/
get type(): string;
/**
* 是否显示
*/
set show(show: boolean);
get show(): boolean;
/**
* 创建图标
* @param entity
* @returns
*/
private _createBillboard;
/**
* 创建线实体
* @param entity
* @returns {any}
* @private
*/
private _createPolyline;
/**
* 创建面实体
* @param entity
* @returns {any}
* @private
*/
_createPolygon(entity: Cesium.Entity): Polygon;
/**
* 创建模型
* @param entity
* @param modelUrl 模型url
* @returns 模型
* @private
*/
_createModel(entity: Cesium.Entity, modelUrl: string): Model;
/**
* 遍历覆盖物
* @param method 回调方法
* @param context
* @returns {GeoJsonLayer}
*/
eachOverlay(method: any, context: any): GeoJsonLayer;
/**
* 转换为矢量图层
* @returns 矢量图层
*/
toVectorLayer(): VectorLayer;
/**
* 转换为模型图层
* @param modelUrl 模型地址
* @returns {VectorLayer}
*/
toModelLayer(modelUrl: string): VectorLayer;
clear(): void;
setStyle(style: any): void;
}
/**
* 地球自转
* @example
* ```ts
* let globeRotate = new BC.GlobeRotate(viewer, {
* duration: 5,
* speed: 1000,
* callback: () => {},
* })
* globeRotate.start()
* ```
*/
export declare class GlobeRotate extends Animation_2 {
/**
* @param viewer 3D场景
* @param options 选项
*/
constructor(viewer: Viewer, options?: {
/**
* 速度
*/
speed: number;
/**持续时间,当此值大于0时,callback才会生效 */
duration: number;
/**
* 执行完成的回调函数
*/
callback: any;
/**
* 回调函数执行上下文
*/
context: any;
});
/* Excluded from this release type: type */
/**
* @param scene
* @param time
* @returns {boolean}
*/
private _icrf;
/**
* Bind the Event
*/
protected _bindEvent(): void;
/**
* Unbind the Event
*/
protected _unbindEvent(): void;
}
declare class GoogleImageryProvider extends Cesium_2.UrlTemplateImageryProvider {
constructor(options?: any);
}
/**
* GPX 图层,用于加载 gpx 数据
* @noInheritDoc
* @example
* ```ts
* let layer = new BC.GpxLayer('id', '**\/**.gpx')
* ```
*/
export declare class GpxLayer extends Layer {
/**
* @param id 图层唯一标识
* @param url 数据地址
* @param options 属性配置
*/
constructor(id: string, url: string, options?: {});
/**
* 类型
*/
get type(): string;
/**
* 是否显示
*/
set show(show: boolean);
get show(): boolean;
/**
* 遍历图层
* @param method 回调方法
* @param context
* @returns
*/
eachOverlay(method: any, context: any): this;
clear(): void;
setStyle(style: any): void;
}
export declare class GroundPolygonPrimitive extends Overlay {
private _positions;
_minHeight: number;
_extrudedHeight: number;
/**
*
* @param positions 坐标串
* @param holes 空心坐标串
*/
constructor(positions: string | T_Position[]);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
private getMinHeight;
private getMaxHeight;
set minHeight(height: number);
get minHeight(): number;
set extrudedHeight(height: number);
get extrudedHeight(): number;
/**
*
* @private
*/
private _setAppearance;
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {WaterPrimitive}
* @example
* ```json
* // 样式参数(可选)
* {
* "color": Color.WHITE, // 颜色
* "speed": 10, // 速度
* "image": "/img.png", // 材质图片地址
* "repeat": {x:5,y:1}, // 重复规则
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 近景天空盒子
* @noInheritDoc
* @example
* ```ts
* scene.skyBox = new BC.GroundSkyBox({
* sources: {
* positiveX: 'skybox_px.png',
* negativeX: 'skybox_nx.png',
* positiveY: 'skybox_py.png',
* negativeY: 'skybox_ny.png',
* positiveZ: 'skybox_pz.png',
* negativeZ: 'skybox_nz.png',
* },
* })
* ```
*/
export declare class GroundSkyBox extends Cesium_2.SkyBox {
offsetAngle: number;
_sources: any;
_cubeMap: any;
_command: any;
_attributeLocations: any;
_useHdr: any;
show: any;
sources: any;
/**
*
* @param options
* @example
* ```json
* //options(可选)
* {
* "sources": {}, // 六个面的贴图
* "show": true, //显示
* "offsetAngle": 0 //旋转角度
* }
* ```
*/
constructor(options?: any);
update(frameState?: any, useHdr?: any): any;
}
declare class HawkeyeMap extends Widget {
_baseLayers: Cesium.ImageryLayer[];
_map: Cesium.Viewer;
constructor();
get type(): any;
get baseLayers(): Cesium.ImageryLayer[];
/**
*
* @private
*/
_mountContent(): void;
/**
*
* @private
*/
_bindEvent(): void;
/**
*
* @private
*/
_unbindEvent(): void;
/**
*
* @private
*/
_installHook(): void;
/**
*
* @returns {boolean}
* @private
*/
_syncMap(): boolean;
/**
*
* @param baseLayer
* @returns {HawkeyeMap}
*/
addBaseLayer(baseLayer: Cesium.ImageryProvider): this;
}
export declare class HeatMapLayer extends Layer {
setStyle(style: any): void;
_options: {
radius: number;
height: number;
gradient: any;
useGround: boolean;
classificationType: number;
};
_canvas: HTMLCanvasElement;
_heat: any;
_scale: number;
_points: any[];
_bounds: Cesium.Rectangle;
_boundsInMeter: any;
_primitive: any;
constructor(id: any, options?: {});
get type(): string;
/**
*
* @private
*/
_addedHook(): void;
/**
*
* @returns {HTMLCanvasElement|undefined}
* @private
*/
_createGradientTexture(): HTMLCanvasElement;
/**
*
* @param points
* @returns {*}
* @private
*/
_parsePoints(points: any): any;
/**
*
* @private
*/
_computeBounds(): void;
/**
*
* @returns {{east, south, north, west}}
* @private
*/
_computeBoundsInMeter(): void;
/**
*
* @returns {boolean}
* @private
*/
_update(): boolean;
/**
*
* @param points
* @returns {HeatMapLayer}
*/
setPoints(points: any): this;
/**
*
* @return {HeatMapLayer}
*/
clear(): this;
}
export declare class HeightControl {
_viewer: Viewer;
_vectorLayer: VectorLayer;
_plot: Plot;
_layer: PrimitiveLayer;
_controlHeight: number;
minHeight: number;
_interval: NodeJS.Timer;
_primitive: GroundPolygonPrimitive;
_overlay: Polygon;
_label: Label;
currentHeight: number;
maxHeight: number;
constructor(options: any);
get viewer(): Viewer;
get vectorLayer(): VectorLayer;
get layer(): PrimitiveLayer;
get plot(): Plot;
get controlHeight(): number;
set controlHeight(val: number);
drawPolygon(): void;
startAnalysis(controlHeight: any): void;
clear(): void;
destroy(): void;
/**
*
* @param viewer
*/
install(viewer: Viewer): void;
uninstall(viewer: any): void;
}
export declare const HeightReference: typeof globalThis.Cesium.HeightReference;
export declare const HorizontalOrigin: typeof globalThis.Cesium.HorizontalOrigin;
/**
* Html 图层,用于加载 DivIcon 节点
* @noInheritDoc
* @example
* ```ts
* let layer = new BC.HtmlLayer('dom')
* viewer.addLayer(layer)
* ```
*/
export declare class HtmlLayer extends Layer {
private _renderRemoveCallback;
/**
* @param id 图层唯一标识
*/
constructor(id: string);
/**
* 类型
*/
get type(): string;
/**
* 是否显示
*/
set show(show: boolean);
get show(): boolean;
/**
* 添加句柄
* @param viewer
*/
protected _onAdd(viewer: Cesium.Viewer): void;
/**
* 移除句柄
*/
protected _onRemove(): void;
/**
* 清除图层
*/
clear(): this;
setStyle(style: any): void;
}
export declare const ImageMaterialProperty: typeof globalThis.Cesium.ImageMaterialProperty;
/**
* 地图工厂, 用于创建各类地图瓦片
* @example
* ```ts
* let baseLayer = BC.ImageryLayerFactory.createAmapImageryLayer({
* style: 'img',
* })
* viewer.addBaseLayer(baseLayer, {
* name: '地图',
* iconUrl: '../preview.png',
* })
* ```
*/
export declare class ImageryLayerFactory {
/**
* 创建高德地图
* @param options
* @returns
*/
static createAmapImageryLayer(options: any): Cesium.ImageryProvider;
/**
* 创建百度地图
* @param options 参考:{@link [Cesium.UrlTemplateImageryProvider.ConstructorOptions](https://cesium.com/learn/cesiumjs/ref-doc/UrlTemplateImageryProvider.html#.ConstructorOptions)}
* @returns
*/
static createBaiduImageryLayer(options: any): BaiduImageryProvider;
/**
* 创建谷歌地图
* @param options
* @returns
*/
static createGoogleImageryLayer(options: any): GoogleImageryProvider;
/**
* 创建天地图
* @param options
* @returns {TdtImageryProvider}
*/
static createTdtImageryLayer(options: any): TdtImageryProvider;
/**
* 创建腾讯地图
* @param options
* @returns {TencentImageryProvider}
*/
static createTencentImageryLayer(options: any): TencentImageryProvider;
/**
* 创建 Arcgis 地图
* @param options
* @returns {module:cesium.ArcGisMapServerImageryProvider}
*/
static createArcGisImageryLayer(options: any): Cesium.ArcGisMapServerImageryProvider;
/**
* 创建单图片地图
* @param options
* @returns {module:cesium.SingleTileImageryProvider}
*/
static createSingleTileImageryLayer(options: any): Cesium.SingleTileImageryProvider;
/**
* 创建 WMS 地图
* @param options
* @returns {module:cesium.WebMapServiceImageryProvider}
*/
static createWMSImageryLayer(options: any): Cesium.WebMapServiceImageryProvider;
/**
* 创建 WMTS 地图
* @param options
* @returns {module:cesium.WebMapTileServiceImageryProvider}
*/
static createWMTSImageryLayer(options: any): Cesium.WebMapTileServiceImageryProvider;
/**
* 创建 X/Y/Z 地图
* @param options
* @returns {module:cesium.UrlTemplateImageryProvider}
*/
static createXYZImageryLayer(options: any): Cesium.UrlTemplateImageryProvider;
/**
* 创建坐标系地图
* @param options
* @returns {module:cesium.TileCoordinatesImageryProvider}
*/
static createCoordImageryLayer(options: any): Cesium.TileCoordinatesImageryProvider;
/**
* 创建网格地图
* @param options
* @returns {module:cesium.GridImageryProvider}
*/
static createGridImageryLayer(options: any): Cesium.GridImageryProvider;
/**
* 创建 Mapbox 地图
* @param options
* @returns {module:cesium.MapboxImageryProvider}
*/
static createMapboxImageryLayer(options: any): Cesium.MapboxImageryProvider;
/**
* 创建 Mapbox 样式地图
* @param options
* @returns {module:cesium.MapboxStyleImageryProvider}
*/
static createMapboxStyleImageryLayer(options: any): Cesium.MapboxStyleImageryProvider;
/**
* 创建 TMS 地图
* @param options
* @returns {module:cesium.TileMapServiceImageryProvider}
*/
static createTMSImageryLayer(options: any): Cesium.TileMapServiceImageryProvider;
/**
* 创建MVT矢量切片地图
* @param options
* @returns
*/
static createMVTImageryLayer(options: any): MVTImageryProvider;
/**
* 根据类型创建地图
* @param type 类型,参考:{@link ImageryType}
* @param options 地图选项
* @returns
*/
static createImageryLayer(type: string, options: Object): any;
}
export declare enum ImageryType {
/**
* Arcgis 地图
*/
ARCGIS = "arcgis",
/**
* 单图片地图
*/
SINGLE_TILE = "single_tile",
/**
* WMS 地图
*/
WMS = "wms",
/**
* WMTS 地图
*/
WMTS = "wmts",
/**
* X/Y/Z 地图
*/
XYZ = "xyz",
/**
* 坐标系地图
*/
COORD = "coord",
/**
* 网格地图
*/
GRID = "grid",
/**
* Mapbox 地图
*/
MAPBOX = "mapbox",
/**
* Mapbox 样式地图
*/
MAPBOX_STYLE = "mapbox_style",
/**
* TMS 地图
*/
TMS = "tms",
/**
* 高德地图
*/
AMAP = "amap",
/**
* 百度地图
*/
BAIDU = "baidu",
/**
* 谷歌地图
*/
GOOGLE = "google",
/**
* 天地图
*/
TDT = "tdt",
/**
* 腾讯地图
*/
TENCENT = "tencent",
/**
* 矢量切片地图
*/
MVT = "mvt"
}
export declare class ImageTrailPolylineVolumePrimitive extends Overlay {
private _positions;
private _shape;
/**
*
* @param positions 坐标串
* @param holes 空心坐标串
*/
constructor(positions: string | T_Position[], shape: any[]);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
/**
*
* @private
*/
private _setAppearance;
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {WaterPrimitive}
* @example
* ```json
* // 样式参数(可选)
* {
* "color": Color.WHITE, // 颜色
* "speed": 10, // 速度
* "image": "/img.png", // 材质图片地址
* "repeat": {x:5,y:1}, // 重复规则
* }
* ```
*/
setStyle(style: any): this;
}
export declare const JulianDate: typeof globalThis.Cesium.JulianDate;
/**
* 键盘漫游
* @example
* ```ts
* let kr = new BC.KeyboardRoaming(viewer)
* kr.enable = true
* ```
*/
export declare class KeyboardRoaming {
private _viewer;
private _enable;
private _moveRate;
private _rotateRate;
private _flags;
/**
* @param viewer 3D 场景
*/
constructor(viewer: Cesium.Viewer);
/**
* 是否启用
*/
set enable(enable: boolean);
get enable(): boolean;
/**
* 移动变化率:100
*/
set moveRate(moveRate: number);
get moveRate(): number;
/**
* 旋转变化率:0.01
*/
set rotateRate(rotateRate: number);
get rotateRate(): number;
/**
* 绑定事件
*/
private _bindEvent;
/**
* 取消绑定事件
*/
private _unbindEvent;
/**
*
* @param e
* @returns {undefined}
* @private
*/
private _getFlagForKeyCode;
/**
*
*/
private _onClick;
/**
*
* @param e
*/
private _onKeydown;
/**
*
* @param e
*/
private _onKeyup;
/**
*
*/
private _onTick;
}
/**
* Kml 图层,用于加载 Kml 数据
* @noInheritDoc
* @example
* ```ts
* let layer = new BC.KmlLayer('id', '**\/**.kml')
* layer.eachOverlay((item) => {
* if (item.polyline) {
* //todo
* }
* if (item.polygon) {
* //todo
* }
* if (item.billboard) {
* //todo
* }
* })
* ```
*/
export declare class KmlLayer extends Layer {
/**
* @param id 图层唯一标识
* @param url 数据地址
* @param options 属性配置
*/
constructor(id: string, url: string, options?: {});
/**
* 类型
*/
get type(): string;
/**
* 是否显示
*/
set show(show: boolean);
get show(): boolean;
/**
* 遍历图层
* @param method 回调方法
* @param context
* @returns
*/
eachOverlay(method: any, context: any): this;
clear(): void;
setStyle(style: any): void;
}
/**
* 注记
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let Label = new BC.Label(position, 'test')
* ```
*/
export declare class Label extends Overlay {
private _position;
private _text;
/**
*
* @param position 坐标
* @param text 文本
*/
constructor(position: T_Position, text: string);
get type(): any;
set position(position: T_Position);
get position(): T_Position;
set text(text: string);
get text(): string;
_mountedHook(): void;
/**
*
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @returns {Label}
* @example
* ```json
* // 样式参数(可选)
* {
* "font": "30px sans-serif", // CSS 字体设置
* "scale": 1, //比例
* "pixelOffset": { "x": 0, "y": 0 }, //偏移像素
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "showBackground": false, //是否显示背景
* "backgroundColor": BC.Color.BLACK, //背景颜色
* "backgroundPadding": { "x": 0, "y": 0 }, //背景间隙
* "fillColor": BC.Color.BLACK, //文字颜色
* "outlineColor": BC.Color.WHITE, //边框颜色
* "outlineWidth": 0, //边框大小,
* "scaleByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置比例
* "translucencyByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置透明度
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "disableDepthTestDistance": 0 // 深度检测距离,用于防止剪切地形,设置为零时,将始终应用深度测试。设置为Number.POSITIVE_INFINITY时,永远不会应用深度测试。
* }
* ```
*/
setStyle(style: any): this;
/**
* Parse from entity
* @param entity
* @returns {Label}
*/
static fromEntity(entity: Cesium.Entity): Label | undefined;
}
/**
* 标签图层
*/
export declare class LabelLayer extends Layer {
_dataSource: Promise;
constructor(id: any, url?: string);
get type(): string;
_createLabel(entity: any): Label;
_initLabel(): void;
clear(): void;
setStyle(style: any): void;
}
/**
* 注记图元
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let label = new BC.LabelPrimitive(position, 'test')
* ```
*/
export declare class LabelPrimitive extends Overlay {
protected _position: Position;
protected _text: string;
/**
*
* @param position 坐标
* @param text 文本
*/
constructor(position: T_Position, text: string);
get type(): any;
set position(position: T_Position);
get position(): T_Position;
set text(text: string);
get text(): string;
_mountedHook(): void;
/**
*
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @example
* ```json
* // 样式参数(可选)
* {
* "font": "30px sans-serif", // CSS 字体设置
* "scale": 1, //比例
* "pixelOffset": { "x": 0, "y": 0 }, //偏移像素
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "showBackground": false, //是否显示背景
* "backgroundColor": BC.Color.BLACK, //背景颜色
* "backgroundPadding": { "x": 0, "y": 0 }, //背景间隙
* "fillColor": BC.Color.BLACK, //文字颜色
* "outlineColor": BC.Color.WHITE, //边框颜色
* "outlineWidth": 0, //边框大小,
* "scaleByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置比例
* "translucencyByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置透明度
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "disableDepthTestDistance": 0 // 深度检测距离,用于防止剪切地形,设置为零时,将始终应用深度测试。设置为Number.POSITIVE_INFINITY时,永远不会应用深度测试。
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 图层的基类,其子类是实例化后需添加到三维场景中方可展示各类三维数据
*/
export declare abstract class Layer {
protected _id: string;
protected _delegate: any;
protected _viewer: any;
protected _state: any;
protected _show: boolean;
protected _isGround: boolean;
protected _cache: Map;
protected _attr: {};
protected _layerEvent: LayerEvent;
constructor(options: any);
/**
* 唯一标识
*/
get id(): string;
/**
* 项目类型
*/
get type(): any;
/**
*
*/
get delegate(): any;
/**
* 是否显示
*/
set show(show: boolean);
/**
* 业务属性
*/
get show(): boolean;
get layerEvent(): LayerEvent;
set attr(attr: {});
get attr(): {};
/**
* 图层状态
*/
get state(): any;
/**
* The hook for added
*/
protected _addedHook(): void;
/**
* The hook for removed
*/
protected _removedHook(): void;
/**
* The layer added callback function
* Subclasses need to be overridden
* @param viewer
*/
protected _onAdd(viewer: any): void;
/**
* The layer added callback function
* Subclasses need to be overridden
*/
protected _onRemove(): void;
/**
* The layer add overlay
* @param overlay
*/
protected _addOverlay(overlay: Overlay): void;
/**
* The layer remove overlay
* @param overlay
*/
protected _removeOverlay(overlay: Overlay): void;
/**
* 添加覆盖物
* @param overlay 覆盖物
* @returns {Layer}
*/
addOverlay(overlay: Overlay): Layer;
/**
* 添加覆盖物数组
* @param overlays 覆盖物数组
* @returns {Layer}
*/
addOverlays(overlays: Overlay[]): Layer;
/**
* 删除覆盖物
* @param overlay 覆盖物
* @returns {Layer}
*/
removeOverlay(overlay: Overlay): Layer;
/**
* 根据 Id 获取覆盖物
* @param overlayId
* @returns 覆盖物
*/
getOverlay(overlayId: string): Overlay | undefined;
/**
* 根据业务 Id 获取覆盖物
* @param id 覆盖物业务唯一标识
*/
getOverlayById(id: string): Overlay | undefined;
/**
* 根据覆盖物属性获取覆盖物
* @param attrName 属性名称
* @param attrVal 属性值
* @returns 覆盖物数组
*/
getOverlaysByAttr(attrName: string, attrVal: any): Overlay[];
/**
* 遍历覆盖物
* @param method 回调函数,参数为每一个覆盖物
* @param context 上下文
* @returns {Layer}
*/
eachOverlay(method: (item: Overlay) => void, context: any): Layer;
/**
* 获取所有覆盖物
*/
getOverlays(): Overlay[];
/**
* 清空图层
*/
abstract clear(): void;
/**
* 删除图层
*/
remove(): void;
/**
* 添加图层到场景
* @param viewer
* @returns {Layer}
*/
addTo(viewer: any): Layer;
/**
* 设置样式, 样式将会应用到图层的每一个覆盖物上
* @param style
*/
abstract setStyle(style: any): any;
/**
* 事件订阅
* @param type 订阅类型
* @param callback 订阅回调
* @param context 上下文
* @returns {Layer}
*/
on(type: any, callback: any, context: any): Layer;
/**
* 取消事件订阅
* @param type 订阅类型
* @param callback 订阅回调
* @param context 上下文
* @returns {Layer}
*/
off(type: any, callback: any, context: any): Layer;
/**
* 触发事件
* @param type 订阅类型
* @param params 参数
* @returns {Layer}
*/
fire(type: any, params: any): Layer;
/**
* 注册图层类型
* @param type - 图层类型
*/
static registerType(type: string): void;
/**
* 获取图层类型
* @param type
* @returns 图层类型
*/
static getLayerType(type: string): string;
}
declare class LayerEvent extends Event_2 {
constructor();
/**
* Register event for layer
* @private
*/
_registerEvent(): void;
}
/**
* 图层组,将图层按一定的逻辑分组,方便统一管理
* @example
* ```ts
* let layerGroup = new BC.LayerGroup('id')
* viewer.addLayerGroup(layerGroup)
* let layer = new BC.VectorLayer('layer')
* layerGroup.addLayer(layer)
* ```
*/
export declare class LayerGroup {
private _id;
private _cache;
private _show;
private _viewer;
private _layerGroupEvent;
private _state;
/**
* @param id 图层组唯一标识
*/
constructor(id: string);
/**
* 唯一标识
*/
get id(): string;
/**
* 类型
*/
get type(): string;
/**
* 是否显示
*/
set show(show: boolean);
get show(): boolean;
get layerGroupEvent(): LayerGroupEvent;
/**
* 状态
*/
get state(): string;
/**
*
* @param viewer
*/
private _onAdd;
/**
*
* @private
*/
private _onRemove;
/**
* 添加图层
* @param layer
* @returns {LayerGroup}
*/
addLayer(layer: Layer): LayerGroup;
/**
* 删除图层
* @param layer
* @returns {LayerGroup}
*/
removeLayer(layer: Layer): LayerGroup;
/**
* 获取图层
* @param id
* @returns 图层
*/
getLayer(id: string): Layer | undefined;
/**
* 获取所有图层,不包括地图
* @returns 图层数组
*/
getLayers(): Layer[];
/**
* 添加图层到场景
* @param viewer
* @returns {LayerGroup}
*/
addTo(viewer: Viewer): this;
/**
* 删除图层组
* @returns
*/
remove(): LayerGroup;
}
declare class LayerGroupEvent extends Event_2 {
constructor();
/**
* 注册图层树事件
* @private
*/
protected _registerEvent(): void;
}
export declare let LayerType: {};
/**
* 镜头耀斑效果
* @example
* ```ts
* viewer.effect.lensFlare.enable = true
* ```
*/
export declare class LensFlare {
private _viewer;
private _delegate;
private _enable;
private _intensity;
private _distortion;
private _dirtAmount;
private _haloWidth;
private _selected;
private _state;
constructor();
/**
* 类型
* @ignore
*/
get type(): string;
/**
* 是否启用
*/
set enable(enable: boolean);
get enable(): boolean;
/**
* 强度
*/
set intensity(intensity: number);
get intensity(): number;
/**
* 扭曲度
*/
set distortion(distortion: number);
get distortion(): number;
/**
* 分散度
*/
set dirtAmount(dirtAmount: number);
get dirtAmount(): number;
/**
* 光圈宽度
*/
set haloWidth(haloWidth: number);
get haloWidth(): number;
/**
* 设置后期作用的覆盖物
*/
set selected(selected: any[]);
get selected(): any[];
/**
*
* @private
*/
private _createPostProcessStage;
/**
* 添加效果
* @param viewer
* @returns {LensFlare}
* @ignore
*/
addTo(viewer: Cesium.Viewer): LensFlare;
}
/**
* 光柱图元
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let cylinder = new BC.LightCylinderPrimitive(position, 1000, 1, 100)
* ```
*/
export declare class LightCylinderPrimitive extends Overlay {
private _center;
private _length;
private _topRadius;
private _bottomRadius;
/**
*
* @param center 坐标
* @param length 长度
* @param topRadius 上半径
* @param bottomRadius 下半径
*/
constructor(center: T_Position, length: number, topRadius: number, bottomRadius: number);
get type(): any;
set center(position: T_Position);
get center(): T_Position;
set length(length: number);
get length(): number;
set topRadius(topRadius: number);
get topRadius(): number;
set bottomRadius(bottomRadius: number);
get bottomRadius(): number;
/**
*
* @param center
* @param radius
* @private
*/
private _computeEllipsePositions;
/**
*
* @param topPts
* @param bottomPts
* @param height
*/
private _createCylinderInstance;
/**
*
* @private
*/
private _getCircleImage;
/**
*
* @param image
* @private
*/
private _getParticlesImage;
/**
*
* @private
*/
private _updatePrimitives;
/**
*
* @private
*/
_mountedHook(): void;
/**
*
* @param frameState
*/
update(frameState: any): void;
/**
* 设置风格
* @param style
* @example
* ```json
* // 样式参数(可选)
* {
* "color": BC.Color.BLACK //颜色
* }
* ```
*/
setStyle(style: any): this;
destroy(): void;
}
/**
* 加载蒙层
* @noInheritDoc
* @example
* ```ts
* viewer.loadingMask.enable = true
* ```
*/
declare class LoadingMask extends Widget {
/**
* @hidden
*/
constructor();
/**
* @hidden
*/
get type(): any;
/**
*
* @private
*/
_installHook(): void;
/**
*
* @private
*/
_mountContent(): void;
}
/**
* 坐标信息
* @noInheritDoc
* @example
* ```ts
* viewer.locationBar.enable = true
* ```
*/
declare class LocationBar extends Widget {
private _mouseEl;
private _cameraEl;
private _fpsEl;
private _msEl;
private _lastMouseSampleTime;
private _lastCameraSampleTime;
private _lastFpsSampleTime;
private _lastMsSampleTime;
private _fpsFrameCount;
private _msFrameCount;
private _pickMode;
/**
* @hidden
*/
constructor();
/**
* @hidden
*/
get type(): any;
set pickMode(str: any);
get pickMode(): any;
/**
*
* @private
*/
_installHook(): void;
/**
*
* @private
*/
_bindEvent(): void;
/**
*
* @private
*/
_unbindEvent(): void;
/**
*
* @private
*/
_mountContent(): void;
/**
*
* @param e
* @private
*/
_onMove(e: any): void;
/**
*
* @private
*/
_onCameraChanged(): void;
/**
*
* @private
*/
_onPostUpdate(): void;
}
/**
* 地图分割
* @noInheritDoc
* @example
* ```ts
* let baseLayer_elc = BC.ImageryLayerFactory.createGoogleImageryLayer()
* viewer.mapSplit.enable = true
* viewer.mapSplit.addBaseLayer(baseLayer_elc, -1)
* ```
*/
declare class MapSplit extends Widget {
private _baseLayer;
private _moveActive;
/**
* @hidden
*/
constructor();
/**
* @hidden
*/
get type(): any;
/**
*
* @private
*/
_installHook(): void;
/**
*
* @private
*/
_bindEvent(): void;
/**
*
* @private
*/
_unbindEvent(): void;
/**
*
* @private
*/
_mountContent(): void;
/**
*
* @param movement
* @private
*/
_moveHandler(movement: any): void;
/**
*
* @param baseLayer
* @param splitDirection 分割方向,-1:左,0:无,1:右
* @returns {MapSplit}
*/
addBaseLayer(baseLayer: any, splitDirection?: number): this;
}
declare class MapSwitch extends Widget {
protected _config: any;
private _cache;
/**
* @hidden
*/
constructor();
/**
* @hidden
*/
get type(): any;
/**
* Override the superclass function
* @private
*/
_enableHook(): void;
/**
*
* @private
*/
_installHook(): void;
_addItem(map: any): void;
/**
* add map
* @param map
*/
addMap(map?: {}): void;
}
export declare const Material: typeof globalThis.Cesium.Material;
/**
* 材质基类
*/
declare class MaterialProperty {
protected _definitionChanged: Cesium.Event;
protected _color: any;
protected _colorSubscription: any;
protected _speed: any;
protected _speedSubscription: any;
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
constructor(options?: any);
/* Excluded from this release type: isConstant */
/* Excluded from this release type: definitionChanged */
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
declare const Math_2: typeof globalThis.Cesium.Math;
export { Math_2 as Math }
export declare const Matrix3: typeof globalThis.Cesium.Matrix3;
export declare const Matrix4: typeof globalThis.Cesium.Matrix4;
/**
* @Author: Caven
* @Date: 2021-07-11 09:56:33
*/
export declare class Measure {
_viewer: any;
_layer: Cesium.CustomDataSource;
constructor();
get viewer(): any;
get layer(): Cesium.CustomDataSource;
/**
*
* @param options
* @returns {Measure}
*/
angle(options?: {}): this;
/**
*
* @param options
* @returns {Measure}
*/
area(options?: {}): this;
coord(options?: {}): this;
/**
*
* @param options
* @returns {Measure}
*/
areaHeight(options?: {}): this;
/**
*
* @param options
* @returns {Measure}
*/
areaSurface(options?: {}): this;
/**
*
* @param options
* @returns {Measure}
*/
distance(options?: {}): this;
/**
*
* @param options
* @returns {Measure}
*/
distanceSurface(options?: {}): this;
/**
*
* @param options
* @returns {Measure}
*/
heading(options?: {}): this;
/**
*
* @param options
* @returns {Measure}
*/
height(options?: {}): this;
/**
*
* @param options
* @returns {Measure}
*/
triangleHeight(options?: {}): this;
/**
*
* @param viewer
*/
install(viewer: any): void;
/**
*
* @param type
* @param options
* @returns {Measure}
*/
activate(type: any, options: any): this;
/**
*
* @returns {Measure}
*/
deactivate(): this;
}
/**
* 模型
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let model = new BC.Model(position, '*.glb')
* ```
*/
export declare class Model extends Overlay {
private _position;
private _modelUrl;
private _rotateAmount;
/**
*
* @param position 坐标
* @param modelUrl 模型地址
*/
constructor(position: T_Position, modelUrl: string);
get type(): any;
set position(position: Position);
get position(): Position;
set modelUrl(modelUrl: string);
get modelUrl(): string;
set rotateAmount(amount: number);
get rotateAmount(): number;
_mountedHook(): void;
/**
* 设置风格
* @param style
* @return {Model}
* @example
* ```json
* // 样式参数(可选)
* {
* "scale": 1, //比例
* "minimumPixelSize": 0, //指定模型的最小像素大小,而不考虑缩放
* "maximumScale": 0, //指定模型的最大比例
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "silhouetteColor": BC.Color.RED, //轮廓颜色
* "silhouetteSize": 0, //轮廓宽度
* "lightColor": BC.Color.RED, //模型着色时指定灯光颜色
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* } //根据距离设置可见
* }
* ```
*/
setStyle(style: any): this;
/**
* Entity 转换为 Overlay
* @param entity 实体
* @param modelUrl 模型地址
*/
static fromEntity(entity: Cesium.Entity, modelUrl: string): Model;
}
/**
* 模型集合图元
* @noInheritDoc
* @example
* ```ts
* let positions = '120,20;120,30;122,30'
* let model = new BC.ModelCollectionPrimitive(positions, '*.glb')
* ```
*/
export declare class ModelCollectionPrimitive extends Overlay {
private _positions;
private _modelUrl;
private _attrs;
/**
*
* @param positions 坐标串
* @param modelUrl 地址
*/
constructor(positions: T_Position[], modelUrl: string);
get type(): any;
get readyPromise(): any;
set attrs(attrs: any[]);
get attrs(): any[];
set positions(positions: T_Position[]);
set modelUrl(modelUrl: string);
get modelUrl(): string;
private _resetDelegate;
_mountedHook(): void;
/**
*
* @param instanceId
*/
getModelInstance(instanceId: string): any;
/**
*
* @param instanceId
*/
getAttrByInstanceId(instanceId: string): any;
/**
* 设置风格
* @param style
* @example
* ```json
* // 样式参数(可选)
* {
* "scale": 1, //比例
* "minimumPixelSize": 0, //指定模型的最小像素大小,而不考虑缩放
* "maximumScale": 0, //指定模型的最大比例
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "silhouetteColor": BC.Color.RED, //轮廓颜色
* "silhouetteSize": 0, //轮廓宽度
* "lightColor": BC.Color.RED, //模型着色时指定灯光颜色
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* } //根据距离设置可见
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 模型图元
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let model = new BC.ModelPrimitive(position, '*.glb')
* ```
*/
export declare class ModelPrimitive extends Overlay {
private _position;
private _modelUrl;
/**
*
* @param position 坐标
* @param modelUrl 地址
*/
constructor(position: T_Position, modelUrl: string);
get type(): any;
get readyPromise(): any;
set position(position: T_Position);
get position(): T_Position;
set modelUrl(modelUrl: string);
get modelUrl(): string;
/**
*
* @private
*/
_mountedHook(): void;
/**
*
* @param name
*/
getMaterial(name: string): any;
/**
*
* @param name
*/
getMesh(name: string): any;
/**
*
* @param name
* @returns {*}
*/
getNode(name: string): any;
getNodes(): any;
/**
* 设置风格
* @param style
* @example
* ```json
* // 样式参数(可选)
* {
* "scale": 1, //比例
* "minimumPixelSize": 0, //指定模型的最小像素大小,而不考虑缩放
* "maximumScale": 0, //指定模型的最大比例
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "silhouetteColor": BC.Color.RED, //轮廓颜色
* "silhouetteSize": 0, //轮廓宽度
* "lightColor": BC.Color.RED, //模型着色时指定灯光颜色
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* } //根据距离设置可见
* }
* ```
*/
setStyle(style: any): this;
}
declare class ModelSection {
name: string;
_longitude: number;
_latitude: number;
_height: number;
_heading: number;
_pitch: number;
_roll: number;
tile: Tileset;
plane: Cesium.Entity;
showPlane: boolean;
clippingPlane: Cesium.ClippingPlane;
show: boolean;
constructor(position: Position, tile: Tileset);
set longitude(val: number);
set latitude(val: number);
set height(val: number);
set heading(val: number);
set pitch(val: number);
set roll(val: number);
get longitude(): number;
get latitude(): number;
get height(): number;
get heading(): number;
get pitch(): number;
get roll(): number;
private rotatingByMatrix4;
private getInverseTransform;
private getClippingPlane;
getTilesCilpiingPlane(): void;
update(): void;
}
/**
* 单体化图元
* @noInheritDoc
* @example
* ```ts
* let monomer = new BC.MonomerPrimitive('120,20;120,30;122,30')
* monomer.setStyle({
* height:100,
* extrudedHeight:200,
* color: BC.Color.AQUA.withAlpha(0.3),
* outline: false,
* classificationType: 2
* })
* ```
*/
export declare class MonomerPrimitive extends Overlay {
private _positions;
/**
*
* @param positions 坐标串
*/
constructor(positions: string | T_Position[]);
get type(): any;
set positions(positions: string | T_Position[]);
/**
* 单体化坐标
*/
get positions(): string | T_Position[];
/**
* 单体化高度
*/
get height(): number;
set height(value: number);
/**
* 单体化拉伸高度
*/
get extrudedHeight(): number;
set extrudedHeight(value: number);
/**
* 单体化颜色
*/
get color(): Cesium.Color;
set color(value: Cesium.Color);
/**
* 单体化边框
*/
get outline(): boolean;
set outline(value: boolean);
set classificationType(value: number);
/**
* 分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
*/
get classificationType(): number;
protected _mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {WaterPrimitive}
* @example
* ```json
* // 样式参数(可选)
* {
* "height": 1, //高度
* "extrudedHeight": 0, //拉升高度
* "outline": false, //是否显示边框
* "color": BC.Color.BLUE, //单体化颜色
* "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* }
* ```
*/
setStyle(style: any): this;
}
/**
* Mouse events in 3D scene, optimized Cesium event model
*/
declare class MouseEvent_2 extends Event_2 {
_viewer: Viewer;
_selected: any;
constructor(viewer: any);
/**
* Register Cesium mouse events
* @private
*/
_setInputAction(): void;
/**
*
* Gets the mouse information for the mouse event
* @param position
* @private
*
*/
_getMouseInfo(position: any): {
target: any;
windowPosition: any;
position: any;
wgs84Position: any;
surfacePosition: any;
wgs84SurfacePosition: any;
};
/**
* Gets the drill pick overlays for the mouse event
* @param position
* @returns {[]}
* @private
*/
_getDrillInfos(position: any): any[];
/**
* Return the Overlay id
* @param target
* @returns {any}
* @private
*/
_getOverlayId(target: any): any;
/**
* Returns the target information for the mouse event
* @param target
* @returns {{instanceId: *, overlay: undefined, feature: undefined, layer: undefined}}
* @private
*/
_getTargetInfo(target: any): {
layer: any;
overlay: any;
feature: any;
instanceId: any;
};
/**
* Trigger subscription event
* @param type
* @param mouseInfo
* @private
*/
_raiseEvent(type: any, mouseInfo?: any): void;
/**
* Default click event handler
* @param movement
* @returns {boolean}
* @private
*/
_clickHandler(movement: any): boolean;
/**
* Default dbClick event handler
* @param movement
* @returns {boolean}
* @private
*/
_dbClickHandler(movement: any): boolean;
/**
* Default rightClick event handler
* @param movement
* @returns {boolean}
* @private
*/
_rightClickHandler(movement: any): boolean;
/**
* Default mousemove event handler
* @param movement
* @returns {boolean}
* @private
*/
_mouseMoveHandler(movement: any): boolean;
/**
* Default mouse left down event handler
* @param movement
* @private
*/
_leftDownHandler(movement: any): boolean;
/**
* Default mouse left up event handler
* @param movement
* @private
*/
_leftUpHandler(movement: any): void;
/**
* Default mouse right down event handler
* @param movement
* @private
*/
_rightDownHandler(movement: any): boolean;
/**
* Default mouse right up event handler
* @param movement
* @private
*/
_rightUpHandler(movement: any): void;
/**
* Default mouse wheel event handler
* @param movement
* @private
*/
_mouseWheelHandler(movement: any): void;
}
export declare enum MouseEventType {
/**
* (场景、图层、覆盖物)鼠标左键按下事件
*/
LEFT_DOWN = 0,
/**
* (场景、图层、覆盖物)鼠标左键抬升事件
*/
LEFT_UP = 1,
/**
* (场景、图层、覆盖物)鼠标点击事件
*/
LEFT_CLICK = 2,
/**
* (场景、图层、覆盖物)鼠标左键双击事件
*/
LEFT_DOUBLE_CLICK = 3,
/**
* (场景、图层、覆盖物)鼠标右键按下事件
*/
RIGHT_DOWN = 5,
/**
* (场景、图层、覆盖物)鼠标右键抬升事件
*/
RIGHT_UP = 6,
/**
* (场景、图层、覆盖物)鼠标右键点击事件
*/
RIGHT_CLICK = 7,
/**
* (场景、图层、覆盖物)鼠标滚轮按下事件
*/
MIDDLE_DOWN = 10,
/**
* (场景、图层、覆盖物)鼠标滚轮抬升事件
*/
MIDDLE_UP = 11,
/**
* (场景、图层、覆盖物)鼠标滚轮点击事件
*/
MIDDLE_CLICK = 12,
/**
* (场景、图层、覆盖物)鼠标移动事件
*/
MOUSE_MOVE = 15,
/**
* (场景、图层、覆盖物)鼠标滚轮事件
*/
WHEEL = 16,
/**
* 触控屏上双指开始事件
*/
PINCH_START = 17,
/**
* 触控屏上双指结束事件
*/
PINCH_END = 18,
/**
* 触控屏上双指移动事件
*/
PINCH_MOVE = 19,
/**
* 长按事件
*/
LONG_PRESS = 20,
/**
* 覆盖物鼠标移入事件
*/
MOUSE_OVER = "mouseover",
/**
* 覆盖物鼠标移出事件
*/
MOUSE_OUT = "mouseout"
}
/**
* 鼠标模式 0:左键拖动,中键翻转(默认),1:左键拖动,右键翻转
*/
export declare enum MouseMode {
/**
* 左键拖动,中键翻转(默认)
*/
LEFT_MIDDLE = 0,
/**
* 左键拖动,右键翻转
*/
LEFT_RIGHT = 1
}
export declare enum MultiViewportMode {
NONE = 0,
HORIZONTAL = 1,
VERTICAL = 2,
QUAD = 3,
TRIPLE = 4,
VerticalTrisection = 5
}
declare class MVTImageryProvider {
_destroyed: boolean;
ready: boolean;
tilingScheme: any;
rectangle: any;
tileSize: any;
tileWidth: any;
tileHeight: any;
maximumLevel: any;
minimumLevel: any;
tileDiscardPolicy: any;
_error: Cesium.Event;
credit: any;
proxy: any;
hasAlphaChannel: any;
sourceFilter: any;
_accessToken: any;
_enablePickFeatures: any;
readyPromise: Promise;
_style: any;
mapboxRenderer: any;
/**
* create a MVTImageryProvider Object
* @param {MVTImageryProviderOptions} options MVTImageryProvider options as follow:
* @param {Resource | string | StyleSpecification} options.style - mapbox style object or url Resource.
* @param {string} options.accessToken - mapbox style accessToken.
* @param {RequestTransformFunction} options.transformRequest - use transformRequest to modify tile requests.
* @param {Number} [options.tileSize = 256] - can be 256 or 512. defaults to 256.
* @param {Number} [options.maximumLevel = 18] - if cesium zoom level exceeds maximumLevel, layer will be invisible, defaults to 18.
* @param {Number} [options.minimumLevel = 0] - if cesium zoom level belows minimumLevel, layer will be invisible, defaults to 0.
* @param {Boolean} [options.showCanvas = false] - if show canvas for debug.
* @param {Boolean} [options.enablePickFeatures = true] - enable pickFeatures or not, defaults to true.
* @param {Function} options.sourceFilter - sourceFilter is used to filter which source participate in pickFeature process.
* @param {WebMercatorTilingScheme | GeographicTilingScheme} [options.tilingScheme = WebMercatorTilingScheme] - Cesium tilingScheme, defaults to WebMercatorTilingScheme(EPSG: 3857).
* @param {Credit} options.credit - A credit contains data pertaining to how to display attributions/credits for certain content on the screen.
* @example
* const imageryProvider = new MVTImageryProvider({
style: 'https://demotiles.maplibre.org/style.json'
});
*/
constructor(options: any);
/**
* get mapbox style json obj
*/
get style(): any;
get isDestroyed(): boolean;
/**
* Gets an event that will be raised if an error is encountered during processing.
* @memberof GeoJsonDataSource.prototype
* @type {Event}
*/
get errorEvent(): Cesium.Event<(...args: any[]) => void>;
_build(url: any, options?: any): Promise;
static fromUrl(url: any, options?: {}): Promise;
_preLoad(data: any): Promise;
_createTile(): HTMLCanvasElement;
/**
* reset tile cache
*/
_resetTileCache(): void;
_getTilesSpec(coord: any, source: any): any[];
requestImage(x: any, y: any, level: any, releaseTile?: boolean): Promise;
pickFeatures(x: any, y: any, zoom: any, longitude: any, latitude: any): any;
destroy(): void;
}
/**
* 夜视效果
* @example
* ```ts
* viewer.effect.night.enable = true
* ```
*/
export declare class NightVision {
private _enable;
private _selected;
private _state;
private _viewer;
private _delegate;
constructor();
/**
* 类型
* @ignore
*/
get type(): string;
/**
* 是否启用
*/
set enable(enable: boolean);
get enable(): boolean;
/**
* 设置后期作用的覆盖物
*/
set selected(selected: any[]);
get selected(): any[];
/**
*
* @private
*/
private _createPostProcessStage;
/**
* 添加效果
* @param viewer
* @returns {NightVision}
* @ignore
*/
addTo(viewer: Cesium.Viewer): NightVision;
}
/**
* 覆盖物基类,该类无法实例化
*/
export declare class Overlay {
protected _id: string;
protected _bid: string;
protected _delegate: any;
protected _layer: any;
protected _state: any;
protected _show: boolean;
protected _style: any;
protected _attr: {};
protected _allowDrillPicking: boolean;
protected _contextMenu: any[];
protected _overlayEvent: OverlayEvent;
constructor();
/**
* 唯一标识
* @readonly
*/
get overlayId(): string;
/**
* 覆盖物类型
* @readonly
*/
get type(): string;
set id(id: string);
/**
* 业务唯一标识
*/
get id(): string;
set show(show: boolean);
/**
* 是否显示
*/
get show(): boolean;
set attr(attr: {});
/**
* 业务属性
*/
get attr(): {};
set allowDrillPicking(allowDrillPicking: boolean);
/**
* 是否可以穿透选择,默认值:false
*/
get allowDrillPicking(): boolean;
get overlayEvent(): OverlayEvent;
get delegate(): any;
/**
* 覆盖物状态
* @readonly
*/
get state(): any;
set contextMenu(menus: any[]);
get contextMenu(): any[];
/**
*
* @param type
* @returns {any}
*/
protected _getLayerCollection(type: string): any;
/**
* The hook for mount layer
* Subclasses need to be overridden
* @private
*/
protected _mountedHook(): void;
/**
* The hook for added
* @returns {boolean}
* @private
*/
protected _addedHook(): boolean;
/**
* The hook for removed
* Subclasses need to be overridden
* @private
*/
_removedHook(): void;
/**
* Add handler
* @param layer
* @private
*/
_onAdd(layer: any): void;
/**
* Remove handler
* @private
*/
_onRemove(): void;
/**
* Sets Text with Style
* @param text
* @param textStyle
* @returns {Overlay}
*/
setLabel(text: any, textStyle: Cesium.LabelGraphics): this;
/**
* 设置风格
* @param style
* @returns {Overlay}
*/
setStyle(style: any): this;
/**
* Removes from layer
* @returns {Overlay}
*/
remove(): this;
/**
* adds to layer
* @param layer
* @returns {Overlay}
*/
addTo(layer: any): this;
/**
* Subscribe event
* @param type
* @param callback
* @param context
* @returns {Overlay}
*/
on(type: string, callback: any, context: any): this;
/**
* Unsubscribe event
* @param type
* @param callback
* @param context
* @returns {Overlay}
*/
off(type: any, callback: any, context: any): this;
/**
* Trigger subscription event
* @param type
* @param params
* @returns {Overlay}
*/
fire(type: any, params: any): this;
/**
*
* @param type
*/
static registerType(type: string): void;
/**
*
* @param type
* @returns {*|undefined}
*/
static getOverlayType(type: string): any;
}
declare class OverlayEvent extends Event_2 {
constructor();
/**
* Register event for overlay
* @protected
*/
protected _registerEvent(): void;
}
export declare let OverlayType: any;
export declare class Parse {
/**
* Parses all kinds of coordinates to position
* @param position
* @returns {Position}
*/
static parsePosition(position: string | Position | string[] | number[]): Position;
/**
* Parses all kinds of coordinates array to position array
* @param positions
* @returns {unknown[]}
*/
static parsePositions(positions: string | Array): Position[];
/**
* Parses point position to array
* @param position
* @returns {*[]}
*/
static parsePointCoordToArray(position: Position): any[];
/**
* Parses polyline positions to array
* @param positions
* @returns {[]}
*/
static parsePolylineCoordToArray(positions: any[]): any[];
/**
* Parses polygon positions to array
* @param positions
* @param loop
* @returns {[][]}
*/
static parsePolygonCoordToArray(positions: any[], loop?: boolean): any[][];
}
declare class PathEvent extends Event_2 {
constructor();
/**
*
* @private
*/
_registerEvent(): void;
}
/**
* 平面
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let plane = new BC.Plane(position, 20, 30, { normal: 'x' })
* ```
*/
export declare class Plane extends Overlay {
private _position;
private _width;
private _height;
private _normal;
private _distance;
/**
*
* @param position 坐标
* @param width 宽度
* @param height 高度
* @param plane 面板格式
*/
constructor(position: T_Position, width: number, height: number, plane?: any);
get type(): any;
set position(position: T_Position);
get position(): T_Position;
set width(width: number);
get width(): number;
set height(height: number);
get height(): number;
set distance(distance: number);
get distance(): number;
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {Plane}
* @example
* ```json
* // 样式参数(可选)
* {
* "fill": true, //是否用提供的材料填充多边形。
* "material": BC.Color.WHITE, //材质
* "outline": false, //是否显示边框
* "outlineColor": BC.Color.BLACK, //边框颜色
* "outlineWidth": 0, //边框宽度
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* } //根据距离设置可见
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 三维场景中的辅助工具,方便在场景中进行标绘、位置编辑
* @noInheritDoc
* @example
* ```ts
* let plot = new BC.Plot(viewer, {})
* plot.draw(BC.OverlayType.POINT, (overlay) => {}, {})
* ```
*/
export declare class Plot {
private _viewer;
private _options;
private _layer;
private _currentWorker;
private _state;
/**
*
* @param viewer - 场景
* @param options - 属性
* @example
* ```json
* //属性参数(可选)
* {
* "icon_center": "**.png", // 自定义的中心点图标
* "icon_anchor": "**.png", //自定义的锚点图标
* "icon_midAnchor": "**.png", //自定义的中心锚点图标
* "icon_size": [12, 12],//自定义的中心锚点大小
* "clampToModel":false // 点位是否获取模型表面坐标
* }
* ```
*/
constructor(viewer: Viewer, options?: {});
/**
* @hidden
*/
get viewer(): Viewer;
/**
* @hidden
*/
get layer(): Cesium.CustomDataSource;
/**
* @hidden
*/
get state(): string;
/**
*
* @param type - 类型
* @param style - 风格
* @private
*/
private _createDrawWorker;
/**
*
* @param overlay - 覆盖物
* @private
*/
private _createEditWorker;
/**
*
* @param type - 绘制类型
* @param callback - 标绘完成的回调函数,参数为overlay
* @param style - 标绘的覆盖物样式设置
* @param clampToModel - 点位是否获取模型表面坐标
* @returns {Plot}
*/
draw(type: string, callback: Function, style?: any, clampToModel?: boolean): this;
/**
*
* @param overlay - 覆盖物对象
* @param callback - 标绘完成的回调函数,参数为overlay
* @param clampToModel - 点位是否获取模型表面坐标
* @returns {Plot}
*/
edit(overlay: Overlay, callback: Function, clampToModel?: boolean): this;
/**
* 停止绘制
*/
stop(): any;
/**
* @hidden
*/
destroy(): this;
}
export declare class PlotUtil {
/**
* 计算两点距离
* @param pnt1
* @param pnt2
* @returns {number}
*/
static distance(pnt1: any, pnt2: any): number;
/**
* @param points
* @returns {number}
*/
static wholeDistance(points: any): number;
/**
* @param points
* @returns {number}
*/
static getBaseLength(points: any): number;
/**
* @param pnt1
* @param pnt2
* @returns {number[]}
*/
static mid(pnt1: any, pnt2: any): number[];
/**
* @param pnt1
* @param pnt2
* @param pnt3
* @returns {[*, *]|[*, *]|[*, number]}
*/
static getCircleCenterOfThreePoints(pnt1: any, pnt2: any, pnt3: any): any[];
/**
* @param pntA
* @param pntB
* @param pntC
* @param pntD
* @returns {(*|number)[]|*[]}
*/
static getIntersectPoint(pntA: any, pntB: any, pntC: any, pntD: any): any[];
/**
* @param startPnt
* @param endPnt
* @returns {number}
*/
static getAzimuth(startPnt: any, endPnt: any): any;
/**
* @param pntA
* @param pntB
* @param pntC
* @returns {number}
*/
static getAngleOfThreePoints(pntA: any, pntB: any, pntC: any): number;
/**
* @param pnt1
* @param pnt2
* @param pnt3
* @returns {boolean}
*/
static isClockWise(pnt1: any, pnt2: any, pnt3: any): boolean;
/**
* @param t
* @param startPnt
* @param endPnt
* @returns {*[]}
*/
static getPointOnLine(t: any, startPnt: any, endPnt: any): any[];
/**
* @param t
* @param startPnt
* @param cPnt1
* @param cPnt2
* @param endPnt
* @returns {number[]}
*/
static getCubicValue(t: any, startPnt: any, cPnt1: any, cPnt2: any, endPnt: any): number[];
/**
* @param startPnt
* @param endPnt
* @param angle
* @param distance
* @param clockWise
* @returns {*[]}
*/
static getThirdPoint(startPnt: any, endPnt: any, angle: any, distance: any, clockWise: any): any[];
/**
* @param center
* @param radius
* @param startAngle
* @param endAngle
* @returns {[]}
*/
static getArcPoints(center: any, radius: any, startAngle: any, endAngle: any): any[];
/**
* @param t
* @param pnt1
* @param pnt2
* @param pnt3
* @returns {*[][]}
*/
static getBisectorNormals(t: any, pnt1: any, pnt2: any, pnt3: any): any[];
/**
* @param pnt1
* @param pnt2
* @param pnt3
* @returns {number[]}
*/
static getNormal(pnt1: any, pnt2: any, pnt3: any): number[];
/**
* @param t
* @param controlPoints
* @returns {[]}
*/
static getCurvePoints(t: any, controlPoints: any): any[];
/**
* @description: 获取两点的垂直夹角
* @param {type}
* @return:
*/
static getAnglePitch(from: Cesium.Cartesian3, to: Cesium.Cartesian3): number;
/**
* @param t
* @param controlPoints
* @returns {number[]}
*/
static getLeftMostControlPoint(t: any, controlPoints: any): any[];
/**
* @param t
* @param controlPoints
* @returns {number[]}
*/
static getRightMostControlPoint(t: any, controlPoints: any): any[];
/**
* @param points
* @returns {[]|*}
*/
static getBezierPoints(points: any): any;
/**
*
* @param n
* @param index
* @returns {number}
*/
static getBinomialFactor(n: any, index: any): number;
/**
* @param n
* @returns {number}
*/
static getFactorial(n: any): number;
/**
* @param points
* @returns {[]|*}
*/
static getQBSplinePoints(points: any): any;
/**
* @param k
* @param t
* @returns {number}
*/
static getQuadricBSplineFactor(k: any, t: any): number;
}
/**
* 圆
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let point = new BC.Point(position)
* point.setStyle({
* pixelSize: 10,
* })
* ```
*/
export declare class Point extends Overlay {
private _position;
/**
*
* @param position 坐标
*/
constructor(position: T_Position);
get type(): any;
set position(position: T_Position);
get position(): T_Position;
_mountedHook(): void;
/**
* Set style
* @param style
* @returns {Point}
* @example
* ```json
* // 样式参数(可选)
* {
* "pixelSize": 1, //像素大小
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "color": BC.Color.WHITE, //颜色
* "outlineColor": BC.Color.WHITE, //边框颜色
* "outlineWidth": 0, //边框大小,
* "scaleByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置比例
* "translucencyByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置透明度
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "disableDepthTestDistance": 0 // 深度检测距离,用于防止剪切地形,设置为零时,将始终应用深度测试。设置为Number.POSITIVE_INFINITY时,永远不会应用深度测试。
* }
* ```
*/
setStyle(style: any): this;
/**
* Entity 转换为 Overlay
* @param entity
* @returns {Point}
*/
static fromEntity(entity: Cesium.Entity): Point | undefined;
}
/**
* 点图元
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let point = new BC.PointPrimitive(position)
* point.setStyle({
* pixelSize: 10,
* })
* ```
*/
export declare class PointPrimitive extends Overlay {
private _position;
/**
*
* @param position 坐标
*/
constructor(position: T_Position);
get type(): any;
set position(position: T_Position);
get position(): T_Position;
_mountedHook(): void;
/**
* Set style
* @param style
* @returns {PointPrimitive}
* @example
* ```json
* // 样式参数(可选)
* {
* "pixelSize": 1, //像素大小
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "color": BC.Color.WHITE, //颜色
* "outlineColor": BC.Color.WHITE, //边框颜色
* "outlineWidth": 0, //边框大小,
* "scaleByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置比例
* "translucencyByDistance": {
* "near": 0, //最近距离
* "nearValue": 0, //最近距离值
* "far": 1, //最远距离值
* "farValue": 0 //最远距离值
* }, //根据距离设置透明度
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "disableDepthTestDistance": 0 // 深度检测距离,用于防止剪切地形,设置为零时,将始终应用深度测试。设置为Number.POSITIVE_INFINITY时,永远不会应用深度测试。
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 面
* @noInheritDoc
* @example
* ```ts
* let polygon = new BC.Polygon('120,20;120,30;122,30')
* polygon.setStyle({
* height: 10,
* })
* ```
*/
export declare class Polygon extends Overlay {
private _positions;
private _holes;
/**
*
* @param positions 坐标串
*/
constructor(positions: string | T_Position[]);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
set holes(holes: T_Position[][]);
get holes(): T_Position[][];
get center(): Position;
get area(): number;
/**
*
* @private
*/
private _computeHierarchy;
_mountedHook(): void;
/**
* Sets text
* @param text
* @param textStyle
* @returns {Polygon}
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @returns {Polygon}
* @example
* ```json
* // 样式参数(可选)
* {
* "height": 1, //高度
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "extrudedHeight": 0, //拉升高度
* "stRotation": 0, //旋转角度
* "fill": true, //是否用提供的材料填充多边形。
* "material": BC.Color.WHITE, //材质
* "outline": false, //是否显示边框
* "outlineColor": BC.Color.BLACK, //边框颜色
* "outlineWidth": 0, //边框宽度
* "closeTop": true, //顶面是否闭合
* "closeBottom": true, //底面是否闭合
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* "zIndex": 0 //层级
* }
* ```
*/
setStyle(style: any): this;
/**
* 单独处理贴地行为,0:贴地形、1:贴3D切片、2:两者都贴、-1:都不贴
* @param classificationType
* @returns {Polygon}
*/
dealClamp(classificationType: any): void;
/**
* Entity 转换为 Overlay
* @param entity
* @returns {Polygon}
*/
static fromEntity(entity: Cesium.Entity): Polygon | undefined;
}
/**
* 线
* @noInheritDoc
* @example
* ```ts
* let polyline = new BC.Polyline('120,20;120,30')
* polyline.setStyle({
* width: 10,
* })
* ```
*/
export declare class Polyline extends Overlay {
private _positions;
/**
*
* @param positions 坐标串
*/
constructor(positions: string | T_Position[]);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
get center(): Position;
get distance(): number;
_mountedHook(): void;
/**
* Sets Text
* @param text
* @param textStyle
* @returns {Polyline}
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @returns {Polyline}
* @example
* ```json
* // 样式参数(可选)
* {
* "width": 1, //线宽
* "material": BC.Color.WHITE, //材质
* "clampToGround": false, //是否贴地
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* "zIndex": 0 //层级
* }
* ```
*/
setStyle(style: any): this;
/**
* Entity 转换为 Overlay
* @param entity
* @returns {Polyline}
*/
static fromEntity(entity: Cesium.Entity): Polyline | undefined;
}
export declare const PolylineArrowMaterialProperty: typeof globalThis.Cesium.PolylineArrowMaterialProperty;
export declare const PolylineDashMaterialProperty: typeof globalThis.Cesium.PolylineDashMaterialProperty;
/**
* 放射线材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.PolylineEmissionMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class PolylineEmissionMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* @param options 属性
* @param options.color 颜色
*/
constructor(options?: {
color: Cesium.Color;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 闪烁线材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.PolylineFlickerMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class PolylineFlickerMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 流动线材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.PolylineFlowMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class PolylineFlowMaterialProperty extends MaterialProperty {
private _percent;
private _percentSubscription;
private _gradient;
private _gradientSubscription;
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
/**
* 比例
*/
percent: number;
/**
* 透明程度
*/
gradient: number;
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
/**
* 比例
*/
percent: number;
/**
* 透明程度
*/
gradient: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
export declare const PolylineGlowMaterialProperty: typeof globalThis.Cesium.PolylineGlowMaterialProperty;
/**
* 图片轨迹线材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.PolylineImageTrailMaterialProperty({
* color: BC.Color.WHITE,
* image: '**\/*.png',
* repeat: { x: 10, y: 1 },
* })
* ```
*/
export declare class PolylineImageTrailMaterialProperty extends MaterialProperty {
private _image;
private _imageSubscription;
private _repeat;
private _repeatSubscription;
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
/**
* 图片地址
*/
image: string;
/**
* 重复规则
*/
repeat: Cesium.Cartesian2;
/**
* 属性
* @param options
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
/**
* 图片地址
*/
image: string;
/**
* 重复规则
*/
repeat: Cesium.Cartesian2;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 发光线材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.PolylineLightingMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class PolylineLightingMaterialProperty extends MaterialProperty {
private _image;
private _imageSubscription;
/* Excluded from this release type: image */
/**
* 颜色
*/
color: Cesium.Color;
constructor(options?: {
/**
* 颜色
*/
color: Cesium.Color;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 发光轨迹线材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.PolylineLightingTrailMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class PolylineLightingTrailMaterialProperty extends MaterialProperty {
private _image;
private _imageSubscription;
/* Excluded from this release type: image */
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
export declare const PolylineOutlineMaterialProperty: typeof globalThis.Cesium.PolylineOutlineMaterialProperty;
/**
* 线图元
* @noInheritDoc
* @example
* ```ts
* let polyline = new BC.PolylinePrimitive('120,20;120,30')
* polyline.setStyle({
* width: 10,
* })
* ```
*/
export declare class PolylinePrimitive extends Overlay {
private _positions;
/**
*
* @param positions 坐标串
*/
constructor(positions: T_Position[]);
get type(): any;
set positions(positions: T_Position[]);
get positions(): T_Position[];
get center(): Position;
get distance(): number;
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {PolylinePrimitive}
* @example
* ```json
* // 样式参数(可选)
* {
* "width": 1, //线宽
* "material": BC.Color.WHITE, //材质
* "clampToGround": false, //是否贴地
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* "zIndex": 0 //层级
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 颜色轨迹线材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.PolylineTrailMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class PolylineTrailMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 管道
* @noInheritDoc
* @example
* ```ts
* function computeCircle(radius) {
* var positions = []
* for (var i = 0; i < 360; i++) {
* var radians = BC.Math.toRadians(i)
* positions.push({
* x: radius * Math.cos(radians),
* y: radius * Math.sin(radians),
* })
* }
* return positions
* }
*
* let polylineVolume = new BC.PolylineVolume(
* '-90.0,32.0,0.0;-90.0,36.0,100000.0;-94.0,36.0,0.0;',
* computeCircle(60000)
* )
* ```
*/
export declare class PolylineVolume extends Overlay {
private _positions;
private _shape;
/**
*
* @param positions 坐标串
* @param shape 形状
*/
constructor(positions: string | T_Position[], shape: Cesium.Property | Array);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
set shape(shape: Cesium.Property | Array);
get shape(): Cesium.Property | Array;
_mountedHook(): void;
/**
*
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @returns {PolylineVolume}
* @example
* ```json
* // 样式参数(可选)
* {
* "cornerType": 0, //转角类别,0:圆角、1:直角、2:斜角
* "fill": true, //是否用提供的材料填充多边形。
* "material": BC.Color.WHITE, //材质
* "outline": false, //是否显示边框
* "outlineColor": BC.Color.BLACK, //边框颜色
* "outlineWidth": 0, //边框宽度
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* } //根据距离设置可见
* }
* ```
*/
setStyle(style: any): this;
/**
* Parses from entity
* @param entity
* @param shape
* @returns {PolylineVolume|any}
*/
static fromEntity(entity: Cesium.Entity, shape: Cesium.Property | Array): PolylineVolume | undefined;
}
export declare class PolylineVolumePrimitive extends Overlay {
private _positions;
private _shape;
/**
*
* @param positions 坐标串
* @param holes 空心坐标串
*/
constructor(positions: string | T_Position[], shape: any[]);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
/**
*
* @private
*/
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {WaterPrimitive}
* @example
* ```json
* // 样式参数(可选)
* {
* "height": 1, //高度
* "extrudedHeight": 0, //拉升高度
* "stRotation": 0, //旋转角度
* "outline": false, //是否显示边框
* "closeTop": true, //顶面是否闭合
* "closeBottom": true, //底面是否闭合
* "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* "baseWaterColor": Color.WHITE, // 水体颜色
* "blendColor": Color.WHITE, // 混合颜色
* "specularMap": "", // 镜面图
* "normalMap": "", // 法线图
* "frequency": 1000, //波纹数量
* "animationSpeed": 0.03, // 动画速度
* "amplitude": 10, //水波振幅
* "specularIntensity": 10 //镜面反射强度
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 气泡窗口
* @noInheritDoc
* @example
* ```ts
* let popup = viewer.popup
* popup.setContent('')
* ```
*/
declare class Popup extends Widget {
/**
* 配置
* @example
* ```json
* // 配置(可选)
* // 配置后会影响全局的popup的显示样式,请慎重。
* {
* "position": "center", // popup的位于鼠标的点击位置的方向,有:center,left ,right
* "customClass": "custom" // 添加自定义的Css 类名到popup中,多个用空格隔开
* }
* ```
*/
private _config;
private _position;
/**
* @hidden
*/
constructor();
/**
* @hidden
*/
get type(): any;
/**
* @hidden
*/
set config(config: any);
/**
* binds event
* @private
*/
_bindEvent(): void;
/**
*
* @private
*/
_mountContent(): void;
/**
*
* @private
*/
_installHook(): void;
/**
*
* @param windowCoord
* @private
*/
_updateWindowCoord(windowCoord: any): void;
/**
*
* @private
*/
_setCustomClass(): void;
/**
* Setting wrapper
* @param wrapper
* @returns {Widget}
*/
setWrapper(wrapper: any): this;
/**
*
* Setting widget position
* @param {*} position
*
*/
setPosition(position: any): this;
/**
*
* @param {*} position
* @param {*} content
*/
showAt(position: any, content: any): this;
}
export declare class Position {
_lng: number;
_lat: number;
_alt: number;
_heading: number;
_pitch: number;
_roll: number;
constructor(lng?: number, lat?: number, alt?: number, heading?: number, pitch?: number, roll?: number);
set lng(lng: number);
get lng(): number;
set lat(lat: number);
get lat(): number;
set alt(alt: number);
get alt(): number;
set heading(heading: number);
get heading(): number;
set pitch(pitch: number);
get pitch(): number;
set roll(roll: number);
get roll(): number;
/**
*
* @returns {string}
*/
serialize(): string;
/**
* Calculate the distance between two positions
* @param target
* @returns {number}
*/
distance(target: any): number;
/**
* clone a position
* @returns {Position}
*/
clone(): Position;
/**
* clone a position
* @deprecated
* @returns {Position}
*/
copy(): Position;
/**
*
* @returns {*[]}
*/
toArray(): any[];
/**
*
* @returns {string}
*/
toString(): string;
/**
*
* @returns {{lng, heading, alt, roll, pitch, lat}}
*/
toObject(): {
lng: any;
heading: any;
alt: any;
roll: any;
pitch: any;
lat: any;
};
/**
*
* @param arr
* @returns {Position}
*/
static fromArray(arr: number[] | string[]): Position;
/**
*
* @param str
* @returns {Position}
*/
static fromString(str: string): Position;
/**
*
* @param obj
* @returns {Position}
*/
static fromObject(obj: {
lng: number;
lat: number;
alt: number;
heading: number;
pitch: number;
roll: number;
}): Position;
/**
* Deserialize
* @param valStr
* @returns {Position}
*/
static deserialize(valStr: string): Position;
}
/**
* 图元图层,用于添加各类图元数据,将图元数据按一定的逻辑分组,方便统一管理
* @noInheritDoc
* @example
* ```ts
* let layer = new BC.PrimitiveLayer('id')
* viewer.addLayer(layer)
* ```
*/
export declare class PrimitiveLayer extends Layer {
private _points;
private _labels;
private _billboards;
private _polylines;
private _clouds;
/**
* @param id 图层唯一标识
*/
constructor(id: any);
/**
* 类型
*/
get type(): string;
/**
* 点图元数据集合
*/
get points(): any;
/**
* 标签图元数据集合
*/
get labels(): any;
/**
* 广告牌图元数据集合
*/
get billboards(): any;
/**
* 线图元数据集合
*/
get polylines(): any;
/**
* 云数据集合
*/
get clouds(): any;
add(): void;
/**
* 清除图层
*/
clear(): PrimitiveLayer;
setStyle(style: any): void;
}
/**
* 雷达线材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.RadarLineMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class RadarLineMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 雷达扫描
* @example
* ```ts
* let radarScan = new BC.RadarScan(viewer, '120, 20', 200)
* radarScan.start()
* ```
*/
export declare class RadarScan extends Animation_2 {
private _position;
private _radius;
private _color;
private _speed;
private _delegate;
/**
* @param viewer 3D场景
* @param position 雷达位置
* @param radius 扫描半径
* @param options 选项
*/
constructor(viewer: Viewer, position: Position | string | string[] | number[], radius: number, options?: any);
/* Excluded from this release type: type */
protected _bindEvent(): void;
protected _unbindEvent(): void;
private _mountContent;
/**
* 开始
*/
start(): this;
/**
* 停止
*/
stop(): this;
}
/**
* 扫描雷达材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.RadarSweepMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class RadarSweepMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 波纹雷达材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.RadarWaveMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class RadarWaveMaterialProperty extends MaterialProperty {
/**
* 颜色
*/
color: Cesium.Color;
/**
* 速度
*/
speed: number;
/**
* @param options 属性
*/
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 雨天效果
* @example
* ```ts
* viewer.weather.rain.enable = true
* viewer.weather.rain.speed = 2
* ```
*/
export declare class Rain {
private _id;
private _viewer;
private _delegate;
private _enable;
private _speed;
private _mixNum;
private _state;
constructor();
/**
* 类型
*/
get type(): string;
/**
* 是否启用
*/
set enable(enable: boolean);
get enable(): boolean;
/**
* 速度
*/
set speed(speed: number);
get speed(): number;
set mixNum(mixNum: number);
get mixNum(): number;
/**
*
*/
private _createPostProcessStage;
/* Excluded from this release type: addTo */
}
export declare const Rect: typeof globalThis.Cesium.Rectangle;
/**
* 矩形
* @noInheritDoc
* @example
* ```ts
* let rectangle = new BC.Rectangle('-90.0,32.0;-94.0,36.0;')
* ```
*/
export declare class Rectangle extends Overlay {
private _positions;
/**
*
* @param positions 坐标串
*/
constructor(positions: string | T_Position[]);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
_mountedHook(): void;
/**
* @param text
* @param textStyle
* @returns {Rectangle}
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @returns {Rectangle}
* @example
* ```json
* // 样式参数(可选)
* {
* "height": 1, //高度
* "heightReference": 0, //高度参照,0:位置无参照,位置是绝对的,1:位置固定在地形上 2:位置高度是指地形上方的高度。
* "extrudedHeight": 0, //拉升高度
* "rotation": 0, //顺时针旋转角度
* "stRotation": 0, //逆时针旋转角度
* "fill": true, //是否用提供的材料填充多边形。
* "material": BC.Color.WHITE, //材质
* "outline": false, //是否显示边框
* "outlineColor": BC.Color.BLACK, //边框颜色
* "outlineWidth": 0, //边框宽度
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* "zIndex": 0 //层级
* }
* ```
*/
setStyle(style: any): this;
}
export declare class RiverPrimitive extends Overlay {
private _positions;
private _holes;
/**
*
* @param positions 坐标串
*/
constructor(positions: string | T_Position[], style: any);
get type(): any;
set positions(positions: string | T_Position[]);
/**
* 坐标
*/
get positions(): string | T_Position[];
/**
* 高度
*/
get height(): number;
set height(value: number);
/**
* 颜色
*/
get baseWaterColor(): Cesium.Color;
set baseWaterColor(value: Cesium.Color);
protected _mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {RiverPrimitive}
* @example
* ```json
* // 样式参数(可选)
* {
* "height": 1, //高度
* "stRotation": 0, //旋转角度
* "outline": false, //是否显示边框
* "closeTop": true, //顶面是否闭合
* "closeBottom": true, //底面是否闭合
* "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* "baseWaterColor": BC.Color.WHITE, // 水体颜色
* "blendColor": BC.Color.WHITE, // 混合颜色
* "specularMap": "", // 镜面图
* "normalMap": "", // 法线图
* "frequency": 1000, //波纹数量
* "animationSpeed": 0.03, // 动画速度
* "amplitude": 10, //水波振幅
* "specularIntensity": 10 //镜面反射强度
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 漫游控制
* @example
* ```ts
* let rc = new BC.RoamingController(viewer)
* ```
*/
export declare class RoamingController {
private _viewer;
private _viewOption;
private _cache;
private _activedPath;
/**
* @param viewer 3D 场景
*/
constructor(viewer: Viewer);
/**
*
* @returns {boolean}
* @private
*/
private _onPostRender;
/**
* 添加路径
* @param path 路径
* @returns {RoamingController}
*/
addPath(path: RoamingPath): RoamingController;
/**
* 添加路径数组
* @param paths 路径数组
* @returns {RoamingController}
*/
addPaths(paths: RoamingPath[]): RoamingController;
/**
* 移除路径
* @param path
* @returns {RoamingController}
*/
removePath(path: RoamingPath): RoamingController;
/**
* 根据唯一标识获取路径
* @param id 唯一标识
* @returns {*|undefined}
*/
getPath(id: string): RoamingPath | undefined;
/**
* 获取所有路径
* @returns 返回漫游控制下的所有路径
*/
getPaths(): RoamingPath[];
/**
* 激活漫游
* @param path 路径
* @param onProcess 进度回调
* @returns {RoamingController}
* @example
* ```ts
* // 漫游参数(可选)
* {
* "pitch": 0, // 俯仰角
* "range": 1000 // 距离
* }
* ```
*/
activate(path: RoamingPath, _onProgress?: (process: number) => void): RoamingController;
pause(): void;
/**
* 结束漫游
* @returns {RoamingController}
*/
deactivate(): RoamingController;
/**
* 移除所有路径
* @returns {RoamingController}
*/
clear(): RoamingController;
}
/**
* 漫游路径
* @example
* ```ts
* let path = new BC.RoamingPath('120.121,32.1213;121.132,32.1213', 20)
* rc.addPath(path)
* ```
*/
export declare class RoamingPath {
private _id;
private _bid;
private _positions;
private _speed;
private _timeLine;
private _sampledPosition;
private _velocityOrientation;
private _actived;
private _startTime;
private _endTime;
private _currentTime;
private _pathEvent;
private _state;
private _viewer;
private _heading;
private _pitch;
private _range;
private _preState;
private _progress;
private _onProgress;
/**
*
* @param positions 坐标串
* @param duration 间隔时间,单位:秒
* @param pathMode 路径模式:speed(匀速) / time(等时)
*/
constructor(positions: string | Array, options: {
heading?: number;
pitch?: number;
range?: number;
speed?: number;
});
/**
* 唯一标识
*/
get pathId(): string;
/**
* 业务唯一标识
*/
set id(id: any);
get id(): any;
/**
* 坐标串
*/
set positions(postions: string | Array);
/**
* 获取坐标串
*/
get positions(): Position[];
/**
* 漫游速度,m/s
*/
set speed(speed: any);
get speed(): any;
/**
* 漫游偏航角度
*/
get heading(): number;
set heading(heading: number);
/**
* 漫游俯仰角
*/
get pitch(): number;
set pitch(pitch: number);
/**
* 视角高度
*/
get range(): number;
set range(range: number);
get pathEvent(): PathEvent;
/**
* 是否激活
*/
set actived(actived: boolean);
get actived(): boolean;
/**
* 状态
*/
get state(): string;
/**
* 进度
*/
get progress(): number;
set progress(progress: number);
start(viewer: Viewer, _onProgress?: (process: number) => void): void;
/**
* 暂停
*/
pauseRoam(): void;
/**
* 停止漫游
*/
stopRoam(): void;
private _tickEventFun;
private _endEventFun;
private _onAdd;
private _onRemove;
private changeView;
/**
*
* @param viewer
* @param viewOption
* @private
*/
private _onPostRender;
/**
*
*/
private _resetTimeLine;
private Bearing;
}
/**
* S3M图层
* @example
* ```ts
* let layer = new BC.S3MLayer('id','**.scp')
* viewer.addLayer(layer)
* ```
*/
export declare class S3MLayer extends Layer {
private _url;
private _options;
/**
* @param id 图层唯一标识
* @param url 数据地址
* @param options 属性配置
*/
constructor(id: string, url: string, options?: typeof ConstructorOptions);
/* Excluded from this release type: type */
/**
* 获取当图元准备渲染时解析的Promise
*/
get readyPromise(): Promise;
protected _onAdd(viewer: any): void;
protected _onRemove(): void;
clear(): void;
setStyle(style: any): void;
}
/**
* 扫描圆图元
* @noInheritDoc
* @example
* ```ts
* let scanCirclePrimitive = new BC.ScanCirclePrimitive('120,20', 1000)
* ```
*/
export declare class ScanCirclePrimitive extends Overlay {
private _position;
private _radius;
/**
*
* @param position 坐标
* @param radius 半径
*/
constructor(position: T_Position, radius: number);
get type(): any;
set position(position: T_Position);
get position(): T_Position;
set radius(radius: number);
get radius(): number;
/**
*
* @private
*/
private _setAppearance;
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {ScanCirclePrimitive}
* @example
* ```json
* // 样式参数(可选)
* {
* "speed": 5, //速度
* "color": BC.Color.WHITE //颜色
* }
* ```
*/
setStyle(style?: any): this;
}
export declare enum SceneEventType {
CAMERA_MOVE_END = "cameraMoveEnd",
CAMERA_CHANGED = "cameraChanged",
PRE_UPDATE = "preUpdate",
POST_UPDATE = "postUpdate",
PRE_RENDER = "preRender",
POST_RENDER = "postRender",
MORPH_COMPLETE = "morphComplete",
CLOCK_TICK = "clockTick",
RENDER_ERROR = "renderError"
}
export declare const SceneMode: typeof globalThis.Cesium.SceneMode;
/**
* 场景分割
* @noInheritDoc
* @example
* ```ts
* let tileset = new BC.Tileset('tileset.json')
* tileset.setSplitDirection(1)
* viewer.sceneSplit.enable = true
* viewer.sceneSplit.addTileset(tileset)
* ```
*/
declare class SceneSplit extends Widget {
private _tileset;
private _baseLayer;
private _moveActive;
/**
* @hidden
*/
constructor();
/**
* @hidden
*/
get type(): any;
/**
*
* @private
*/
_installHook(): void;
/**
*
* @private
*/
_bindEvent(): void;
/**
*
* @private
*/
_unbindEvent(): void;
/**
*
* @private
*/
_mountContent(): void;
/**
*
* @param movement
* @private
*/
_moveHandler(movement: any): void;
/**
*
* @param tileset
* @return {SceneSplit}
*/
addTileset(tileset: any): this;
/**
*
* @param baseLayer
* @returns {SceneSplit}
*/
addBaseLayer(baseLayer: any): this;
}
export declare const ShadowMode: typeof globalThis.Cesium.ShadowMode;
/**
* 描边效果
* @example
* ```ts
* viewer.effect.silhouette.enable = true
* ```
*/
export declare class Silhouette {
private _viewer;
private _delegate;
private _enable;
private _color;
private _length;
private _selected;
private _state;
constructor();
/**
* 类型
* @ignore
*/
get type(): string;
/**
* 是否启用
*/
set enable(enable: boolean);
get enable(): boolean;
/**
* 颜色
*/
set color(color: Cesium.Color);
get color(): Cesium.Color;
/**
* 长度
*/
set length(length: number);
get length(): number;
/**
* 设置后期作用的覆盖物
*/
set selected(selected: any[]);
get selected(): any[];
/**
*
* @private
*/
private _createPostProcessStage;
/**
* 添加效果
* @param viewer
* @returns {Silhouette}
* @ignore
*/
addTo(viewer: Cesium.Viewer): Silhouette;
}
export declare const SkyBox: typeof globalThis.Cesium.SkyBox;
export declare class SkyLine {
_viewer: Viewer;
postProccessStageComposite: Cesium.PostProcessStageComposite;
constructor();
get viewer(): Viewer;
closeSkyLine(): void;
openSkyLine(customWidth: number): void;
destroy(): void;
/**
*
* @param viewer
*/
install(viewer: Viewer): void;
uninstall(viewer: any): void;
}
export declare class SlightLine {
_viewer: any;
_db: Cesium.CustomDataSource;
_plot: Plot;
_depthFailMaterial: any;
_visibleColor: any;
_hiddenColor: any;
constructor(options: any);
get viewer(): any;
get db(): Cesium.CustomDataSource;
get plot(): Plot;
get visibleColor(): any;
set visibleColor(val: any);
get hiddenColor(): any;
set hiddenColor(val: any);
get depthFailMaterial(): any;
set depthFailMaterial(val: any);
drawLine(): void;
add(origin: any, target: any): Cesium.Entity[];
clear(): void;
destroy(): void;
/**
*
* @param viewer
*/
install(viewer: Viewer): void;
uninstall(viewer: any): void;
}
export declare class SlopeAspect {
_viewer: Viewer;
_db: Cesium.CustomDataSource;
constructor();
get viewer(): Viewer;
GetSubRectangles(positions: Position[], precision?: number): any[];
pointInPolygon(point: any, polygon: any): any;
getPolygonSlopeFromTerrain(positions: Position[]): string;
computePolygonHeightRange(e: any): {
maxHeight: number;
minHeight: number;
maxPoint: any;
minPoint: any;
};
computeRectangleBounds(rectangle: Cesium.Rectangle): Position[];
splitPositions(positions: any, splitCount: any): any;
destroy(): void;
get db(): Cesium.CustomDataSource;
clear(): void;
/**
*
* @param viewer
*/
install(viewer: Viewer): void;
uninstall(viewer: any): void;
}
/**
* 雪天效果
* @example
* ```ts
* viewer.weather.snow.enable = true
* viewer.weather.snow.speed = 2
* ```
*/
export declare class Snow {
private _id;
private _viewer;
private _delegate;
private _enable;
private _speed;
private _state;
constructor();
/**
* 类型
*/
get type(): string;
/**
* 是否启用
*/
set enable(enable: boolean);
get enable(): boolean;
/**
* 速度
*/
set speed(speed: number);
get speed(): number;
/**
*
* @private
*/
private _createPostProcessStage;
/* Excluded from this release type: addTo */
}
export declare class Sunshine extends Event_2 {
_viewer: Viewer;
_interval: any;
_currentTime: number;
constructor();
get viewer(): Viewer;
get currentTime(): number;
set currentTime(val: number);
closeSunshine(): void;
openSunshine(option: any): void;
destroy(): void;
/**
*
* @param viewer
*/
install(viewer: Viewer): void;
uninstall(viewer: any): void;
}
export declare type T_Position = string | Position | string[] | number[];
/**
* 燕尾箭头
* @noInheritDoc
* @example
* ```ts
* let tailedAttackArrow = new BC.TailedAttackArrow('-90.0,32.0;-94.0,36.0;-94.0,38.0')
* ```
*/
export declare class TailedAttackArrow extends Overlay {
/**
* @hidden
*/
private _positions;
/**
* @hidden
*/
private headHeightFactor;
/**
* @hidden
*/
private headWidthFactor;
/**
* @hidden
*/
private neckHeightFactor;
/**
* @hidden
*/
private neckWidthFactor;
/**
* @hidden
*/
private tailWidthFactor;
/**
* @hidden
*/
private headTailFactor;
/**
* @hidden
*/
private swallowTailFactor;
/**
* @hidden
*/
private _primitive;
/**
* @param {T_Position} positions
* @return {*}
*/
constructor(positions: T_Position[]);
get type(): any;
set positions(positions: T_Position[]);
get positions(): T_Position[];
protected _updatePrimitive(): void;
_getArrowPoints(positions: any): any[];
_getArrowHeadPoints(points: any, tailLeft: any, tailRight: any): any[];
protected _getArrowBodyPoints(points: any, neckLeft: any, neckRight: any, tailWidthFactor: any): any[];
protected _getHierarchy(): Cesium.PolygonHierarchy;
_mountedHook(): void;
setLabel(text: string, textStyle: any): this;
/**
* 设置箭头风格
* 详情参考:@see {@link Polygon}
* @param style
* @returns {TailedAttackArrow}
*/
setStyle(style: any): this;
}
declare class TdtImageryProvider extends Cesium_2.UrlTemplateImageryProvider {
constructor(options?: any);
}
declare class TencentImageryProvider extends Cesium_2.UrlTemplateImageryProvider {
constructor(options?: any);
}
/**
* 地形工厂, 用于创建地形
* @example
* ```ts
* let terrain = BC.ImageryLayerFactory.createUrlTerrain({
* url: '****',
* })
* viewer.addTerrain(terrain)
* ```
*/
export declare class TerrainFactory {
/**
* 创建默认地形
* @param options 属性
* @returns
*/
static createEllipsoidTerrain(options: any): Cesium.EllipsoidTerrainProvider;
/**
* 根据 url 创建地形
* @param options
* @returns
*/
static createUrlTerrain(options: any): Cesium.CesiumTerrainProvider;
/**
* 创建谷歌地形
* @param options
* @returns
*/
static createGoogleTerrain(options: any): Cesium.GoogleEarthEnterpriseTerrainProvider;
/**
* 创建 Arcgis 地形
* @param options
* @returns
*/
static createArcgisTerrain(options: any): Cesium.ArcGISTiledElevationTerrainProvider;
/**
* 创建 VR 地形
* @param options
* @returns
*/
static createVRTerrain(options: any): Cesium.VRTheWorldTerrainProvider;
/**
* 根据类型创建地形
* @param type 类型,参考:BC.TerrainType
* @param options 属性
* @returns {any}
*/
static createTerrain(type: any, options: any): any;
}
/**
* 地形类型
*/
export declare enum TerrainType {
/**
* 无地形
*/
NONE = "none",
/**
* xyz 格式地形
*/
XYZ = "xyz",
/**
* 谷歌地形
*/
ARCGIS = "arcgis",
/**
* arcgis 地形
*/
GOOGLE = "google",
/**
* VR 地形
*/
VR = "vr"
}
/**
* tiles模型
* @noInheritDoc
* @example
* ```ts
* let position = new BC.Position(120, 20)
* let tileset = new BC.Tileset('tileset.json')
* tileset.setPosition(position)
* ```
*/
export declare class Tileset extends Overlay {
private _tileVisibleCallback;
private _properties;
private _fragmentShader;
private _replaceFS;
modelSection: ModelSection;
/**
*
* @param url 地址
* @param options 参数
*/
constructor(url: string, options?: {});
get type(): any;
get readyPromise(): any;
/**
*
* @private
*/
_bindVisibleEvent(): void;
/**
* Updates tile
* @param tile
* @private
*/
_updateTile(tile: any): void;
/**
* Sets position
* @param position
*/
setPosition(position: T_Position): this;
addClippingPlane(position: Position): void;
/**
*
* @param heading
* @param pitch
* @param roll
*/
setHeadingPitchRoll(heading: number, pitch: number, roll: number): this;
/**
*
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* Clamps To Ground
*/
clampToGround(): this;
/**
* Sets height
* @param height
* @param isAbsolute
*/
setHeight(height: number, isAbsolute?: boolean): this;
/**
* Sets scale
* @param scale
*/
setScale(scale: number): this;
/**
* Sets feature property
* @param properties
*/
setProperties(properties: any): this;
/**
* Sets feature FS
* @param fragmentShader
*/
setCustomShader(fragmentShader: any): this;
/**
*
* @param fragmentShader
* @return {Tileset}
*/
replaceFS(fragmentShader: any): this;
/**
*
* @param fragmentShader
*/
appendFS(fragmentShader: any): this;
/**
*
* @param splitDirection
*/
setSplitDirection(splitDirection: any): this;
/**
* 设置风格
* @param style
* @example
* ```js
* let style = new BC.TilesetStyle({
* color: {
* conditions: [
* ['${Height} >= 100', 'color("purple", 0.5)'], //Height 为模型设置的属性
* ['${Height} >= 50', 'color("red")'],
* ['true', 'color("blue")'],
* ],
* },
* show: '${Height} > 0',
* })
* ```
*/
setStyle(style: any): this;
/**
* 压平面集合
*/
get flattenPolygons(): any;
setFlatten(flattens: any): void;
/**
* 压平是否挖坑
* @param discard 是否挖坑
*/
setFlattenDiscard(discard: boolean): void;
}
/**
* tileset压平
* @example
* ```ts
* let flatten = new BC.TilesetFlatten(tileset,{
* height: 700,
* positions: '107.286395196, 29.3973740521; 107.2879760011, 29.3979339817; 107.2904175612, 29.396687132; 107.2903524223, 29.3953845625; 107.2875578653, 29.3948557041; 107.2858593979, 29.3956097313'
* });
* ```
*/
export declare class TilesetFlatten {
private _tileset;
private _flattenPolygon;
/**
* @param tileset 需要压平的tileset
* @param options 属性
*/
constructor(tileset: Tileset, options?: {
/**
* 高度
*/
height: number;
/**
* 压平面坐标点
*/
positions: string | T_Position[];
/**
* 是否启用
*/
enabled: boolean;
});
/**
* 压平面坐标点
*/
get positions(): T_Position[];
set positions(positions: string | T_Position[]);
/**
* 压平面高度
*/
get height(): number;
set height(value: number);
/**
* 是否启用
*/
set enabled(value: boolean);
get enabled(): boolean;
/**
* 销毁压平面
*/
destroy(): void;
}
/**
* 3dTiles 图层,用于添加 3dTiles 模型数据
* @noInheritDoc
* @example
* ```ts
* let layer = new BC.TilesetLayer('id')
* viewer.addLayer(layer)
* ```
*/
export declare class TilesetLayer extends Layer {
/**
* @param id 图层唯一标识
*/
constructor(id: string);
/**
* 类型
*/
get type(): string;
/**
* 清空图层
*/
clear(): TilesetLayer;
setStyle(style: any): void;
}
/**
* 模型分割
* @noInheritDoc
* @example
* ```ts
* let tileset = new BC.Tileset('tileset.json')
* tileset.setSplitDirection(1)
* viewer.tilesetSplit.enable = true
* viewer.tilesetSplit.addTileset(tileset)
* ```
*/
declare class TilesetSplit extends Widget {
private _tileset;
private _moveActive;
/**
* @hidden
*/
constructor();
/**
* @hidden
*/
get type(): any;
/**
*
* @private
*/
_installHook(): void;
/**
*
* @private
*/
_bindEvent(): void;
/**
*
* @private
*/
_unbindEvent(): void;
/**
*
* @private
*/
_mountContent(): void;
/**
*
* @param movement
* @private
*/
_moveHandler(movement: any): void;
/**
*
* @param tileset
* @return {TilesetSplit}
*/
addTileset(tileset: any): this;
}
export declare const TilesetStyle: typeof globalThis.Cesium.Cesium3DTileStyle;
/**
* 提示框
* @noInheritDoc
* @example
* ```ts
* let tooltip = viewer.tooltip
* tooltip.enable = true
* tooltip.showAt({ x: 100, y: 100 }, '测试')
* ```
*/
declare class Tooltip extends Widget {
/**
* @hidden
*/
constructor();
/**
* @hidden
*/
get type(): any;
/**
*
* @private
*/
_installHook(): void;
/**
*
* @param {*} windowCoord
*
*/
_updateWindowCoord(windowCoord: any): void;
/**
*
* @param {*} position
* @param {*} content
*
*/
showAt(position: {
x: number;
y: number;
} | undefined, content: string | Element): this;
}
/**
* TopoJson 图层,用于加载 TopoJson 格式数据
* @noInheritDoc
* @example
* ```ts
* let layer = new BC.GeoJsonLayer('id', '**\/**.geojson')
* layer.eachOverlay((item) => {
* // item 为一个entity,
* if (item.polyline) {
* //todo
* let polyline = BC.Polyline.fromEntity(item)
* }
* if (item.polygon) {
* //todo
* let polygon = BC.Polygon.fromEntity(item)
* }
* if (item.billboard) {
* //todo
* let point = BC.Point.fromEntity(item)
* let divIcon = BC.DivIcon.fromEntity(item)
* let billboard = BC.Billboard.fromEntity(item)
* }
* })
* ```
*/
export declare class TopoJsonLayer extends GeoJsonLayer {
/**
* @param id 图层唯一标识
* @param url 数据地址
* @param options 属性配置
*/
constructor(id: string, url: string, options?: {});
/**
* 类型
*/
get type(): string;
}
/**
* 轨迹
* @example
* ```ts
* let tc = new BC.TrackController(viewer)
* let track = new BC.Track('120.121,32.1213;121.132,32.1213', 20)
* tc.addTrack(track)
* ```
*/
export declare class Track {
private _id;
private _bid;
private _positions;
private _duration;
private _callback;
private _options;
private _controller;
private _sampledPosition;
private _velocityOrientation;
private _viewed;
private _delegate;
private _pathPositions;
private _path;
private _positionIndex;
private _timeLine;
private _startTime;
private _endTime;
private _trackEvent;
private _state;
/**
* @param positions 坐标串
* @param duration 间隔时间,单位:秒
* @param callback 每一个点位到达回调函数,参数有:position(位置信息),isLast(是否为最后的点位)
* @param options 配置参数
*/
constructor(positions: string | Array, duration: number, callback: (position: Position, isLast: boolean) => void, options: typeof DEF_OPTS);
/**
* 唯一标识
*/
get trackId(): string;
/**
* 业务唯一标识
*/
set id(id: any);
get id(): any;
/**
* 坐标串
*/
set positions(postions: any);
get positions(): any;
/**
* 间隔时间,单位:秒
*/
set duration(duration: any);
get duration(): any;
/**
* 开始时间,设置后会独立于控制器的开始时间
*/
set startTime(startTime: any);
get startTime(): any;
set viewed(viewed: boolean);
get viewed(): boolean;
get trackEvent(): TrackEvent_2;
/**
* 状态
*/
get state(): string;
/**
* add to entities
* @param controller
*/
private _onAdd;
/**
* remove from entities
*/
private _onRemove;
/**
*
* @param viewer
* @param viewOption
*/
private _onPostRender;
/**
* Sets camera position
* @param viewer
* @param viewOption
*/
private _setCameraView;
/**
*
* @param params
* @returns {boolean}
*/
private _resetTimeLine;
/**
* 添加点位
* @param position 点位
* @param duration 间隔,单位:秒
* @returns 当前轨迹
*/
addPosition(position: Position | string, duration: number): this;
/**
* 设置模型
* @param modelPath 模型路径
* @param style 样式,详情参考:{@link overlay.Model}
* @returns 当前轨迹
*/
setModel(modelPath: string, style: Object): this;
/**
* 设置图标
* @param icon 图标路径
* @param style 样式,参考:{@link overlay.Billboard}
* @returns 当前轨迹
*/
setBillboard(icon: string, style: Object): this;
/**
* 设置文本
* @param text 文本
* @param style 样式,参考:{@link overlay.Label}
* @returns 当前轨迹
*/
setLabel(text: string, style: Object): this;
/**
* 设置路径
* @param visible 是否可见
* @param style 样式,参考:{@link overlay.Polyline}
* @returns 当前轨迹
*/
setPath(visible: boolean, style?: Object): this;
}
/**
* 历史轨迹控制
* @example
* ```ts
* let tc = new BC.TrackController(viewer)
* ```
*/
export declare class TrackController {
private _viewer;
private _cache;
private _delegete;
private _activedTrack;
private _viewMode;
private _viewOption;
private _stopTime;
private _state;
/**
* @param viewer 3D 场景
*/
constructor(viewer: any);
get delegate(): Cesium.EntityCollection;
get state(): string;
/**
* @private
*/
private _onPostRender;
/**
* 添加轨迹
* @param track 轨迹
* @returns {TrackController}
*/
addTrack(track: Track): TrackController;
/**
* 添加轨迹数组
* @param tracks 轨迹数组
* @returns {TrackController}
*/
addTracks(tracks: Track[]): TrackController;
/**
* 根据业务唯一标识获取轨迹
* @param id 业务唯一标识
* @returns 轨迹
*/
getTrack(id: string): Track | undefined;
/**
* 移除轨迹
* @param track 轨迹
* @returns {TrackController}
*/
removeTrack(track: Track): TrackController;
/**
* 获取所有轨迹
* @returns 轨迹数组
*/
getTracks(): Track[];
/**
* 播放
* @returns {TrackController}
*/
play(): TrackController;
/**
* 暂停
*/
pause(): this;
/**
* 继续播放
*/
restore(): this;
/**
* 跟踪某一条路径
* @param track 路径
* @param viewOption 配置信息
* @returns {TrackController}
* @example
* ```ts
* // 属性参数(可选)
* {
* "mode": null, // 视角模式:BC.TrackViewMode
* "pitch": 0, // 俯仰角,第一视角有效
* "range": 1000 // 距离
* }
* ```
*/
viewTrack(track: Track, viewOption?: any): TrackController;
/**
* 取消跟踪某一条轨迹
* @param track 轨迹
* @returns {TrackController}
*/
releaseTrack(track: Track): TrackController;
/**
* 移除所有路径
* @returns {TrackController}
*/
clear(): TrackController;
}
declare class TrackEvent_2 extends Event_2 {
constructor();
/**
*
* @private
*/
_registerEvent(): void;
}
/**
* 轨迹视角模式
*/
export declare const TrackViewMode: {
/**
* 第一人称视角
*/
FP: string;
/**
* 第三人称视角
*/
TP: string;
/**
* 跟随视角
*/
TRACKED: string;
/**
* 自由视角
*/
FREE: string;
};
/**
* 轨迹线图元
* @noInheritDoc
* @example
* ```ts
* let trailLinePrimitive = new BC.TrailLinePrimitive('120,20;120,30;122,30')
* ```
*/
export declare class TrailLinePrimitive extends Overlay {
private _positions;
private _width;
/**
*
* @param positions 坐标串
* @param width 宽度
*/
constructor(positions: string | T_Position[], width?: number);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
/**
*
* @private
*/
private _setAppearance;
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {TrailLinePrimitive}
* @example
* ```json
* // 样式参数(可选)
* {
* "speed": 5, //速度
* "color": BC.Color.WHITE //颜色
* }
* ```
*/
setStyle(style?: any): this;
}
export declare class Transform {
/**
* Transforms Cartesian To WGS84
* @param cartesian
* @returns {Position}
*/
static transformCartesianToWGS84(cartesian: Cesium.Cartesian3): Position;
/**
* Transforms WGS84 To Cartesian
* @param position
* @returns {Cartesian3}
*/
static transformWGS84ToCartesian(position: Position): Cesium.Cartesian3;
/**
* Transforms WGS84 To Cartographic
* @param position
* @returns {Cartographic}
*/
static transformWGS84ToCartographic(position: {
lng: number;
lat: number;
alt: number;
}): Cesium.Cartographic;
/**
* Transforms Cartesian Array To WGS84 Array
* @param cartesianArr
* @returns {*|*[]}
*/
static transformCartesianArrayToWGS84Array(cartesianArr: any[]): Position[];
/**
* Transforms WGS84 Array To Cartesian Array
* @param WGS84Arr
* @returns {*|*[]}
*/
static transformWGS84ArrayToCartesianArray(WGS84Arr: any[]): Cesium.Cartesian3[];
/**
* Transforms WGS84 To Mercator
* @param position
* @returns {Position}
*/
static transformWGS84ToMercator(position: {
lng: number;
lat: number;
alt: number;
}): Position;
/**
* Transforms Mercator To WGS84
* @param position
* @returns {Position}
*/
static transformMercatorToWGS84(position: {
lng: number;
lat: number;
alt: number;
}): Position;
/**
* Transforms Window To WGS84
* @param position
* @param viewer
* @returns {Position}
*/
static transformWindowToWGS84(position: any, viewer: {
scene: any;
}): Position;
/**
* Transforms WGS84 To Window
* @param position
* @param viewer
* @returns {Cartesian2}
*/
static transformWGS84ToWindow(position: any, viewer: {
scene: any;
}): Cesium.Cartesian2;
}
export declare const UniformType: typeof globalThis.Cesium.UniformType;
/**
* 工具类
*/
export declare class Util {
/**
* 创建uuid
* @param prefix 前缀,默认为 D
* @returns {string}
*/
static uuid(prefix?: string): string;
/**
* 属性合并
* @param dest 目标对象
* @param sources 需要合并的属性
* @returns 目标对象
*/
static merge(dest: Object, ...sources: Array): any;
/**
* 按空格分割字符串
* @param str 需要被分割的字符串
*/
static splitWords(str: any): string[];
/**
* 将给定的属性合并到`obj`对象的`options`属性中,返回结果`options`
* @param {*} obj
* @param {*} options
*/
static setOptions(obj: any, options: any): any;
/**
* 返回四舍五入到指定小数位的数字,默认情况下返回到6位小数。
* @param num 数字
* @param digits 小数位数
* @returns
*/
static formatNum(num: number, digits: number): number;
/**
* 去除字符串中的空格
* @param {*} str
*/
static trim(str: any): any;
/**
* 创建空图片
* @returns Base64编码格式的图片
*/
static emptyImageUrl(): string;
/**
*
* 检查Position是否有效
* @param position
*/
static checkPosition(position: Object): boolean;
/**
* 对函数进行防抖处理,调用函数后将在设置时间后执行
* @param fn
* @param delay
* @returns {function(): void}
*/
static debounce(fn: () => void, delay: number): () => void;
/**
* 创建一个限制函数,该函数每次最多只能调用一次
* @param fn 函数
* @param delay 调用间隔
* @returns {function(): void}
*/
static throttle(fn: () => void, delay: number): () => void;
/**
* 将Base64编码的数据转换为二进制数据
* @param dataUrl Base64编码的数据
* @returns
*/
static dataURLtoBlob(dataUrl: string): Blob;
}
/**
* 矢量图层,用于添加各类矢量数据(点、线、面等),将矢量数据按一定的逻辑分组,方便统一管理
* @noInheritDoc
*/
export declare class VectorLayer extends Layer {
/**
* @param id 图层唯一标识
*/
constructor(id: string);
/**
* 类型
*/
get type(): string;
/**
* 清空图层
*/
clear(): VectorLayer;
setStyle(style: any): void;
}
export declare const VerticalOrigin: typeof globalThis.Cesium.VerticalOrigin;
/**
* 视频图元
* @noInheritDoc
* @example
* ```ts
* let videoEl = new document.getElementById('video')
* let videoPrimitive = new BC.VideoPrimitive('120,20;120,30;122,30', videoEl)
* ```
*/
export declare class VideoPrimitive extends Overlay {
private _positions;
private _video;
/**
*
* @param positions 坐标串
* @param video 视频地址
*/
constructor(positions: string | T_Position[], video: string);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
set video(video: string);
get video(): string;
/**
*
* @private
*/
_setAppearance(): void;
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {VideoPrimitive}
*/
setStyle(style: any): this;
}
/**
* 3D 场景主要接口,在给定的 DivId 中构建三维场景
* @noInheritDoc
* @example
* ```html
*
* ```
*
* ```ts
* let viewer = BC.Viewer('viewer-container')
* global.viewer = viewer // 添加到全局变量
* ```
*/
export declare class Viewer {
private _delegate;
private _viewerEvent;
private _sceneEvent;
private _viewerOption;
private _cameraOption;
private _dcContainer;
private _baseLayerPicker;
private _layerGroupCache;
private _layerCache;
private _mouseEvent;
cesiumWidget: Cesium.CesiumWidget;
tooltip: Tooltip;
compass: Compass;
popup: Popup;
contextMenu: ContextMenu;
mapSwitch: MapSwitch;
mapSplit: MapSplit;
locationBar: LocationBar;
hawkeyeMap: HawkeyeMap;
distanceLegend: DistanceLegend;
zoomController: ZoomController;
loadingMask: LoadingMask;
tilesetSplit: TilesetSplit;
sceneSplit: SceneSplit;
/**
*
* @param id - 容器id
* @param options - 参数
* @example
* ```json
* //属性参数(可选)
* {
* "contextOptions": {
* "webgl": {
* "alpha": false, //背景
* "depth": true,
* "stencil": false,
* "antialias": true,
* "powerPreference": "high-performance",
* "premultipliedAlpha": true,
* "preserveDrawingBuffer": false,
* "failIfMajorPerformanceCaveat": false
* },
* "allowTextureFilterAnisotropic": true
* },
* "sceneMode": 3 //1: 2.5D,2: 2D,3: 3D
* }
* ```
*/
constructor(id: string | HTMLElement, options?: {});
/**
* 获取Cesium原生Viewer
*/
get delegate(): Cesium.Viewer;
/**
* 框架自定义容器
* @readonly
*/
get dcContainer(): any;
/**
* 场景
* @readonly
*/
get scene(): Cesium.Scene;
/**
* 相机
* @readonly
*/
get camera(): Cesium.Camera;
/**
* canvas节点
* @readonly
*/
get canvas(): HTMLCanvasElement;
/**
* viewer数据源
* @readonly
*/
get dataSources(): Cesium.DataSourceCollection;
/**
* 影像类图层组
* @readonly
*/
get imageryLayers(): Cesium.ImageryLayerCollection;
/**
* 地形
* @readonly
*/
get terrainProvider(): Cesium.TerrainProvider;
/**
* 实体集合
* @readonly
*/
get entities(): Cesium.EntityCollection;
/**
* 预处理集合
* @readonly
*/
get postProcessStages(): Cesium.PostProcessStageCollection;
/**
* 时钟
*/
get clock(): Cesium.Clock;
/**
* viewer私有事件
*/
get viewerEvent(): ViewerEvent;
get mouseEvent(): MouseEvent_2;
/**
* 摄像头位置
*/
get cameraPosition(): Position;
/**
* 层级
*/
get resolution(): number;
/**
* 当前视角范围
*/
get viewBounds(): Cesium.Rectangle;
/**
* 层级
*/
get level(): any;
/***
* 添加图层组
* @param layerGroup - 图层组
* @private
*/
_addLayerGroup(layerGroup: LayerGroup): void;
/**
*
* @param layerGroup
* @private
*/
private _removeLayerGroup;
/**
* 添加图层
* @param layer - 图层
* @private
*/
private _addLayer;
/**
* 移除图层
* @param layer 图层
* @private
*/
_removeLayer(layer: Layer): void;
/**
* 设置属性
* @param options 属性
* @returns {Viewer}
* @example
* ```json
* // 属性参数(可选)
* {
* "shadows": false, // 是否开启阴影
* "resolutionScale": 1, // 设置渲染分辨率的缩放比例
* "showAtmosphere": true, //是否显示大气层
* "showSun": true, //是否显示太阳
* "showMoon": true, //是否显示月亮
* "enableFxaa": true, //是否开启抗锯齿
* "msaaSamples": 1, //msaa抗拒出取样度
* "cameraController": {
* // 相机控制
* "enableRotate": true, // 是否可以旋转
* "enableTilt": true, // 是否可以翻转
* "enableTranslate": true, // 是否可以平移
* "enableZoom": true, // 是否可以缩放
* "enableCollisionDetection": true, // 是否支持碰撞检测
* "minimumZoomDistance": 1.0, // 最小缩放距离
* "maximumZoomDistance": 40489014.0 // 最大缩放距离
* },
* "globe": {
* "show": true, // 是否显示地球
* "showGroundAtmosphere": true, // 显示地面大气
* "enableLighting": false, //是否开启灯光,开启后地球会根据当前时间启用灯光
* "depthTestAgainstTerrain": false, //是否开启深度检测
* "tileCacheSize": 100, // 默认瓦片缓存大小
* "preloadSiblings": false, //是否应预加载渲染同级图块
* "terrainExaggeration": 1, //地形夸张系数
* "terrainExaggerationRelativeHeight": 1, //地形相对高度夸张系数
* "baseColor": new DC.Color(0, 0, 0.5, 1), //地球默认底色
* "filterColor": new DC.Color(0, 0, 0, 0), //瓦片过滤色
* "translucency": {
* //地表透明
* "enabled": false, // 是否开启地表透明
* "backFaceAlpha": 1, // 地球背面透明度
* "backFaceAlphaByDistance": null, //根据距离设置地球背面透明度: {near:400,nearValue:0.2,far:800,farValue:1}
* "frontFaceAlpha": 1, // 地球正面透明度
* "frontFaceAlphaByDistance": null //根据距离设置地球正面透明度: {near:400,nearValue:0.2,far:800,farValue:1}
* }
* },
* "skyBox": {
* "sources": {}, // 六个面的贴图
* "show": true, //是否显示
* "offsetAngle": 0 //旋转角度
* }
* }
* ```
*/
setOptions(options: any): this;
/**
* 设置翻转角度
* @param min 最小角度
* @param max 最大角度
* @returns {Viewer}
*/
setPitchRange(min?: number, max?: number): this;
/**
* @param west
* @param south
* @param east
* @param north
* @returns {Viewer}
*/
setBounds(west: any, south: any, east: any, north: any): this;
/**
* 改变场景模式,
* @param sceneMode - 场景模式 2:2D,2.5:2.5D,3:3D
* @param duration - 间隔时间
* @returns {Viewer}
*/
changeSceneMode(sceneMode: any, duration?: number): this;
/**
* 改变鼠标使用模式
* @param mouseMode - 鼠标模式
* @returns {Viewer}
*/
changeMouseMode(mouseMode: MouseMode): this;
/**
* 添加基础图层
* @param baseLayers 基础地图图层
* @param options 属性
* @returns {Viewer}
*/
addBaseLayer(baseLayers: Cesium.ImageryProvider | Cesium.TerrainProvider | Array | Array, options?: any): this;
/**
* 修改基础图层
* @param index 图层索引
* @returns {Viewer}
*/
changeBaseLayer(index: any): this;
/**
*
* @param windowPosition
* @returns {Promise}
*/
getImageryLayerInfo(windowPosition: any): Promise;
/**
* 添加地形
* @param terrain 地形图层
* @param options 属性
* @returns {Viewer}
*/
addTerrain(terrain: any, options?: any): this;
/**
* 修改地形
* @param index 图层索引
* @returns {Viewer}
*/
changeTerrain(index: any): this;
/**
* 移除地形
* @returns {Viewer}
*/
removeTerrain(): this;
/**
* 添加图层组
* @param layerGroup 图层组
* @returns {Viewer}
*/
addLayerGroup(layerGroup: LayerGroup): this;
/**
* 移除图层组
* @param layerGroup - 图层组
* @returns {Viewer}
*/
removeLayerGroup(layerGroup: LayerGroup): this;
/**
* 根据id获取图层组
* @param id - 图层组id
* @returns {undefined}
*/
getLayerGroup(id: string): LayerGroup;
/**
* 添加图层
* @param layer
* @returns {Viewer}
*/
addLayer(layer: Layer): this;
/**
* 移除图层
* @param layer 图层
* @returns {Viewer}
*/
removeLayer(layer: Layer): this;
/**
* 检查是否有某个图层
* @param layer
* @returns {boolean}
*/
hasLayer(layer: Layer): boolean;
/**
* 根据id获取图层
* @param id
* @returns {*|undefined}
*/
getLayer(id: string): any;
/**
* 获取全部图层
* @returns {[]}
*/
getLayers(): any[];
/**
* 遍历所有图层
* @param method 回调函数
* @param context 上下文
* @returns {Viewer}
*/
eachLayer(method: Function, context: any): this;
/**
* 根据图层属性获取图层
* @param attrName 属性名称
* @param attrVal 属性值
* @returns 图层数组
*/
getLayersByAttr(attrName: string, attrVal: any): Layer[];
/**
* 飞行到
* @param target - 目标
* @param duration -飞到位置的时间(s)
* @returns {Viewer}
*/
flyTo(target: any, duration?: number): this;
/**
* 缩放到
* @param target 目标
* @returns {Viewer}
*/
zoomTo(target: any): this;
/**
* 飞到具体位置
* @param position 坐标
* @param completeCallback 回调函数
* @param duration 间隔时间
* @returns {Viewer}
*/
flyToPosition(position: T_Position, completeCallback: any, duration: any): this;
/**
* 缩放到具体位置
* @param position 位置
* @param completeCallback 回调函数
* @returns {Viewer}
*/
zoomToPosition(position: T_Position, completeCallback: any): this;
/**
* 飞到指定范围
* @param bounds 范围
* @param hpr 方位角
* @param completeCallback 回调函数
* @param duration 间隔时间
* @return {Viewer}
*/
flyToBounds(bounds: any, { heading, pitch, roll }: {
heading?: number;
pitch?: number;
roll?: number;
}, completeCallback: any, duration?: any): this;
/**
* 缩放到指定范围
* @param bounds 范围
* @param hpr 方位角
* @param completeCallback 回调函数
* @return {Viewer}
*/
zoomToBounds(bounds: any, { heading, pitch, roll }: {
heading?: number;
pitch?: number;
roll?: number;
}, completeCallback: any): this;
/**
* 事件订阅
* @param type 类型
* @param callback 回调函数
* @param context 上下文
* @returns {Viewer}
*/
on(type: any, callback: any, context: any): this;
/**
* 事件订阅一次
* @param type 类型
* @param callback 回调函数
* @param context 上下文
* @returns {Viewer}
*/
once(type: any, callback: any, context: any): this;
/**
* 事件订阅取消
* @param type 类型
* @param callback 回调函数
* @param context 上下文
* @returns {Viewer}
*/
off(type: any, callback: any, context: any): this;
/**
* 销毁
*/
destroy(): this;
/**
* 导出场景
* @param name
* @returns {Viewer}
*/
exportScene(name: string): this;
/**
* @hidden
* @param plugin
* @returns {Viewer}
*/
use(plugin: any): this;
/**
* @hidden
* @param plugin
* @returns {Viewer}
*/
unuse(plugin: any): this;
}
declare class ViewerEvent extends Event_2 {
constructor();
/**
* 注册viewer事件
* @private
*/
_registerEvent(): void;
}
export declare class ViewShed3D {
private viewer;
private datasource;
private radar;
/** 观测位置 */
private viewPosition;
private cameraPosition;
/** 方向角 -180~180 */
private _direction;
/** 机方向与地平面的角度 */
private _pitch;
/** 可视域水平夹角,默认为 `90` */
private _horizontalViewAngle;
/** 可视域垂直夹角,默认为`60` */
private _verticalViewAngle;
/** 可视区域颜色,默认为`green` */
private _visibleAreaColor;
/** 不可见区域颜色,默认为`red` */
private _invisibleAreaColor;
/** 可视距离,单位`米` */
private _visualRange;
_defaultColorTexture: any;
lightCamera: any;
private shadowMap;
private postStage;
frustumQuaternion: any;
constructor(options: ViewShedOptions);
get visibleAreaColor(): Cesium.Color;
set visibleAreaColor(val: Cesium.Color);
get invisibleAreaColor(): Cesium.Color;
set invisibleAreaColor(val: Cesium.Color);
get horizontalViewAngle(): number;
set horizontalViewAngle(val: number);
get verticalViewAngle(): number;
set verticalViewAngle(val: number);
get direction(): number;
set direction(val: number);
get pitch(): number;
set pitch(val: number);
get visualRange(): number;
set visualRange(val: number);
setCameraView(): void;
createShadowMap(): void;
updateViewShed(): void;
getFrustumQuaternion(cpos: any, viewPosition: any): Cesium.Quaternion;
clearAll(): void;
removeProcessStageById(id: string): void;
findProcessStageById(id: string): Cesium.PostProcessStage | Cesium.PostProcessStageComposite;
createPostStage(): void;
update(frameState: any): void;
getSceneDepthTexture(viewer: any): any;
removeRadar(): void;
resetRadar(): void;
addRadar(): void;
}
export declare class ViewShedFactory {
_viewer: Viewer;
_plotUtil: Plot;
_viewShed: ViewShed3D;
constructor();
get viewer(): Viewer;
get plotUtil(): Plot;
get viewShed(): ViewShed3D;
set viewShed(val: ViewShed3D);
createViewShed(): void;
clear(): void;
destroy(): void;
/**
*
* @param viewer
*/
install(viewer: Viewer): void;
uninstall(viewer: any): void;
}
declare interface ViewShedOptions {
cameraPosition: Cesium.Cartesian3;
/** 视图 */
viewer: Cesium.Viewer;
/** 观测位置 */
viewPosition: Cesium.Cartesian3;
/** 观测方位角 默认为`0`,范围`0~360` */
direction: number;
/** 俯仰角,范围`-90~90`,默认为`0` */
pitch: number;
/** 可视域水平夹角,默认为 `90`,范围`0~360` */
horizontalViewAngle?: number;
/** 可视域垂直夹角,默认为`60`,范围`0~180` */
verticalViewAngle?: number;
/** 可视区域颜色,默认为`green` */
visibleAreaColor?: Cesium.Color;
/** 不可见区域颜色,默认为`red` */
invisibleAreaColor?: Cesium.Color;
/** 可视距离,单位`米`,默认为`100` */
visualRange?: number;
}
/**
* 墙
* @noInheritDoc
* @example
* ```ts
* let wall = new BC.Wall('-90.0,32.0,1000;-94.0,36.0,1000;')
* ```
*/
export declare class Wall extends Overlay {
private _positions;
/**坐标串 */
constructor(positions: string | T_Position[]);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
_mountedHook(): void;
/**
*
* @param text
* @param textStyle
*/
setLabel(text: string, textStyle: any): this;
/**
* 设置风格
* @param style
* @returns {Wall}
* @example
* ```json
* // 样式参数(可选)
* {
* "fill": true, //是否用提供的材料填充多边形。
* "material": BC.Color.WHITE, //材质
* "outline": false, //是否显示边框
* "outlineColor": BC.Color.BLACK, //边框颜色
* "outlineWidth": 0, //边框宽度
* "shadows": 0, //阴影类型,0:禁用、1:启用 、2:投射、3:接受
* "distanceDisplayCondition": {
* "near": 0, //最近距离
* "far": Number.MAX_VALUE //最远距离
* }, //根据距离设置可见
* "classificationType": 2 //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* }
* ```
*/
setStyle(style: any): this;
/**
* Entity 转换为 Overlay
* @param entity
* @returns {Wall}
*/
static fromEntity(entity: Cesium.Entity): Wall | undefined;
}
/**
* 图片轨迹墙体材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.WallImageTrailMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class WallImageTrailMaterialProperty extends MaterialProperty {
private _image;
private _imageSubscription;
private _repeat;
private _repeatSubscription;
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
/**
* 图片地址
*/
image: string;
/**
* 重复规则
*/
repeat: Object;
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
/**
* 图片地址
*/
image: string;
/**
* 重复规则
*/
repeat: Cesium.Cartesian2;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 流动墙材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.WallLineTrailMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class WallLineTrailMaterialProperty extends MaterialProperty {
private _image;
private _imageSubscription;
private _repeat;
private _repeatSubscription;
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
/* Excluded from this release type: image */
/**
* 重复规则
*/
repeat: Object;
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
/**
* 重复规则
*/
repeat: Cesium.Cartesian2;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 流动墙材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.WallTrailMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class WallTrailMaterialProperty extends MaterialProperty {
private _image;
private _imageSubscription;
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
/* Excluded from this release type: image */
constructor(options?: {
/**
* 颜色
* @defaultValue BC.Color.fromBytes(0, 255, 255, 255)
*/
color: Cesium.Color;
/**
* 速度
* @defaultValue 1
*/
speed: number;
});
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 电弧球材质
* @noInheritDoc
* @example
* ```ts
* let material = new BC.WaterMaterialProperty({
* color: BC.Color.WHITE,
* })
* ```
*/
export declare class WaterMaterialProperty {
private _definitionChanged;
private _baseWaterColor;
private _baseWaterColorSubscription;
/**
* 水体颜色
*/
baseWaterColor: Cesium.Color;
private _blendColor;
private _blendColorSubscription;
/**
* 混合颜色
*/
blendColor: Cesium.Color;
private _specularMap;
private _specularMapSubscription;
/**
* 镜面图
*/
specularMap: string;
private _normalMap;
private _normalMapSubscription;
/**
* 法线图
*/
normalMap: string;
/**
* 波纹数量
*/
frequency: number;
/**
* 动画速度
*/
animationSpeed: number;
/**
* 水波振幅
*/
amplitude: number;
/**
* 镜面反射强度
*/
specularIntensity: number;
/**
*
* @param options
*/
constructor(options: {
/**
* 水体颜色
*/
baseWaterColor?: Cesium.Color;
/**
* 混合颜色
*/
blendColor?: Cesium.Color;
/**
* 镜面图
*/
specularMap?: string;
/**
* 法线图
*/
normalMap?: string;
/**
* 波纹数量
*/
frequency?: number;
/**
* 动画速度
*/
animationSpeed?: number;
/**
* 水波振幅
*/
amplitude?: number;
/**
* 镜面反射强度
*/
specularIntensity?: number;
});
/* Excluded from this release type: isConstant */
/* Excluded from this release type: definitionChanged */
/* Excluded from this release type: getType */
/* Excluded from this release type: getValue */
/* Excluded from this release type: equals */
}
/**
* 水面图元
* @noInheritDoc
* @example
* ```ts
* let water = new BC.WaterPrimitive('120,20;120,30;122,30')
* water.setStyle({
* baseWaterColor: BC.Color.AQUA.withAlpha(0.3),
* normalMap: 'examples/images/icon/waterNormalsSmall.jpg',
* frequency: 1000.0,
* animationSpeed: 0.01,
* amplitude: 10,
* specularIntensity: 10,
* })
* ```
*/
export declare class WaterPrimitive extends Overlay {
private _positions;
private _holes;
/**
*
* @param positions 坐标串
* @param holes 空心坐标串
*/
constructor(positions: string | T_Position[], holes?: T_Position[][]);
get type(): any;
set positions(positions: string | T_Position[]);
get positions(): string | T_Position[];
/**
*
* @private
*/
private _setAppearance;
_mountedHook(): void;
/**
* 设置风格
* @param style
* @returns {WaterPrimitive}
* @example
* ```json
* // 样式参数(可选)
* {
* "height": 1, //高度
* "extrudedHeight": 0, //拉升高度
* "stRotation": 0, //旋转角度
* "outline": false, //是否显示边框
* "closeTop": true, //顶面是否闭合
* "closeBottom": true, //底面是否闭合
* "classificationType": 2, //分类 是否影响地形,3D切片或同时影响这两者。0:地形、1:3D切片、2:两者
* "baseWaterColor": BC.Color.WHITE, // 水体颜色
* "blendColor": BC.Color.WHITE, // 混合颜色
* "specularMap": "", // 镜面图
* "normalMap": "", // 法线图
* "frequency": 1000, //波纹数量
* "animationSpeed": 0.03, // 动画速度
* "amplitude": 10, //水波振幅
* "specularIntensity": 10 //镜面反射强度
* }
* ```
*/
setStyle(style: any): this;
}
/**
* 天气效果
*/
export declare class Weather {
private _comps;
constructor();
/**
* 雾天
*/
get fog(): Fog;
/**
* 雨天
*/
get rain(): Rain;
/**
* 雪天
*/
get snow(): Snow;
/**
* 云
*/
get cloud(): Cloud;
/* Excluded from this release type: install */
}
export declare const WebMercatorTilingScheme: typeof globalThis.Cesium.WebMercatorTilingScheme;
declare class Widget {
protected _viewer: Viewer | undefined;
protected _enable: boolean;
protected _wrapper: any;
protected _ready: boolean;
protected _state: string;
constructor();
set enable(enable: boolean);
get enable(): boolean;
get state(): string;
/**
* mount content
* @private
*/
protected _mountContent(): void;
/**
* binds event
* @private
*/
protected _bindEvent(): void;
/**
* Unbinds event
* @private
*/
protected _unbindEvent(): void;
/**
* When enable modifies the hook executed, the subclass copies it as required
* @private
*/
protected _enableHook(): void;
/**
* Updating the Widget location requires subclass overrides
* @param windowCoord
* @private
*/
protected _updateWindowCoord(windowCoord: any): void;
/**
* Hook for installed
* @private
*/
protected _installHook(): void;
/**
* Installs to viewer
* @param viewer
*/
install(viewer: any): void;
/**
* Setting wrapper
* @param wrapper
* @returns {Widget}
*/
setWrapper(wrapper: any): this;
/**
* Setting widget content
* @param content
* @returns {Widget}
*/
setContent(content: string | Element): this;
/**
* hide widget
*/
hide(): void;
/**
* Registers type
* @param type
*/
static registerType(type: any): void;
/**
*
* @param type
*/
static getWidgetType(type: any): any;
}
export declare const writeTextToCanvas: typeof globalThis.Cesium.writeTextToCanvas;
/**
* 缩放控制
* @noInheritDoc
* @example
* ```ts
* viewer.zoomController.enable = true
* ```
*/
declare class ZoomController extends Widget {
private _zoomInEl;
private _zoomOutEl;
private _refreshEl;
/**
* @hidden
*/
constructor();
/**
* @hidden
*/
get type(): any;
/**
*
* @param scene
* @returns {Cartesian3}
* @private
*/
private _getCameraFocus;
/**
*
* @param camera
* @param focus
* @param scalar
* @returns {Cartesian3}
* @private
*/
private _getCameraPosition;
/**
*
* @returns {boolean}
* @private
*/
_zoomIn(): boolean;
/**
*
* @private
*/
private _refresh;
/**
*
* @returns {boolean}
* @private
*/
_zoomOut(): boolean;
/**
*
* @private
*/
_installHook(): void;
/**
*
* @private
*/
_mountContent(): void;
}
export { }
}
declare const __AUTHOR__: string;
declare const __VERSION__: string;
declare const __TIME__: string;
declare const __HOME_PAGE__: string;