當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


JavaScript ArcGIS meshUtils.createFromElevation用法及代碼示例

基本信息

以下是所在類或對象的基本信息。

AMD: require(["esri/geometry/support/meshUtils"], (meshUtils) => { /* code goes here */ });

ESM: import * as meshUtils from "@arcgis/core/geometry/support/meshUtils";

對象: esri/geometry/support/meshUtils

自從:用於 JavaScript 4.7 的 ArcGIS API

用法說明

meshUtils.createFromElevation函數(或屬性)的定義如下:

createFromElevation (source, extent, options) {Promise<Mesh>}


通過從常規網格上的高程服務中采樣高程數據來創建網格幾何。

參數:

類型說明

從中查詢高程數據的源。

extent Extent

創建網格的範圍。

options Object
可選的

其他選項。

params.material MeshMaterial
可選的

用於網格的材料。

options.demResolution Number|String
可選的
默認值:汽車

控製水平分辨率(像元大小),以米為單位進行高程數據采樣(默認為 auto )。有關不同設置的更多詳細信息,請參閱ElevationLayer.queryElevation

返回:

類型 說明
Promise<Mesh> 解析為表示指定範圍內的高程數據的網格幾何圖形的承諾。

例子:

// Create a mesh by sampling the ground
meshUtils.createFromElevation(map.ground, extent)
    .then(function(mesh) {
      // Do something with the mesh
    });

// Create a mesh by sampling the ground surface currently in view
meshUtils.createFromElevation(view.groundView.elevationSampler, view.extent)
    .then(function(mesh) {
      // Do something with the mesh
    });

相關用法


注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 meshUtils.createFromElevation。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。