Using Esri Icon Fonts with map graphics

One potential use of the Esri Icon Fonts is to use them as symbol property of Graphic.

In the code snippet below, a TextSymbol is created by specifying the color, text, and font. The font property is created by autocasting the Font class. Set the font family property toCalciteWebCoreIcons to access the Esri Icon Fonts.

1
2
3
4
5
6
7
8
9
10
const textSymbol = {
  type: "text", // autocasts as new TextSymbol()
  color: "#7A003C",
  text: "\ue61d", // esri-icon-map-pin
  font: {
    // autocasts as new Font()
    size: 36,
    family: "CalciteWebCoreIcons" // Esri Icon Font
  }
};

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

The developer dashboard has moved

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