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


JavaScript ArcGIS PointSymbol3D用法及代码示例


基本信息

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

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

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

类: esri/symbols/PointSymbol3D

继承: PointSymbol3D > Symbol3D > Symbol > Accessor

自从:用于 JavaScript 4.0 的 ArcGIS API

用法说明

PointSymbol3D 用于在 3D SceneView 中渲染具有 Point 几何的特征。 2D MapViews 不支持此符号类型。

PointSymbol3D 必须至少包含一个符号层才能在视图中渲染。必须使用以下一种或多种symbol layer 类型来定义 3D 点符号:

Symbol3DLayer 类型 扁平/体积 尺寸单位 示例
IconSymbol3DLayer flat points s3d-icon-circle
ObjectSymbol3DLayer volumetric meters s3d-object
TextSymbol3DLayer flat points s3d-text

请参阅Symbol3DLayerSymbol3D 以阅读有关 3D 符号、符号层以及它们如何相互关联的更多一般信息。

例子:

let symbol = {
  type: "point-3d",  // autocasts as new PointSymbol3D()
  symbolLayers: [{
    type: "object",  // autocasts as new ObjectSymbol3DLayer()
    width: 5,    // diameter of the object from east to west in meters
    height: 10,  // height of object in meters
    depth: 15,   // diameter of the object from north to south in meters
    resource: { primitive: "cube" },
    material: { color: "red" }
  }]
};

相关用法


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