symbols

AMD: require(["esri/symbols"], (symbols) => { /* code goes here */ });
ESM: import * as symbols from "@arcgis/core/symbols.js";
Object: esri/symbols
Since: ArcGIS Maps SDK for JavaScript 4.8

A convenience module for importing Symbol classes when developing with TypeScript. For example, rather than importing symbols one at a time like this:

import SimpleFillSymbol from "esri/symbols/SimpleFillSymbol";
import SimpleMarkerSymbol from "esri/symbols/SimpleMarkerSymbol";

You can use this module to import them on a single line:

import { SimpleFillSymbol, SimpleMarkerSymbol } from "esri/symbols";

This module also allows you to implement type guards on geometries, making your code smarter.

import { Symbol } from "esri/symbols";

function logSymbol(symbol: Symbol): void {
  if (symbol.type === "simple-marker") {
    // new at 4.8, the compiler knows the symbol is a SimpleMarkerSymbol
    console.log("symbol color: ", symbol.color);
  }
  else {
    // the compiler knows the symbol must be one of the other symbols
    console.log("symbol type: ", symbol.type);
  }
}

Type Definitions

CIMSymbol

Type Definition
CIMSymbol CIMSymbol

CIMSymbol.

ExtrudeSymbol3DLayer

Type Definition
ExtrudeSymbol3DLayer ExtrudeSymbol3DLayer

ExtrudeSymbol3DLayer.

FillSymbol

Type Definition
FillSymbol PictureFillSymbol |SimpleFillSymbol

FillSymbol types.

FillSymbol3DLayer

Type Definition
FillSymbol3DLayer FillSymbol3DLayer

FillSymbol3DLayer.

Font

Type Definition
Font Font

Font.

IconSymbol3DLayer

Type Definition
IconSymbol3DLayer IconSymbol3DLayer

IconSymbol3DLayer.

LabelSymbol3D

Type Definition
LabelSymbol3D LabelSymbol3D

LabelSymbol3D.

LineSymbol3D

Type Definition
LineSymbol3D LineSymbol3D

LineSymbol3D.

LineSymbol3DLayer

Type Definition
LineSymbol3DLayer LineSymbol3DLayer

LineSymbol3DLayer.

MarkerSymbol

Type Definition
MarkerSymbol PictureMarkerSymbol |SimpleMarkerSymbol

MarkerSymbol types.

MeshSymbol3D

Type Definition
MeshSymbol3D MeshSymbol3D

MeshSymbol3D.

ObjectSymbol3DLayer

Type Definition
ObjectSymbol3DLayer ObjectSymbol3DLayer

ObjectSymbol3DLayer.

PathSymbol3DLayer

Type Definition
PathSymbol3DLayer PathSymbol3DLayer

PathSymbol3DLayer.

PictureFillSymbol

Type Definition
PictureFillSymbol PictureFillSymbol

PictureFillSymbol.

PictureMarkerSymbol

Type Definition
PictureMarkerSymbol PictureMarkerSymbol

PictureMarkerSymbol.

PointSymbol3D

Type Definition
PointSymbol3D PointSymbol3D

PointSymbol3D.

PolygonSymbol3D

Type Definition
PolygonSymbol3D PolygonSymbol3D

PolygonSymbol3D.

SimpleFillSymbol

Type Definition
SimpleFillSymbol SimpleFillSymbol

SimpleFillSymbol.

SimpleLineSymbol

Type Definition
SimpleLineSymbol SimpleLineSymbol

SimpleLineSymbol.

SimpleMarkerSymbol

Type Definition
SimpleMarkerSymbol SimpleMarkerSymbol

SimpleMarkerSymbol.

Symbol

Type Definition
Symbol Symbol2D3D |WebStyleSymbol

Symbol types.

Symbol2D3D

Type Definition
Symbol2D3D Symbol2D |Symbol3D

Symbol2D3D types.

Symbol3D types.

TextSymbol

Type Definition
TextSymbol TextSymbol

TextSymbol.

TextSymbol3DLayer

Type Definition
TextSymbol3DLayer TextSymbol3DLayer

TextSymbol3DLayer.

WaterSymbol3DLayer

Type Definition
WaterSymbol3DLayer WaterSymbol3DLayer

WaterSymbol3DLayer.

WebStyleSymbol

Type Definition
WebStyleSymbol WebStyleSymbol

WebStyleSymbol.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.