Esri / esri-loader

A tiny library to help load ArcGIS API for JavaScript modules in non-Dojo applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sketch widget: graphics not visible

Biboba opened this issue · comments

Expected behavior

Hello,

I am trying to use the sketch widget with esri-loader and React but after drawing, my graphic is not displayed contrary to JS API sample sketch-geometries. I would expect it to be displayed just like it is when using the CDN version.

Actual behavior

No error is displayed and but no graphic also.

Steps to reproduce the behavior

Here is a link to a codepen based on yours @tomwayson "arcgis-map-with-react-hooks".

I am pretty new to React so I may be doing something wrong ?

Many thanks for your help and apologize in advance if it is a false positiv !

If you add webmap.layers.add(layer); before creating the view it works.

Hmmm... this is embarassing :)
It's been a long day I guess.
Many thanks for having taken the time to reply to me. Much appreciated !