mars3d 3.9.0 → 3.9.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/mars3d.css CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Mars3D三维可视化平台 mars3d
3
3
  *
4
- * 版本信息:v3.9.0
5
- * 编译日期:2025-02-15 11:56
4
+ * 版本信息:v3.9.2
5
+ * 编译日期:2025-03-11 22:36
6
6
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
7
7
  * 使用单位:火星科技免费公开版 ,2025-02-01
8
8
  */
package/mars3d.d.ts CHANGED
@@ -2,8 +2,8 @@
2
2
  /**
3
3
  * Mars3D三维可视化平台 mars3d
4
4
  *
5
- * 版本信息:v3.9.0
6
- * 编译日期:2025-02-15 11:56
5
+ * 版本信息:v3.9.2
6
+ * 编译日期:2025-03-11 22:36
7
7
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
8
8
  * 使用单位:火星科技免费公开版 ,2025-02-01
9
9
  */
@@ -17,7 +17,7 @@ declare const name: string
17
17
 
18
18
  declare const proj4: any
19
19
  declare const provider: any
20
-
20
+ declare const turf: any
21
21
 
22
22
  /**
23
23
  * 国内偏移坐标系 枚举
@@ -3153,6 +3153,10 @@ declare class Subtitles extends BaseControl {
3153
3153
  * @returns 是否成功
3154
3154
  */
3155
3155
  removeItem(id: number | string): boolean;
3156
+ /**
3157
+ * 释放所有子任务
3158
+ */
3159
+ disableAll(): void;
3156
3160
  /**
3157
3161
  * 对象添加到地图前创建一些对象的钩子方法,
3158
3162
  * 只会调用一次
@@ -4710,7 +4714,7 @@ declare namespace BaseGraphic {
4710
4714
  */
