arcgis api 添加三维模型

现在需要在2000的global场景中添加SceneLayer。
图层中的建筑底面是有高程数据的,但是场景并没有添加高程,导致模型会悬浮在global场景上方。
设置了SceneLayer的elevationInfo的mode属性后仍然不管用。
请问有什么方式可以在不修改服务的情况下,无视z值,将模型贴合在场景表面
已邀请:

张佳期

赞同来自: 许丹石 李明

要么在桌面软件(arcgispro)中利用move to工具调整模型的z高度为0,要么将场景服务加载到webscene中,在webscene中调整模型绝对高度的偏移值,然后在前端中直接加载这个webscene。

刘恒

赞同来自:

自己把高程数据,发布成高程影像服务,然后加载到map中看看是否可行:
 
// Create a map with the world elevation layer overlaid by a custom elevation layer
const worldElevation = ElevationLayer({
  url: "//elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"
});
const customElevation = ElevationLayer({
  url: "https://my.server.com/arcgis/r ... ot%3B
});
const map = new Map({
  basemap: "topo-vector",
  ground: new Ground({
   layers: [ worldElevation, customElevation ]
  })
});
https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html 
 
https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=layers-scenelayer 
 

要回复问题请先登录注册