Hi,
I'm getting an error when adding a graphiclayer to the map with view.map.add(graphiclayer). When I use view.map.addMany([graphiclayer]) the error doesn't show up.
The console error is:
[esri.support.LayersMixin] #add() The item being added is not a Layer or a Promise that resolves to a Layer.
hi,
i think you need not to write view.map.add(gl) instead of this you can directly do map.add(gl)
Thanks for the suggestion, but the map is a property of the MapView and is an instance of Map.
Hello @FreddyBroring,
I'm experiencing the same issue. Have you found a solution to this problem?
Hi @jauhari_mani, I can't remember the exact cause of the problem (been a long time). It had something to do with package versions if I recall correcltly. If I were you, then migrate directly to the latest version of the API and use the latest packages in your package.json if you are using npm and a build tool like webpack.
Also, consult the jsapi resources for examples how to build: https://github.com/Esri/jsapi-resources/tree/main/esm-samples