当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


JavaScript ArcGIS PathSymbol3DLayer.width用法及代码示例


基本信息

以下是所在类或对象的基本信息。

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.width函数(或属性)的定义如下:

width Number


自从:ArcGIS 适用于 JavaScript 4.12 的 API

路径横截面的水平尺寸(以米为单位)。如果仅设置高度,则宽度设置为与高度相同的值。如果宽度和高度均未设置,则不会显示路径。

例子:

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

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 PathSymbol3DLayer.width。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。