管理及分析功能

6/11/2023

目前平台将量算、日照、可视域等空间分析、模型相关分析、地形相关分析、相机的管理类 等所有功能都统一封装为thing对象。

# 1. Thing类型清单

Thing均是继承自BaseThing (opens new window)类的子类对象。

目前有以下类型:

功能 类名 功能示例
图上量算 mars3d.thing.Measure (opens new window) 查看 (opens new window)
通视分析 mars3d.thing.Sightline (opens new window) 查看 (opens new window)
地表透明 mars3d.thing.Underground (opens new window) 查看 (opens new window)
日照分析 mars3d.thing.Shadows (opens new window) 查看 (opens new window)
天际线描边 mars3d.thing.Skyline (opens new window) 查看 (opens new window)
地形开挖 mars3d.thing.TerrainClip (opens new window) 查看 (opens new window)
地形开挖(planes方式) mars3d.thing.TerrainPlanClip (opens new window) 查看 (opens new window)
地形压平 mars3d.thing.TerrainFlat (opens new window) 查看 (opens new window)
地形抬升 mars3d.thing.TerrainUplift (opens new window) 查看 (opens new window)
等高线 mars3d.thing.ContourLine (opens new window) 查看 (opens new window)
坡度坡向分析 mars3d.thing.Slope (opens new window) 查看 (opens new window)
淹没分析(地球材质) mars3d.thing.FloodByMaterial (opens new window) 查看 (opens new window)
淹没分析(矢量面) mars3d.thing.FloodByGraphic (opens new window) 查看 (opens new window)
模型平面剖切 mars3d.thing.TilesetPlanClip (opens new window) 查看 (opens new window)
模型盒子裁剪 mars3d.thing.TilesetBoxClip (opens new window) 查看 (opens new window)
模型压平 mars3d.thing.TilesetFlat (opens new window) 查看 (opens new window)
模型裁剪 mars3d.thing.TilesetClip (opens new window) 查看 (opens new window)
模型淹没分析 mars3d.thing.TilesetFlood (opens new window) 查看 (opens new window)
限高分析 mars3d.thing.LimitHeight (opens new window) 查看 (opens new window)
地震模拟 mars3d.thing.TilesetShake (opens new window) 查看 (opens new window)
模型颜色校正 mars3d.thing.TilesetColorCorrection (opens new window) 查看 (opens new window)
绕点环绕飞行 mars3d.thing.RotatePoint (opens new window) 查看 (opens new window)
原地四周旋转 mars3d.thing.RotateOut (opens new window) 查看 (opens new window)
第一人称贴地漫游 mars3d.thing.FirstPersonRoam (opens new window) 查看 (opens new window)
视角历史记录 mars3d.thing.CameraHistory (opens new window) 查看 (opens new window)
街景视角模式 mars3d.thing.StreetView (opens new window) 查看 (opens new window)

# 2. thing的使用

平台的所有管理及分析功能类都继承于BaseThing类 (opens new window) ,管理及分析功能类均在mars3d.thing.*命名空间下面。 下面我们演示创建一个thing对象 ,并调用map.addThing添加到地图上。


var measure = new mars3d.thing.Measure({ 
  label: { //可设置文本样式
    color: '#ffffff',
    font_family: '楷体',
    font_size: 20,
    background: false,
  },
})
map.addThing(measure)

//测量长度
measure.distance()
1
2
3
4
5
6
7
8
9
10
11
12
13

# 2.1. 运行效果

新窗口查看
最后更新: 5/6/2024, 2:14:22 PM