AnsweredAssumed Answered

Uncaught (in promise) TypeError: GraphicsLayer is not a constructor

Question asked by trying2drawlinebetween2points on Jan 8, 2020
Latest reply on Jan 8, 2020 by csgeosol1
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?

Outcomes