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


JavaScript ArcGIS PathSymbol3DLayer.height用法及代碼示例


基本信息

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

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

ESM: import PathSymbol3DLayer from "@arcgis/core/symbols/PathSymbol3DLayer";

類: esri/symbols/PathSymbol3DLayer

繼承: PathSymbol3DLayer > Symbol3DLayer > Accessor

自從:用於 JavaScript 4.0 的 ArcGIS API

用法說明

PathSymbol3DLayer.height函數(或屬性)的定義如下:

height Number


自從:ArcGIS 適用於 JavaScript 4.12 的 API

路徑橫截麵的垂直尺寸(以米為單位)。如果僅設置寬度,則高度設置為與寬度相同的值。如果寬度和高度均未設置,則不會顯示路徑。

例子:

// create a path with a wall style
let wallPath = {
  type: "line-3d",  // autocasts as new LineSymbol3D()
  symbolLayers: [{
    type: "path",  // autocasts as new PathSymbol3DLayer()
    profile: "quad",  // creates a rectangular shape
    width: 1,  // path width in meters
    height: 20,  // path height in meters
    material: { color: "#a382cc" }
  }]
};
// create a path with a pipe style
let wallPath = {
  type: "line-3d",  // autocasts as new LineSymbol3D()
  symbolLayers: [{
    type: "path",  // autocasts as new PathSymbol3DLayer()
    profile: "circle",
    height: 20,  // path width in meters this also sets the width to 20 meters
    material: { color: "##a382cc" }
  }]
};

相關用法


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