mars3d 3.6.0 → 3.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mars3d.css CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Mars3D三维可视化平台 mars3d
3
3
  *
4
- * 版本信息:v3.6.0
5
- * 编译日期:2023-08-04 12:18:01
4
+ * 版本信息:v3.6.2
5
+ * 编译日期:2023-08-21 21:14:00
6
6
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
7
7
  * 使用单位:免费公开版 ,2023-03-17
8
8
  */
package/dist/mars3d.d.ts CHANGED
@@ -2,8 +2,8 @@
2
2
  /**
3
3
  * Mars3D三维可视化平台 mars3d
4
4
  *
5
- * 版本信息:v3.6.0
6
- * 编译日期:2023-08-04 12:18:01
5
+ * 版本信息:v3.6.2
6
+ * 编译日期:2023-08-21 21:14:00
7
7
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
8
8
  * 使用单位:免费公开版 ,2023-03-17
9
9
  */
@@ -1854,17 +1854,18 @@ declare class Compass extends BaseControl {
1854
1854
  /**
1855
1855
  * 时钟仪表控制 控件 (Cesium原生)
1856
1856
  * @param [options] - 参数对象,包括以下:
1857
- * @param [ticks = [0.1, 0.25, 0.5, 1.0, 2.0, 5.0, 10.0, 15.0, 30.0, 60.0, 120.0, 300.0, 600.0, 900.0, 1800.0, 3600.0]] - 可选的步长
1857
+ * @param [options.ticks = [0.1, 0.25, 0.5, 1.0, 2.0, 5.0, 10.0, 15.0, 30.0, 60.0, 120.0, 300.0, 600.0, 900.0, 1800.0, 3600.0]] - 可选的步长
1858
1858
  * @param [options.id = createGuid()] - 对象的id标识
1859
1859
  * @param [options.enabled = true] - 对象的启用状态
1860
1860
  * @param [options.parentContainer] - 控件加入的父容器,默认为map所在的DOM map.container
1861
1861
  */
1862
1862
  declare class Animation extends BaseCzmControl {
1863
1863
  constructor(options?: {
1864
+ ticks?: number[];
1864
1865
  id?: string | number;
1865
1866
  enabled?: boolean;
1866
1867
  parentContainer?: HTMLElement;
1867
- }, ticks?: number[]);
1868
+ });
1868
1869
  }
1869
1870
 
1870
1871
  /**
@@ -2020,6 +2021,7 @@ declare class SceneModePicker extends BaseCzmControl {
2020
2021
  /**
2021
2022
  * 时间线 控件 (Cesium原生)
2022
2023
  * @param [options] - 参数对象,包括以下:
2024
+ * @param [options.zoom = true] - 刻度面板是否可以鼠标滚轮进行缩放
2023
2025
  * @param [options.maxSpan = 1] - 刻度放大的最大刻度跨度,单位:秒
2024
2026
  * @param [options.style] - 可以CSS样式,如:
2025
2027
  * @param [options.style.top] - css定位top位置, 如 top: '10px'
@@ -2032,6 +2034,7 @@ declare class SceneModePicker extends BaseCzmControl {
2032
2034
  */
