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


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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。