< meta name = "viewport" content = "width=device-width, initial-scale=1, shrink-to-fit=no" />
< title >Using Esri Icon Fonts with map graphics | Sample | ArcGIS Maps SDK for JavaScript</ title >
< link rel = "stylesheet" href = "https://js.arcgis.com/5.0/esri/themes/light/main.css" />
<!-- Load the ArcGIS Maps SDK for JavaScript from CDN -->
< script type = "module" src = "https://js.arcgis.com/5.0/" ></ script >
const [ Map , PopupTemplate , MapView , Graphic , Point ] = await $arcgis . import ([
"@arcgis/core/PopupTemplate.js" ,
"@arcgis/core/views/MapView.js" ,
"@arcgis/core/Graphic.js" ,
"@arcgis/core/geometry/Point.js" ,
const view = new MapView ({
/*************************
*************************/
// First create a point geometry
const point1 = new Point ({
// Then create another point geometry
const point2 = new Point ({
// Then create another point geometry
const point3 = new Point ({
// Then create another point geometry
const point4 = new Point ({
// Then create a final point geometry
const point5 = new Point ({
// Create a symbol for drawing the point
type : "text" , // autocasts as new TextSymbol()
text : " \ue61d " , // esri-icon-map-pin
// autocasts as new Font()
family : "CalciteWebCoreIcons" ,
// Create a graphic and add the geometry and symbol to it
const pointGraphic1 = new Graphic ({
// Create another graphic and add the geometry and symbol to it
const pointGraphic2 = new Graphic ({
// Create another graphic and add the geometry and symbol to it
const pointGraphic3 = new Graphic ({
// Create another graphic and add the geometry and symbol to it
const pointGraphic4 = new Graphic ({
// Create one last graphic and add the geometry and symbol to it
const pointGraphic5 = new Graphic ({
// Add the graphics to the view's graphics layer