2033
2035
  declare class Timeline extends BaseCzmControl {
2034
2036
  constructor(options?: {
2037
+ zoom?: boolean;
2035
2038
  maxSpan?: number;
2036
2039
  style?: {
2037
2040
  top?: string;
@@ -2694,6 +2697,32 @@ declare class BaseThing extends BaseClass {
2694
2697
  destroy(noDel?: boolean): void;
2695
2698
  }
2696
2699
 
2700
+ /**
2701
+ * 颜色色带 控制类
2702
+ * @example
2703
+ * const colorRamp = new mars3d.ColorRamp({
2704
+ * steps: [0.05, 0.15, 0.25, 0.35, 0.5, 0.8],
2705
+ * colors: ["rgb(0, 228, 0)", "rgb(256, 256, 0)", "rgb(256, 126, 0)", "rgb(256, 0, 0)", "rgb(153, 0, 76)", "rgb(126, 0, 35)"]
2706
+ * })
2707
+ * let color = colorRamp.getColor(rate)
2708
+ * @param [options] - 参数对象,包括以下:
2709
+ * @param options.colors - 色带的颜色数组
2710
+ * @param options.steps - 色带对应的数值数组
2711
+ */
2712
+ declare class ColorRamp {
2713
+ constructor(options?: {
2714
+ colors: string[];
2715
+ steps: number[];
2716
+ });
2717
+ /**
2718
+ * 获取对应值的色带上的颜色值
2719
+ * @param val - 数值
2720
+ * @param [alpha = 0.8] - 颜色的透明度
2721
+ * @returns 该值在色带上对应的颜色值,比如 "rgba(256, 0, 0, 0.8)"
2722
+ */
2723
+ getColor(val: number, alpha?: number): string;
2724
+ }
2725
+
2697
2726
  /**
2698
2727
  * 近地天空盒, 在场景周围绘制星星等太空背景。
2699
2728
  * 天空盒子是用真正的赤道平均春分点(TEME)轴定义的。仅在3D中支持。当转换为2D或哥伦布视图时,天空盒会淡出。
@@ -3339,7 +3368,7 @@ declare class BloomTargetEffect extends BaseEffect {
3339
3368
  */
3340
3369
  eventType: EventType | string;
3341
3370
  /**
3342
- * 选中对象
3371
+ * 选中对象 ,仅支持Primitive、3DTiles Feature等部分对象
3343
3372
  */
3344
3373
  selected: any | any | undefined;
3345
3374
  }
@@ -3504,7 +3533,7 @@ declare class OutlineEffect extends BaseEffect {
3504
3533
  enabled?: boolean;
3505
3534
  });
3506
3535
  /**
3507
- * 选中对象
3536
+ * 选中对象 ,仅支持Primitive、3DTiles Feature等部分对象
3508
3537
  */
3509
3538
  selected: any | any | undefined;
3510
3539
  /**
@@ -4006,7 +4035,7 @@ declare class BaseGraphic extends BaseClass {
4006
4035
  * @param [event] - 用于抛出事件时的相关额外属性
4007
4036
  * @returns 当前对象本身,可以链式调用
4008
4037
  */
4009
- openPopup(position?: LngLatPoint | Cesium.Cartesian3 | number[], event?: any): BaseGraphic | any;
4038
+ openPopup(position?: LngLatPoint | Cesium.Cartesian3 | number[] | any, event?: any): BaseGraphic | any;
4010
4039
  /**
4011
4040
  * 关闭弹窗
4012
4041
  * @returns 当前对象本身,可以链式调用
@@ -4272,6 +4301,13 @@ declare class BasePointCombine extends BasePolyCombine {
4272
4301
  flyTo?: boolean;
4273
4302
  flyToOptions?: any;
4274
4303
  });
4304
+ /**
4305
+ * 打开绑定的弹窗
4306
+ * @param index - 更新的instances对象index值
4307
+ * @param [event] - 用于抛出事件时的相关额外属性
4308
+ * @returns 当前对象本身,可以链式调用
4309
+ */
4310
+ openPopup(index: number, event?: any): BaseGraphic | any;
4275
4311
  }
4276
4312
 
4277
4313
  /**
@@ -4362,6 +4398,13 @@ declare class BasePolyCombine extends BaseCombine {
4362
4398
  * @returns 无
4363
4399
  */
4364
4400
  closeHighlight(): void;
4401
+ /**
4402
+ * 打开绑定的弹窗
4403
+ * @param index - 更新的instances对象index值
4404
+ * @param [event] - 用于抛出事件时的相关额外属性
4405
+ * @returns 当前对象本身,可以链式调用
4406
+ */
4407
+ openPopup(index: number, event?: any): BaseGraphic | any;
4365
4408
  }
4366
4409
 
4367
4410
  /**
@@ -10590,12 +10633,14 @@ declare class ModelEntity extends BasePointEntity {
10590
10633
  * @param [options = {}] - 参数包括:
10591
10634
  * @param options.position - 指定目标位置的坐标
10592
10635
  * @param [options.time = 5] - 移动的时长(单位 秒),控制速度
10636
+ * @param [options.orientation] - 是否设置为路线方向的角度
10593
10637
  * @param [options.onEnd] - 移动完成的回调方法
10594
10638
  * @returns 绘制创建完成的Promise,等价于onEnd参数
10595
10639
  */
10596
10640
  moveTo(options?: {
10597
10641
  position: LngLatPoint | Cesium.Cartesian3 | number[];
10598
10642
  time?: number;
10643
+ orientation?: boolean;
10599
10644
  onEnd?: (...params: any[]) => any;
10600
10645
  }): Promise<ModelEntity | any>;
