var layerMarkers = new GraphicsLayer();
path.forEach((p: any) => {
var graphic = new Graphic({
geometry: {
type: "point",
latitude: p[1],
longitude: p[0],
spatialReference: view.spatialReference,
},
symbol: {
type: "simple-marker", // autocasts as new SimpleFillSymbol
color: [255, 10, 10],
outline: {
// autocasts as new SimpleLineSymbol()
color: [255, 255, 255],
width: 2,
},
},
});
layerMarkers.add(graphic);
// map view
view.map.add(layerMarkers);