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
Deprecated since version 4.32. Use unionTypes to import union types, or individual modules to import classes.

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
Deprecated since version 4.32. Import CIMSymbol directly instead.

CIMSymbol.

ExtrudeSymbol3DLayer

Type Definition
ExtrudeSymbol3DLayer ExtrudeSymbol3DLayer
Deprecated since version 4.32. Import ExtrudeSymbol3DLayer directly instead.

ExtrudeSymbol3DLayer.

FillSymbol

Type Definition
FillSymbol PictureFillSymbol |SimpleFillSymbol
Deprecated since version 4.32. Use FillSymbol2DUnion instead.

FillSymbol types.

FillSymbol3DLayer

Type Definition
FillSymbol3DLayer FillSymbol3DLayer
Deprecated since version 4.32. Import FillSymbol3DLayer directly instead.

FillSymbol3DLayer.

Font

Type Definition
Font Font
Deprecated since version 4.32. Import Font directly instead.

Font.

IconSymbol3DLayer

Type Definition
IconSymbol3DLayer IconSymbol3DLayer
Deprecated since version 4.32. Import IconSymbol3DLayer directly instead.

IconSymbol3DLayer.

LabelSymbol3D

Type Definition
LabelSymbol3D LabelSymbol3D
Deprecated since version 4.32. Import LabelSymbol3D directly instead.

LabelSymbol3D.

LineSymbol3D

Type Definition
LineSymbol3D LineSymbol3D
Deprecated since version 4.32. Import LineSymbol3D directly instead.

LineSymbol3D.

LineSymbol3DLayer

Type Definition
LineSymbol3DLayer LineSymbol3DLayer
Deprecated since version 4.32. Import LineSymbol3DLayer directly instead.

LineSymbol3DLayer.

MarkerSymbol

Type Definition
MarkerSymbol PictureMarkerSymbol |SimpleMarkerSymbol
Deprecated since version 4.32. Use MarkerSymbol2DUnion instead.

MarkerSymbol types.

MeshSymbol3D

Type Definition
MeshSymbol3D MeshSymbol3D
Deprecated since version 4.32. Import MeshSymbol3D directly instead.

MeshSymbol3D.

ObjectSymbol3DLayer

Type Definition
ObjectSymbol3DLayer ObjectSymbol3DLayer
Deprecated since version 4.32. Import ObjectSymbol3DLayer directly instead.

ObjectSymbol3DLayer.

PathSymbol3DLayer

Type Definition
PathSymbol3DLayer PathSymbol3DLayer
Deprecated since version 4.32. Import PathSymbol3DLayer directly instead.

PathSymbol3DLayer.

PictureFillSymbol

Type Definition
PictureFillSymbol PictureFillSymbol
Deprecated since version 4.32. Import PictureFillSymbol directly instead.

PictureFillSymbol.

PictureMarkerSymbol

Type Definition
PictureMarkerSymbol PictureMarkerSymbol
Deprecated since version 4.32. Import PictureMarkerSymbol directly instead.

PictureMarkerSymbol.

PointSymbol3D

Type Definition
PointSymbol3D PointSymbol3D
Deprecated since version 4.32. Import PointSymbol3D directly instead.

PointSymbol3D.

PolygonSymbol3D

Type Definition
PolygonSymbol3D PolygonSymbol3D
Deprecated since version 4.32. Import PolygonSymbol3D directly instead.

PolygonSymbol3D.

SimpleFillSymbol

Type Definition
SimpleFillSymbol SimpleFillSymbol
Deprecated since version 4.32. Import SimpleFillSymbol directly instead.

SimpleFillSymbol.

SimpleLineSymbol

Type Definition
SimpleLineSymbol SimpleLineSymbol
Deprecated since version 4.32. Import SimpleLineSymbol directly instead.

SimpleLineSymbol.

SimpleMarkerSymbol

Type Definition
SimpleMarkerSymbol SimpleMarkerSymbol
Deprecated since version 4.32. Import SimpleMarkerSymbol directly instead.

SimpleMarkerSymbol.

Symbol

Type Definition
Symbol Symbol2D3D |WebStyleSymbol
Deprecated since version 4.32. Use SymbolUnion instead.

Symbol types.

Deprecated since version 4.32. Use Symbol2DUnion instead.

Symbol2D types.

Symbol2D3D

Type Definition
Symbol2D3D Symbol2D |Symbol3D
Deprecated since version 4.32. Use Symbol2D3DUnion instead.

Symbol2D3D types.

Deprecated since version 4.32. Use Symbol3DUnion instead.

Symbol3D types.

Deprecated since version 4.32. Use Symbol3DLayerUnion instead.

Symbol3DLayer types.

TextSymbol

Type Definition
TextSymbol TextSymbol
Deprecated since version 4.32. Import TextSymbol directly instead.

TextSymbol.

TextSymbol3DLayer

Type Definition
TextSymbol3DLayer TextSymbol3DLayer
Deprecated since version 4.32. Import TextSymbol3DLayer directly instead.

TextSymbol3DLayer.

WaterSymbol3DLayer

Type Definition
WaterSymbol3DLayer WaterSymbol3DLayer
Deprecated since version 4.32. Import WaterSymbol3DLayer directly instead.

WaterSymbol3DLayer.

WebStyleSymbol

Type Definition
WebStyleSymbol WebStyleSymbol
Deprecated since version 4.32. Import WebStyleSymbol directly instead.

WebStyleSymbol.

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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close