10601
10646
  /**
@@ -16759,7 +16804,7 @@ declare namespace PointPrimitive {
16759
16804
  * @property [visibleDepth = true] - 是否被遮挡
16760
16805
  * @property [disableDepthTestDistance] - 指定从相机到禁用深度测试的距离。
16761
16806
  * @property [translucencyByDistance] - 用于基于与相机的距离设置半透明度。
16762
- * @property [clampToGround = false] - 是否贴地, 仅限普通坐标. 提示:Cesium默认不支持贴地,是内部计算了贴地高度值。
16807
+ * @property [clampToGround = false] - 是否贴地, 仅限普通坐标. 提示:Cesium默认不支持贴地,是内部计算了贴地高度值。【大量数据时可能卡死,注意大数据下不用为ture】
16763
16808
  * @property [setHeight] - 指定坐标高度值(对编辑时无效,仅初始化传入有效,常用于图层中配置),也支持字符串模版配置
16764
16809
  * @property [addHeight] - 在现有坐标基础上增加的高度值(对编辑时无效,仅初始化传入有效,常用于图层中配置),也支持字符串模版配置
16765
16810
  * @property [label] - 支持附带文字的显示
@@ -17584,6 +17629,8 @@ declare namespace ScrollWall {
17584
17629
  * @property [reverse = false] - 方向:true往上、false往下
17585
17630
  * @property [style = 1] - 样式,可选值:1、2
17586
17631
  * @property [shadows = Cesium.ShadowMode.DISABLED] - 指定对象是投射还是接收来自光源的阴影。
17632
+ * @property [highlight] - 鼠标移入或单击(type:'click')后的对应高亮的部分样式,创建Graphic后也可以openHighlight、closeHighlight方法来手动调用
17633
+ * @property [label] - 支持附带文字的显示
17587
17634
  */
17588
17635
  type StyleOptions = any | {
17589
17636
  diffHeight?: number;
@@ -17593,6 +17640,8 @@ declare namespace ScrollWall {
17593
17640
  reverse?: boolean;
17594
17641
  style?: number;
17595
17642
  shadows?: Cesium.ShadowMode;
17643
+ highlight?: ScrollWall.StyleOptions | any;
17644
+ label?: LabelEntity.StyleOptions | any;
17596
17645
  };
17597
17646
  }
17598
17647
 
@@ -17633,6 +17682,10 @@ declare class ScrollWall extends BasePolyPrimitive {
17633
17682
  flyTo?: boolean;
17634
17683
  flyToOptions?: any;
17635
17684
  });
17685
+ /**
17686
+ * 中心点坐标 (笛卡尔坐标)
17687
+ */
17688
+ readonly center: Cesium.Cartesian3;
17636
17689
  /**
17637
17690
  * 矢量数据对应的 Cesium内部对象 (不同子类中实现)
17638
17691
  */
