mars3d 3.10.7 → 3.10.9

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.10.7
5
- * 编译日期:2025-10-24 21:04
4
+ * 版本信息:v3.10.9
5
+ * 编译日期:2025-11-28 10:57
6
6
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
7
7
  * 使用单位:火星科技免费公开版 ,2025-07-01
8
8
  */
@@ -143,7 +143,7 @@
143
143
  min-width: 100px;
144
144
  padding: 2px 5px;
145
145
  font-size: 11px;
146
- z-index: 1000;
146
+ z-index: 20170825;
147
147
  opacity: 0.8;
148
148
  -khtml-opacity: 0.8;
149
149
  -moz-opacity: 0.8;
@@ -906,7 +906,6 @@
906
906
  }
907
907
  .mars3d-popup-content {
908
908
  margin: 10px;
909
- line-height: 1.4;
910
909
  font-size: 13px;
911
910
  max-width: 700px;
912
911
  min-width: 50px;
package/mars3d.d.ts CHANGED
@@ -2,8 +2,8 @@
2
2
  /**
3
3
  * Mars3D三维可视化平台 mars3d
4
4
  *
5
- * 版本信息:v3.10.7
6
- * 编译日期:2025-10-24 21:04
5
+ * 版本信息:v3.10.9
6
+ * 编译日期:2025-11-28 10:57
7
7
  * 版权所有:Copyright by 火星科技 http://mars3d.cn
8
8
  * 使用单位:火星科技免费公开版 ,2025-07-01
9
9
  */
@@ -4132,6 +4132,88 @@ declare class TaskItem extends BaseClass {
4132
4132
  toJSON(): any;
4133
4133
  }
4134
4134
 
4135
+ /**
4136
+ * 计算GeoJSON要素的面积
4137
+ * @param geojson - 需要计算面积的GeoJSON要素
4138
+ * @returns 面积值,如果计算出错则返回0
4139
+ */
4140
+ declare function area(geojson: any): number;
4141
+
4142
+ /**
4143
+ * 计算GeoJSON要素的边界框(Bounding Box)
4144
+ * @param geojson - 需要计算边界框的GeoJSON要素
4145
+ * @returns 包含[minX, minY, maxX, maxY]的数组
4146
+ */
4147
+ declare function bbox(geojson: any): any[];
4148
+
4149
+ /**
4150
+ * 创建贝塞尔曲线
4151
+ * @param line - 输入的线要素
4152
+ * @param options - 可选配置参数
4153
+ * @returns 贝塞尔曲线要素,如果出错则返回原始线要素
4154
+ */
4155
+ declare function bezierSpline(line: any, options: any): any;
4156
+
4157
+ /**
4158
+ * 对线要素进行偏移
4159
+ * @param coordinates - 坐标数组
4160
+ * @param distance - 偏移距离
4161
+ * @param options - 可选配置参数
4162
+ * @returns 偏移后的坐标数组,如果出错则返回原始坐标数组
4163
+ */
4164
+ declare function lineOffset(coordinates: any[], distance: number, options: any): any[];
4165
+
4166
+ /**
4167
+ * 创建缓冲区
4168
+ * @param feature - 输入要素
4169
+ * @param radius - 缓冲区半径
4170
+ * @param options - 可选配置参数
4171
+ * @returns 带缓冲区的要素,如果出错则返回原始要素
4172
+ */
4173
+ declare function buffer(feature: any, radius: number, options: any): any;
4174
+
4175
+ /**
4176
+ * 创建凸包
4177
+ * @param geojson - 输入要素
4178
+ * @param options - 可选配置参数
4179
+ * @returns 凸包要素,如果出错则返回原始要素
4180
+ */
4181
+ declare function convex(geojson: any, options: any): any;
4182
+
4183
+ /**
4184
+ * 在指定边界框内创建点网格
4185
+ * @param bbox - 边界框 [minX, minY, maxX, maxY]
4186
+ * @param cellSide - 网格单元边长
4187
+ * @param options - 可选配置参数
4188
+ * @returns 点网格要素集合,如果出错则返回空要素集合
4189
+ */
4190
+ declare function pointGrid(bbox: any[], cellSide: number, options: any): any;
4191
+
4192
+ /**
4193
+ * 判断点是否在多边形内
4194
+ * @param point - 点要素
4195
+ * @param polygon - 多边形要素
4196
+ * @param options - 可选配置参数
4197
+ * @returns 点在多边形内返回true,否则返回false,出错时返回false
4198
+ */
4199
+ declare function booleanPointInPolygon(point: any, polygon: any, options: any): boolean;
4200
+
4201
+ /**
4202
+ * 计算面要素的质心中心点
4203
+ * @param coordinates - 面要素的坐标数组
4204
+ * @param height - 可选的高度值,默认为0
4205
+ * @returns 质心坐标[x, y, z],如果出错或坐标数少于3则返回null
4206
+ */
4207
+ declare function centerOfMass(coordinates: any[], height: number): any[] | null;
4208
+
4209
+ /**
4210
+ * 简化GeoJSON坐标
4211
+ * @param coords - 坐标数组
4212
+ * @param options - 简化选项,包括tolerance等参数
4213
+ * @returns 简化后的坐标数组,如果出错则返回原始坐标数组
4214
+ */
4215
+ declare function simplify(coords: any[], options: any): any[];
4216
+
4135
4217
  /**
4136
4218
  * 特效(后处理) 基类
4137
4219
  * @param [options] - 参数对象,包括以下:
@@ -8448,9 +8530,13 @@ declare namespace VolumeCloud {
8448
8530
  * @param [options.steps] - 色带对应的数值数组
8449
8531
  * @param [options.threshold = 100/255] - 筛选值,超出该数值的不展示
8450
8532
  * @param [options.detail = 1000] - 精细度
8451
- * @param [options.xCut = -0.5] - X轴裁剪,取值范围:-0.5至0.5
8452
- * @param [options.yCut = -0.5] - Y轴裁剪,取值范围:-0.5至0.5
8453
- * @param [options.zCut = 0.5] - Z轴裁剪,取值范围:-0.5至0.5
8533
+ * @param [options.clip] - 裁剪区
8534
+ * @param [options.clip.xmin = -0.5] - 裁掉X轴方向小于该比例的值,取值范围:-0.5至0.5
8535
+ * @param [options.clip.xmax = 0.5] - 裁掉X轴方向大于该比例的值,取值范围:-0.5至0.5
8536
+ * @param [options.clip.ymin = -0.5] - 裁掉Y轴方向小于该比例的值,取值范围:-0.5至0.5
8537
+ * @param [options.clip.ymax = 0.5] - 裁掉Y轴方向大于该比例的值,取值范围:-0.5至0.5
8538
+ * @param [options.clip.zmin = -0.5] - 裁掉Z轴方向小于该比例的值,取值范围:-0.5至0.5
8539
+ * @param [options.clip.zmax = 0.5] - 裁掉Z轴方向大于该比例的值,取值范围:-0.5至0.5
8454
8540
  * @param [options.id = createGuid()] - 矢量数据id标识
8455
8541
  * @param [options.name] - 矢量数据名称
8456
8542
  * @param [options.show = true] - 矢量数据是否显示
@@ -8463,14 +8549,23 @@ declare class VolumeCloud extends BasePrimitive {
8463
8549
  steps?: number[];
8464
8550
  threshold?: number;
8465
8551
  detail?: number;
8466
- xCut?: number;
8467
- yCut?: number;
8468
- zCut?: number;
8552
+ clip?: {
8553
+ xmin?: number;
8554
+ xmax?: number;
8555
+ ymin?: number;
8556
+ ymax?: number;
8557
+ zmin?: number;
8558
+ zmax?: number;
8559
+ };
8469
8560
  id?: string | number;
8470
8561
  name?: string;
8471
8562
  show?: boolean;
8472
8563
  eventParent?: BaseClass | boolean;
8473
8564
  });
8565
+ /**
8566
+ * 裁剪区
8567
+ */
8568
+ clip: any;
8474
8569
  }
