Hello,
I am builder a custom widget that will be similar as the coordinate widget.
I am still a seed in the ground with ExB widget.


- User click on the cross
- then click on the map (a market will appear)
- the coordinate are save in variable
- then the user click on the button for some function to be executed
Everything is working except for the marker.
I want to be able to add a marker like this when I click on a map I don't know how to make the marker appear. I took inspiration from the coordinate widget. I copied this function into my code to start but...
const getMarkerGraphic = (mapPoint) => {
const symbol = new PictureMarkerSymbol({
url: require('./assets/pin-exb.svg'),
width: 12,
height: 22,
yoffset: 11
})
return new Graphic({
geometry: mapPoint,
symbol
})
}
Bu when I reload I get this (failed to load)

I am stuck there... any creation of any object will give me that problem ( const xyz = new Whatever() )
the function is not event called anywhere in my code at this point.
I coded my widget base on a function model (not a class). But I think the coordinate widget is also a function...

Any idea ?
Thanks
Sylvain