4711
4715
  type TimePosition = {
4712
4716
  type: string;
4713
- list: any[][] | LngLatPoint[];
4717
+ list: any | LngLatPoint[];
4714
4718
  timeField?: string;
4715
4719
  speed?: any[][] | number;
4716
4720
  startTime?: string | Date | Cesium.JulianDate;
@@ -4764,7 +4768,7 @@ declare namespace BaseGraphic {
4764
4768
  */
4765
4769
  type TimePolyPositions = {
4766
4770
  type: string;
4767
- list: BaseGraphic.TimePolyPositionsItem[];
4771
+ list: BaseGraphic.TimePolyPositionsItem[] | any;
4768
4772
  timeField?: string;
4769
4773
  referenceFrame?: Cesium.ReferenceFrame;
4770
4774
  numberOfDerivatives?: number;
@@ -4820,6 +4824,7 @@ declare namespace BaseGraphic {
4820
4824
  * @property [headers] - 一个对象,将发送的其他HTTP标头。比如:headers: { 'X-My-Header': 'valueOfHeader' }
4821
4825
  * @property [dataColumn] - 接口返回数据中,对应的属性数据所在的读取字段名称,支持多级(用.分割);如果数据直接返回时可以不配置。
4822
4826
  * @property [cacheTime = 1] - 在time秒内再次访问读取时,直接使用上一次历史值,避免高频访问后端。
4827
+ * @property [merge] - 是否合并原有静态属性
4823
4828
  */
4824
4829
  type AjaxAttr = {
4825
4830
  type: string;
@@ -4828,6 +4833,7 @@ declare namespace BaseGraphic {
4828
4833
  headers?: any;
4829
4834
  dataColumn?: string;
4830
4835
  cacheTime?: number;
4836
+ merge?: boolean;
4831
4837
  };
4832
4838
  /**
4833
4839
  * 当前类支持的{@link EventType}事件类型
@@ -4942,7 +4948,7 @@ declare class BaseGraphic extends BaseClass {
4942
4948
  position: LngLatPoint | Cesium.Cartesian3 | number[];
4943
4949
  positions: LngLatPoint[] | Cesium.Cartesian3[] | any[];
4944
4950
  style: any;
4945
- attr?: any;
4951
+ attr?: any | BaseGraphic.AjaxAttr;
4946
4952
  popup?: string | any[] | ((...params: any[]) => any);
4947
4953
  popupOptions?: Popup.StyleOptions | any;
4948
4954
  tooltip?: string | any[] | ((...params: any[]) => any);
@@ -5068,7 +5074,7 @@ declare class BaseGraphic extends BaseClass {
5068
5074
  /**
5069
5075
  * 属性信息
5070
5076
  */
5071
- attr: any;
5077
+ attr: any | BaseGraphic.AjaxAttr;
5072
5078
  /**
5073
5079
  * 样式信息
5074
5080
  */
@@ -5449,9 +5455,15 @@ declare class BaseGraphic extends BaseClass {
5449
5455
  readonly hasAjaxAttr: boolean;
5450
5456
  /**
5451
5457
  * 获取后端动态属性,当存在attr是动态属性配置时可用【attr.type === "ajax"】
5458
+ * @param [funOptions] - 参数
5459
+ * @param [funOptions.merge] - 是否合并已有静态属性,优先级高于attr.merge
5460
+ * @param [funOptions.formatData] - 可以对加载的数据进行格式化或转换操作
5452
5461
  * @returns 实时获取当前的动态属性值
5453
5462
  */
5454
- getAjaxAttr(): any;
5463
+ getAjaxAttr(funOptions?: {
5464
+ merge?: boolean;
5465
+ formatData?: (...params: any[]) => any;
5466
+ }): any;
5455
5467
  /**
5456
5468
  * 当前类的构造参数
5457
5469
  */
@@ -11026,10 +11038,6 @@ declare class ConeTrack extends CylinderEntity {
11026
11038
  * 夹角,半场角度,取值范围 0.01-89.99
11027
11039
  */
11028
11040
  angle: number;
11029
- /**
11030
- * 编辑处理类
11031
- */
11032
- readonly EditClass: EditCylinder;
11033
11041
  }
11034
11042
 
11035
11043
  /**
@@ -15642,6 +15650,13 @@ declare class GroupGraphic extends BaseGraphic {
15642
15650
  setStyle(newStyle: any, funOptions?: {
15643
15651
  merge?: boolean;
15644
15652
  }): BaseGraphic | any;
15653
+ /**
15654
+ * 设置整体透明度(globalAlpha值), 不是所有类型均支持,主要看数据类型和材质类型决定。
15655
+ * 对象本身透明度请用 graphic.setStyle({ opacity: value })
15656
+ * @param value - 透明度
15657
+ * @returns 无
15658
+ */
15659
+ setOpacity(value: number): void;
15645
15660
  /**
15646
15661
  * 将矢量数据导出为GeoJSON格式规范对象。
15647
15662
  * @param [options] - 参数对象:
@@ -16958,6 +16973,22 @@ declare class BasePolyPrimitive extends BasePrimitive {
16958
16973
  exact?: boolean;
16959
16974
  offset?: number;
16960
16975
  }): Promise<any>;
16976
+ /**
16977
+ * 是否 ajax后端动态坐标
16978
+ */
16979
+ readonly hasAjaxPostions: boolean;
16980
+ /**
16981
+ * 是否 time时序动态坐标
16982
+ */
16983
+ readonly hasTimePostions: boolean;
16984
+ /**
16985
+ * 获取当前时序坐标的开始时间和结束时间,返回的是Cesium.JulianDate格式
16986
+ */
16987
+ readonly timeRange: any;
16988
+ /**
16989
+ * 获取当前时序坐标的开始时间和结束时间,返回的是时间字符串
16990
+ */
16991
+ readonly timeRangeStr: any;
16961
16992
  }
16962
16993
 
16963
16994
  /**
@@ -18100,10 +18131,6 @@ declare class ConeTrackPrimitive extends CylinderPrimitive {
18100
18131
  * 夹角,半场角度,取值范围 0.01-89.99
18101
18132
  */
18102
18133
  angle: number;
18103
- /**
18104
- * 是否判断内部是否允许编辑(可外部传入禁用编辑,但不允许编辑的对象传入是无效的)
18105
- */
18106
- hasEdit: boolean;
18107
18134
  }
18108
18135
 
18109
18136
  declare namespace CorridorPrimitive {
@@ -19747,6 +19774,10 @@ declare namespace Pit {
19747
19774
  * @property imageBottom - 井底面贴图URL
19748
19775
  * @property diffHeight - 井下深度(单位:米)
19749
19776
  * @property [splitNum = 50] - 井墙面每两点之间插值个数(概略值,有经纬网网格来插值)
19777
+ * @property [repeat] - 四周墙横纵方向重复次数
19778
+ * @property [repeatX = 50] - 四周墙横方向重复次数,同repeat
19779
+ * @property [repeatY = 1] - 四周墙纵方向重复次数,同repeat
19780
+ * @property [repeatBottom = new Cesium.Cartesian2(1.0, 1.0)] - 底部横纵方向重复次数
19750
19781
  * @property [label] - 支持附带文字的显示
19751
19782
  */
19752
19783
  type StyleOptions = any | {
@@ -19754,6 +19785,10 @@ declare namespace Pit {
19754
19785
  imageBottom: string;
19755
19786
  diffHeight: number;
19756
19787
  splitNum?: number;
19788
+ repeat?: Cesium.Cartesian2;
19789
+ repeatX?: number;
19790
+ repeatY?: number;
19791
+ repeatBottom?: Cesium.Cartesian2;
19757
19792
  label?: LabelEntity.StyleOptions | any;
19758
19793
  };
19759
19794
  }
@@ -23363,6 +23398,7 @@ declare namespace GraphicLayer {
23363
23398
  * @param [options.tooltipOptions.noTitle] - 不显示标题
23364
23399
  * @param [options.tooltipOptions.showNull = false] - 是否显示空值
23365
23400
  * @param [options.contextmenuItems] - 绑定的右键菜单值,也可以bindContextMenu方法绑定
23401
+ * @param [options.attr] - 图层级对所有矢量数据的 属性信息做统一配置,常用于动态属性
23366
23402
  * @param [options.id = mars3d.Util.createGuid()] - 图层id标识
23367
23403
  * @param [options.pid] - 图层父级的id,一般图层管理中使用
23368
23404
  * @param [options.name] - 图层名称
@@ -23432,6 +23468,7 @@ declare class GraphicLayer extends BaseGraphicLayer {
23432
23468
  showNull?: string;
23433
23469
  };
23434
23470
  contextmenuItems?: any;
23471
+ attr?: any | BaseGraphic.AjaxAttr;
23435
23472
  id?: string | number;
23436
23473
  pid?: string | number;
23437
23474
  name?: string;
@@ -23538,6 +23575,10 @@ declare class GraphicLayer extends BaseGraphicLayer {
23538
23575
  * 卷帘对比时,设置所在的屏幕,NONE时不分屏[仅对Model小模型矢量数据有效]
23539
23576
  */
23540
23577
  splitDirection: Cesium.SplitDirection;
23578
+ /**
23579
+ * 属性信息 【用于对矢量数据统一绑定动态属性】
23580
+ */
23581
+ attr: any | BaseGraphic.AjaxAttr;
23541
23582
  /**
23542
23583
  * 手动刷新聚合
23543
23584
  * @returns 无
@@ -26298,7 +26339,7 @@ declare class ArcGisTileLayer extends BaseTileLayer {
26298
26339
  * @param options.rectangle.ymax - 最大纬度值, -90 至 90
26299
26340
  * @param [options.bbox] - bbox规范的瓦片数据的矩形区域范围,与rectangle二选一即可。
26300
26341
  * @param [options.zIndex] - 控制图层的叠加层次,默认按加载的顺序进行叠加,但也可以自定义叠加顺序,数字大的在上面(只对同类型图层间有效)。
26301
- * @param [options.chinaCRS = mars3d.ChinaCRS.BAIDU] - 标识瓦片的国内坐标系(用于自动纠偏或加偏),自动将瓦片转为map对应的chinaCRS类型坐标系。
26342
+ * @param [options.chinaCRS = mars3d.ChinaCRS.BAIDU] - 标识瓦片的国内坐标系(用于自动纠偏或加偏),自动将瓦片转为map对应的chinaCRS类型坐标系,如果加载不纠偏的原始瓦片,可以传入map相同的chinaCRS即可,比如 chinaCRS:mars3d.ChinaCRS.WGS84
26302
26343
  * @param [options.proxy] - 加载资源时要使用的代理服务url。
26303
26344
  * @param [options.queryParameters] - 一个对象,其中包含在检索资源时将发送的查询参数。比如:queryParameters: {'access_token': '123-435-456-000'},
26304
26345
  * @param [options.headers] - 一个对象,将发送的其他HTTP标头。比如:headers: { 'X-My-Header': 'valueOfHeader' },
@@ -29004,7 +29045,7 @@ declare namespace Map {
29004
29045
  * @property [showSun] - 是否显示太阳,如修改对象可以用 [map.scene.sun]{@link http://mars3d.cn/api/cesium/Sun.html}
29005
29046
  * @property [showMoon] - 是否显示月亮,如修改对象可以用 [map.scene.moon]{@link http://mars3d.cn/api/cesium/Moon.html}
29006
29047
  * @property [showSkyAtmosphere] - 是否显示地球大气层外光圈,如修改对象可以用 [map.scene.skyAtmosphere]{@link http://mars3d.cn/api/cesium/SkyAtmosphere.html}
29007
- * @property [fog] - 是否启用雾化效果,如修改对象可以用 [map.scene.fog]{@link http://mars3d.cn/api/cesium/fog.html}
29048
+ * @property [fog] - 是否启用雾化效果,如修改对象可以用 [map.scene.fog]{@link http://mars3d.cn/api/cesium/Fog.html}
29008
29049
  * @property [atmosphere] - 3D贴图和模型用于渲染天空大气、地面大气和雾的常见大气设置。
29009
29050
  * @property [atmosphere.lightIntensity = 10.0] - 用于计算地面大气颜色的光的强度。
29010
29051
  * @property [atmosphere.rayleighScaleHeight = 10000.0] - 地面大气散射方程中使用的瑞利尺度高度,单位为米。
@@ -36876,6 +36917,10 @@ declare class Task extends BaseThing {
36876
36917
  * @returns 是否成功删除
36877
36918
  */
36878
36919
  removeItem(id: number | string): boolean;
36920
+ /**
36921
+ * 释放所有子任务
36922
+ */
36923
+ disableAll(): void;
36879
36924
  /**
36880
36925
  * 根据配置数组获取实例化后的对象数组
36881
36926
  * @param list - 配置数组
@@ -37353,6 +37398,10 @@ declare type getSlope_endItem = (event: {
37353
37398
  * @param [options.imageBottom] - 当显示开挖区域的井时,井底面贴图URL
37354
37399
  * @param [options.diffHeight] - 当显示开挖区域的井时,设置所有区域的挖掘深度(单位:米)
37355
37400
  * @param [options.splitNum = 30] - 当显示开挖区域的井时,井墙面每两点之间插值个数(概略值,有经纬网网格来插值)
37401
+ * @param [options.repeat] - 当显示开挖区域的井时,井四周墙横纵方向重复次数
37402
+ * @param [options.repeatX = 50] - 当显示开挖区域的井时,井四周墙横方向重复次数,同repeat
37403
+ * @param [options.repeatY = 1] - 当显示开挖区域的井时,井四周墙纵方向重复次数,同repeat
37404
+ * @param [options.repeatBottom = new Cesium.Cartesian2(1.0, 1.0)] - 当显示开挖区域的井时,井底部横纵方向重复次数
37356
37405
  * @param [options.exact = false] - 是否进行精确计算, 传false时是否快速概略计算方式,该方式计算精度较低,但计算速度快,仅能计算在当前视域内坐标的高度
37357
37406
  * @param [options.czm = true] - true:使用cesium原生clippingPolygons接口来操作,false:使用mars3d自定义方式操作
37358
37407
  * @param [options.id = createGuid()] - 对象的id标识
@@ -37367,6 +37416,10 @@ declare class TerrainClip extends TerrainEditBase {
37367
37416
  imageBottom?: string;
37368
37417
  diffHeight?: number;
37369
37418
  splitNum?: number;
37419
+ repeat?: Cesium.Cartesian2;
37420
+ repeatX?: number;
37421
+ repeatY?: number;
37422
+ repeatBottom?: Cesium.Cartesian2;
37370
37423
  exact?: boolean;
37371
37424
  czm?: boolean;
37372
37425
  id?: string | number;
@@ -39662,13 +39715,15 @@ declare namespace PointUtil {
39662
39715
  * @param [options = {}] - 参数对象:
39663
39716
  * @param [options.heightReference = Cesium.HeightReference.CLAMP_TO_GROUND] - 高度参考,决定是否仅贴模型、仅贴地形、全部都考虑
39664
39717
  * @param [options.original = false] - 计算失败时是否返回原始高度值
39665
- * @param [options.min = -999] - 限定最小数,屏蔽异常数
39718
+ * @param [options.min] - 限定最小数,屏蔽异常数
39719
+ * @param [options.max] - 限定最大数,屏蔽异常数
39666
39720
  * @returns 贴地高度
39667
39721
  */
39668
39722
  function getHeight(scene: Cesium.Scene, position: Cesium.Cartesian3 | LngLatPoint, options?: {
39669
39723
  heightReference?: Cesium.HeightReference;
39670
39724
  original?: boolean;
39671
39725
  min?: number;
39726
+ max?: number;
39672
39727
  }): number;
39673
39728
  /**
39674
39729
  * 异步精确计算坐标的 贴地(或贴模型)高度
@@ -39874,6 +39929,13 @@ declare namespace PolyUtil {
39874
39929
  * @returns 缓冲后的新坐标数组
39875
39930
  */
39876
39931
  function bufferPoints(points: LngLatPoint[] | Cesium.Cartesian3[] | any[], width: number, steps?: number): LngLatPoint[];
39932
+ /**
39933
+ * 坐标数组整体移动到新的中心点位置
39934
+ * @param points - 坐标数组
39935
+ * @param centerNew - 新的中心点坐标
39936
+ * @returns 移动后的坐标点数组
39937
+ */
39938
+ function movePoints(points: LngLatPoint[] | Cesium.Cartesian3[] | any[], centerNew: Cesium.Cartesian3): Cesium.Cartesian3[];
39877
39939
  /**
39878
39940
  * 求坐标数组的矩形范围内 按 splitNum网格数插值的 granularity值
39879
39941
  * @param positions - 坐标数组
@@ -40882,6 +40944,13 @@ declare namespace Util {
40882
40944
  * @returns 无
40883
40945
  */
40884
40946
  function webglerror(): void;
40947
+ /**
40948
+ * 处理URL地址中参数,解析传入的 URL 和参数对象,然后将新的参数合并到 URL 中。如果 URL 中已经存在某些参数,则用新的参数覆盖它们。
40949
+ * @param url - 原始URL,其中可能已有参数
40950
+ * @param params - 需要新增的参数,如果url中已有进行覆盖
40951
+ * @returns 新的带参数的URL地址
40952
+ */
40953
+ function buildUrl(url: string, params: any): string;
40885
40954
  /**
40886
40955
  * 获取当前页面的url中的?传入参数对象集合
40887
40956
  * @returns 参数名与参数值的键值对