8475
8570
 
8476
8571
  declare namespace DivBoderLabel {
@@ -12248,6 +12343,10 @@ declare class EllipsoidEntity extends BasePointEntity {
12248
12343
  * @returns 矢量对象
12249
12344
  */
12250
12345
  addScanPlane(planeOptions: EllipsoidEntity.ScanPlaneOptions): Cesium.Entity;
12346
+ /**
12347
+ * 扫描面Entity对象数组
12348
+ */
12349
+ readonly scanPlane: Cesium.Entity[];
12251
12350
  /**
12252
12351
  * 移除单个指定的扫描面
12253
12352
  * @param entity - addScanPlane返回的矢量对象
@@ -23706,6 +23805,7 @@ declare namespace GraphicLayer {
23706
23805
  * @param [options.contextmenuItems] - 绑定的右键菜单值,也可以bindContextMenu方法绑定
23707
23806
  * @param [options.attr] - 图层级对所有矢量数据的 属性信息做统一配置,常用于动态属性
23708
23807
  * @param [options.availability] - 指定时间范围内显示该对象
23808
+ * @param [options.plotScale] - 设置JB基准比例尺,决定了标号的在这个比例尺下显示为基准进行缩放 (依赖 mars3d-plot 插件)
23709
23809
  * @param [options.id = mars3d.Util.createGuid()] - 图层id标识
23710
23810
  * @param [options.pid] - 图层父级的id,一般图层管理中使用
23711
23811
  * @param [options.name] - 图层名称
@@ -23779,6 +23879,7 @@ declare class GraphicLayer extends BaseGraphicLayer {
23779
23879
  contextmenuItems?: any;
23780
23880
  attr?: any | BaseGraphic.AjaxAttr;
23781
23881
  availability?: Cesium.TimeIntervalCollection | Cesium.TimeInterval | any[] | any;
23882
+ plotScale?: number;
23782
23883
  id?: string | number;
23783
23884
  pid?: string | number;
23784
23885
  name?: string;
@@ -23802,6 +23903,17 @@ declare class GraphicLayer extends BaseGraphicLayer {
23802
23903
  flyTo?: boolean;
23803
23904
  flyToOptions?: any;
23804
23905
  });
23906
+ /**
23907
+ * 设置JB基准比例尺(依赖 mars3d-plot 插件)
23908
+ * @param scale - 基准比例尺值
23909
+ * @param [redraw = true] - 是否按新基准比例尺重绘所有标号
23910
+ */
23911
+ setPlotScale(scale: number, redraw?: number): void;
23912
+ /**
23913
+ * 获取当前图层的JB基准比例尺
23914
+ * @returns 比例尺值
23915
+ */
23916
+ getPlotScale(): number;
23805
23917
  /**
23806
23918
  * 是否连续标绘
23807
23919
  */
@@ -25553,6 +25665,11 @@ declare class TilesetLayer extends BaseGraphicLayer {
25553
25665
  readonly position: Cesium.Cartesian3;
25554
25666
  /**
25555
25667
  * 模型当前中心点坐标
25668
+ * @example
25669
+ * tiles3dLayer.readyPromise.then(() => {
25670
+ * console.log("模型加载完成", tiles3dLayer)
25671
+ * const center = tiles3dLayer.center
25672
+ * })
25556
25673
  */
25557
25674
  center: LngLatPoint;
25558
25675
  /**
@@ -33754,7 +33871,7 @@ declare namespace PointPlot {
33754
33871
  * @property [text.color = "#ff0000"] - 颜色
33755
33872
  * @property [text.font_size] - 文字大小
33756
33873
  * @property [text.font_family] - 字体
33757
- * @property [text.direction] - 注记位置
33874
+ * @property [text.direction] - 注记位置, 可选值: 正下方: 0、 正右方: 1、 正上方: 2、 正左方: 3、 右上: 4、右下: 5、 左上: 6、 左下: 7、 居中: 8
33758
33875
  * @property [text.offset] - 注记与符号距离
33759
33876
  * @property [text.bold] - 是否粗体
33760
33877
  * @property [text.underline] - 是否带有下划线
@@ -34075,6 +34192,22 @@ declare namespace PlotUtil {
34075
34192
  * })
34076
34193
  */
34077
34194
  const readyPromise: Promise<any>;
34195
+ /**
34196
+ * 标号列表清单
34197
+ * @example
34198
+ * mars3d.PlotUtil.readyPromise.then(() => {
34199
+ * console.log("标号列表", mars3d.PlotUtil.symbolTree)
34200
+ *
34201
+ * mars3d.Util.downloadFile("标号列表.json", JSON.stringify(mars3d.PlotUtil.symbolTree))
34202
+ * })
34203
+ */
34204
+ const symbolTree: any;
34205
+ /**
34206
+ * 获取当前地图所在视域的比例尺值(可以用于设置JB基准比例尺)
34207
+ * @param scene - 地图场景对象
34208
+ * @returns 比例尺
34209
+ */
34210
+ function getMapScale(scene: Cesium.Scene): number;
34078
34211
  }
34079
34212
 
34080
34213
  /**
@@ -38270,6 +38403,72 @@ declare class FloodByMaterial extends TerrainEditBase {
38270
38403
  clear(): void;
38271
38404
  }
38272
38405
 
38406
+ declare namespace ShortestPath {
38407
+ /**
38408
+ * 当前类支持的{@link EventType}事件类型
38409
+ * @example
38410
+ * //绑定监听事件
38411
+ * thing.on(mars3d.EventType.change, function (event) {
38412
+ * console.log('发送了变化', event)
38413
+ * })
38414
+ * @property endItem - 多个数据异步分析时,完成其中一个时的回调事件
38415
+ * @property end - 多个数据异步分析时,完成所有的回调事件
38416
+ */
38417
+ type EventType = {
38418
+ endItem: string;
38419
+ end: string;
38420
+ };
38421
+ }
38422
+
38423
+ /**
38424
+ * 根据地形和最大坡度限制,进行最短路径分析
38425
+ * @param [options] - 参数对象,包括以下:
38426
+ * @param [options.tooltip] - 可以指定绑定tooltip
38427
+ * @param [options.tooltipOptions] - tooltip弹窗时的配置参数,也支持如pointerEvents等{@link Tooltip}构造参数
38428
+ * @param [options.popup] - 可以指定绑定popup
38429
+ * @param [options.popupOptions] - popup弹窗时的配置参数,也支持如pointerEvents等{@link Popup}构造参数
38430
+ * @param [options.id = createGuid()] - 对象的id标识
38431
+ * @param [options.enabled = true] - 对象的启用状态
38432
+ * @param [options.eventParent] - 指定的事件冒泡对象,默认为所加入的map对象,false时不冒泡事件
38433
+ */
38434
+ declare class ShortestPath extends BaseThing {
38435
+ constructor(options?: {
38436
+ tooltip?: (...params: any[]) => any;
38437
+ tooltipOptions?: Tooltip.StyleOptions | any;
38438
+ popup?: (...params: any[]) => any;
38439
+ popupOptions?: Popup.StyleOptions | any;
38440
+ id?: string | number;
38441
+ enabled?: boolean;
38442
+ eventParent?: BaseClass | boolean;
38443
+ });
38444
+ /**
38445
+ * 添加计算的 位置
38446
+ * @param startPoint - 起点坐标
38447
+ * @param endPoint - 终点坐标
38448
+ * @param [options = {}] - 控制参数,包括:
38449
+ * @param [options.splitNum = 100] - 插值数,横纵等比分割的网格个数(概略值,有经纬网网格来插值)
38450
+ * @param [options.maxSlope = 20] - 最大坡度, 路线走低于该坡度值的地方
38451
+ * @param [options.scale = 1.1] - 包围圆圈范围扩大搜寻范围倍数
38452
+ * @returns 异步计算完成的 最短路径坐标集合
38453
+ */
38454
+ analyze(startPoint: LngLatPoint | Cesium.Cartesian3 | any[], endPoint: LngLatPoint | Cesium.Cartesian3 | any[], options?: {
38455
+ splitNum?: number;
38456
+ maxSlope?: number;
38457
+ scale?: number;
38458
+ }): Promise<LngLatPoint[]>;
38459
+ /**
38460
+ * 异步计算最短路径
38461
+ * @param options - 参数对象,具有以下属性:
38462
+ * @param options.map - Map地图对象
38463
+ * @param [options.splitNum = 8] - 插值数,横纵等比分割的网格个数(概略值,有经纬网网格来插值)
38464
+ * @returns 异步计算完成的 最短路径坐标集合
38465
+ */
38466
+ static getShortestPath(options: {
38467
+ map: Map;
38468
+ splitNum?: number;
38469
+ }): Promise<LngLatPoint[]>;
38470
+ }
38471
+
38273
38472
  declare namespace Slope {
38274
38473
  /**
38275
38474
  * 当前类支持的{@link EventType}事件类型
@@ -41589,6 +41788,12 @@ declare namespace Util {
41589
41788
  * @returns 是否为简单类型(包括:String\Boolean\number\Array)
41590
41789
  */
41591
41790
  function isSimpleType(value: any): boolean;
41791
+ /**
41792
+ * 延迟承诺函数,同setTimeout
41793
+ * @param ms - 毫秒数
41794
+ * @returns 返回承诺对象
41795
+ */
41796
+ function sleep(ms: number): Promise<void>;
41592
41797
  /**
41593
41798
  * 判断当前Cesium库 是否mars3d修改后的版本(mars3d-cesium库)
41594
41799
  */
@@ -42590,6 +42795,7 @@ declare namespace thing {
42590
42795
 
42591
42796
  export { FloodByGraphic }
42592
42797
  export { Slope }
42798
+ export { ShortestPath }
42593
42799
  export { TerrainPlanClip }
42594
42800
 
42595
42801
  export { FloodByMaterial }