import Map from "esri/Map";import MapView from "esri/views/MapView";import Graphic from "esri/Graphic";import GraphicsLayer from "esri/layers/GraphicsLayer";import webMercatorUtils from "esri/geometry/support/webMercatorUtils"; async function kewlClickHandler(event) { function initGo(); function initGo(Map, MapView, Graphic, GraphicsLayer, webMercatorUtils) { const map = view.map; var graphicsLayer = new GraphicsLayer(); // here map.add(graphicsLayer); ...... etc
No matter how I arrange my function params and header module includes; I repeatedly get the following error with my initDrawLine
function:
Uncaught (in promise) TypeError: GraphicsLayer is not a constructor
New to arcgis-js-api, any ideas?