创建局部场景

尝试一下在线预览

此示例展示了如何创建本地场景并将其添加到 SceneView 。 在此示例中的场景中添加了两图层 - 一图层描绘堪萨斯州南部的油气井,另一图层显示附近地震的位置。在场景的表面和表面之下渲染这些图层。

scene-local-beneath

您可以在底图下方导航,以查看与附近油气井的真实位置和深度相关的地震确切位置。 要探索地表以下的要素,您必须倾斜视图。 要在曲面下方倾斜,请右键单击视图并向上拖动鼠标。 右键单击并向下拖动鼠标以向后倾斜到表面上方。 点击这里 阅读有关在 SceneView 中导航的更多信息。

SceneView viewingMode 属性决定了场景是globallocal。设置 clippingArea 来定义局部场景的边界。

地面上的 navigationConstraint 属性控制用户在局部场景中的地面以下导航的能力。

              
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Creating a new map
const map = new Map({
  basemap: "topo-vector"
});

// Add the scene to a SceneView
const view = new SceneView({
  container: "viewDiv",
  map: map,
  // Indicates to create a local scene
  viewingMode: "local",
  // Use the extent defined in clippingArea to define the bounds of the scene
  clippingArea: kansasExtent
});

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.