@@ -21802,7 +21855,7 @@ declare class TilesetLayer extends BaseGraphicLayer {
21802
21855
  * @param options.url - WFS服务地址
21803
21856
  * @param [options.parameters] - 要在URL中 传递给WFS服务GetFeature请求的其他参数。
21804
21857
  * @param [options.parameters.maxFeatures] - 返回结果最大数量
21805
- * @param [options.parameters.cql_filter] - 筛选服务数据的[SQL语句]{@link https://docs.geoserver.org/2.12.2/user/services/wfs/vendor.html#wfs-vendor-parameters}
21858
+ * @param [options.parameters.cql_filter] - 筛选服务数据的SQL语句
21806
21859
  * @param [options.parameters.sortBy] - 排序的属性名称,默认升序,降序时+D
21807
21860
  * @param [options.parameters.service = 'WFS'] - 服务类型
21808
21861
  * @param [options.parameters.version = '1.0.0'] - 服务版本
@@ -24934,6 +24987,7 @@ declare class TmsLayer extends BaseTileLayer {
24934
24987
  * @param [options.parameters.version = '1.1.1'] - 服务版本
24935
24988
  * @param [options.parameters.request = 'GetMap'] - 请求方法
24936
24989
  * @param [options.parameters.styles = ''] - 样式
24990
+ * @param [options.toLowerCase = true] - 请求参数名称是否转为小写,false时保留原样大小写
24937
24991
  * @param [options.crs = 'EPSG:3857'] - 瓦片数据的坐标系信息,默认为墨卡托投影,CRS规范,用于WMS规范>= 1.3.0。
24938
24992
  * @param [options.srs] - SRS规范,与WMS规范1.1.0或1.1.1一起使用
24939
24993
  * @param [options.getCapabilities = true] - 是否通过服务本身的GetCapabilities来读取一些参数,减少options配置项
@@ -25014,6 +25068,7 @@ declare class WmsLayer extends BaseTileLayer {
25014
25068
  request?: string;
25015
25069
  styles?: string;
25016
25070
  };
25071
+ toLowerCase?: boolean;
25017
25072
  crs?: string | CRS;
25018
25073
  srs?: string;
25019
25074
  getCapabilities?: boolean;
@@ -25700,6 +25755,8 @@ declare namespace Map {
25700
25755
  * @property [terrainShadows = Cesium.ShadowMode.RECEIVE_ONLY] - 确定地形是否投射或接收来自光源的阴影。
25701
25756
  * @property [requestRenderMode = false] - 是否显式渲染,如果为真,渲染帧只会在需要时发生,这是由场景中的变化决定的。启用可以减少你的应用程序的CPU/GPU使用量,并且在移动设备上使用更少的电池,但是需要使用 {@link Scene#requestRender} 在这种模式下显式地渲染一个新帧。在许多情况下,在API的其他部分更改场景后,这是必要的。参见 {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
25702
25757
  * @property [maximumRenderTimeChange = 0.0] - 如果requestRenderMode为true,这个值定义了在请求渲染之前允许的模拟时间的最大变化。参见 {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
25758
+ * @property [depthPlaneEllipsoidOffset = 0.0] - 调整DepthPlane以处理椭球体零标高以下的渲染伪影。
25759
+ * @property [msaaSamples = 1] - 如果提供,该值控制多样本抗混叠的速率。典型的多采样率是每像素2、4,有时是8个采样。更高的MSAA采样率可能会影响性能,以换取更好的视觉质量。这个值只适用于支持多样本渲染目标的WebGL2上下文。
25703
25760
  *
25704
25761
  * 以下是Cesium.Globe对象相关参数
25705
25762
  * @property [globe] - globe地球相关参数
@@ -25783,6 +25840,8 @@ declare namespace Map {
25783
25840
  terrainShadows?: Cesium.ShadowMode;
25784
25841
  requestRenderMode?: boolean;
25785
25842
  maximumRenderTimeChange?: number;
25843
+ depthPlaneEllipsoidOffset?: number;
25844
+ msaaSamples?: number;
25786
25845
  globe?: {
25787
25846
  show?: boolean;
25788
25847
  baseColor?: string;
@@ -26320,6 +26379,12 @@ declare class Map extends BaseClass {
26320
26379
  formatNum?: boolean;
26321
26380
  scale?: number;
26322
26381
  }): any;
26382
+ /**
26383
+ * 判断坐标点是否在当前视域内
26384
+ * @param position - 坐标
26385
+ * @returns 当前视域边界
26386
+ */
26387
+ isInView(position: Cesium.Cartesian3): boolean;
26323
26388
  /**
26324
26389
  * 当存在地形夸张时,获取其实际的高度值
26325
26390
  * @param alt - 鼠标拾取的高度值
@@ -30758,9 +30823,11 @@ declare namespace CanvasWindLayer {
30758
30823
  * @param [options.particlesnumber = 4096] - 初始粒子总数
30759
30824
  * @param [options.maxAge = 120] - 每个粒子的最大生存周期
30760
30825
  * @param [options.frameRate = 10] - 每秒刷新次数,因为requestAnimationFrame固定每秒60次的渲染,所以如果不想这么快,就把该数值调小一些
30761
- * @param [options.color = '#ffffff'] - 线颜色
30762
30826
  * @param [options.lineWidth = 1] - 线宽度
30763
30827
  * @param [options.fixedHeight = 0] - 点的固定的海拔高度
30828
+ * @param [options.color = '#ffffff'] - 线颜色
30829
+ * @param [options.colors] - 线多颜色时,色带的颜色数组
30830
+ * @param [options.steps] - 线多颜色时,色带对应的数值数组
30764
30831
  * @param [options.mouseHidden] - 鼠标按下时是否隐藏渲染
30765
30832
  * @param [options.worker] - 处理计算粒子点的多线程JS文件地址
30766
30833
  * @param [options.reverseY = false] - 是否翻转纬度数组顺序,正常数据是从北往南的(纬度从大到小),如果反向时请传reverseY为true
@@ -30787,9 +30854,11 @@ declare class CanvasWindLayer extends BaseLayer {
30787
30854
  particlesnumber?: number;
30788
30855
  maxAge?: number;
30789
30856
  frameRate?: number;
30790
- color?: string;
30791
30857
  lineWidth?: number;
30792
30858
  fixedHeight?: number;
30859
+ color?: string;
30860
+ colors?: string[];
30861
+ steps?: number[];
30793
30862
  mouseHidden?: boolean;
30794
30863
  worker?: string;
30795
30864
  reverseY?: boolean;
@@ -31448,7 +31517,6 @@ declare class GaodeRoute {
31448
31517
  * @param queryOptions - 查询参数
31449
31518
  * @param queryOptions.points - 按起点、途经点、终点 顺序的坐标数组,如[[117.500244, 40.417801],[117.500244, 40.417801]]
31450
31519
  * @param queryOptions.avoidpolygons - 区域避让数组(支持多个),支持32个避让区域,每个区域最多可有16个顶点。避让区域不能超过81平方公里,否则避让区域会失效。
31451
- * @param [queryOptions.extensions = 'base'] - 返回结果控制,可选值:core/all base:返回基本信息;all:返回全部信息
31452
31520
  * @param [queryOptions.strategy = 0] - 驾车选择策略,参考高德官网说明,默认为0:速度优先,不考虑当时路况,此路线不一定距离最短
31453
31521
  * @param [queryOptions.success] - 查询完成的回调方法
31454
31522
  * @param [queryOptions.error] - 查询失败的回调方法
@@ -31457,7 +31525,6 @@ declare class GaodeRoute {
31457
31525
  queryDriving(queryOptions: {
31458
31526
  points: any[][];
31459
31527
  avoidpolygons: any[][];
31460
- extensions?: string;
31461
31528
  strategy?: string;
31462
31529
  success?: (...params: any[]) => any;
31463
31530
  error?: (...params: any[]) => any;
@@ -36880,8 +36947,6 @@ declare namespace layer {
36880
36947
  export { EchartsLayer }
36881
36948
  export { HeatLayer }
36882
36949
  export { MapVLayer }
36883
- export { SmImgLayer }
36884
- export { SmMvtLayer }
36885
36950
  export { TdtDmLayer }
36886
36951
  }
36887
36952
 
@@ -36939,7 +37004,7 @@ declare namespace thing {
36939
37004
 
36940
37005
  export {
36941
37006
  name, update, version, proj4, Tle, widget,
36942
- BaseClass, BaseThing, LngLatPoint, LngLatArray, GroundSkyBox, MultipleSkyBox, LocalWorldTransform, CRS, ChinaCRS, EventType, State, Token, MaterialType, GraphicType, LayerType, ControlType, EffectType, Lang, LangType, MoveType, ClipType, Icon,
37007
+ BaseClass, BaseThing, LngLatPoint, LngLatArray, GroundSkyBox, MultipleSkyBox, LocalWorldTransform, CRS, ChinaCRS, EventType, State, Token, ColorRamp, MaterialType, GraphicType, LayerType, ControlType, EffectType, Lang, LangType, MoveType, ClipType, Icon,
36943
37008
  DomUtil, MeasureUtil, PointUtil, PolyUtil, PointTrans, Util, Log, MaterialUtil, GraphicUtil, DrawUtil, LayerUtil, ControlUtil, EffectUtil,
36944
37009
  BaseMaterialConver, BaseStyleConver, BillboardStyleConver, CloudStyleConver, BoxStyleConver, CircleStyleConver, CorridorStyleConver, CylinderStyleConver, DivGraphicStyleConver, EllipsoidStyleConver, LabelStyleConver, ModelStyleConver, PathStyleConver, PlaneStyleConver, PointStyleConver, PolygonStyleConver, PolylineStyleConver, PolylineVolumeStyleConver, RectangleStyleConver, RectangularSensorStyleConver, WallStyleConver,
36945
37010
  material, graphic, provider, layer, thing, effect, control, query,