Use ArcGIS JavaScript API to create a button that displays a graphic of the current map extent?

43
1
10-26-2020 09:48 AM
Highlighted
New Contributor III

Hello all,

I'd like to use the ArcGIS JavaScript API to create a button that displays a graphic of the current map extent. I'd like to then incorporate this in my ArcGIS Experience Builder project. Please let me know if anyone can guide me through this process.

Thanks,

Henry

Reply
0 Kudos
1 Reply
Highlighted
Regular Contributor

Hi,

You could try using arcgis-js-cli utility:

GitHub - Esri/arcgis-js-cli: CLI to build a template application and widgets using the ArcGIS API fo... 

It has a parameter to scaffold an experience builder widget:

'arcgis widget my-widget -t exb'

And from there build you button and logic behind !

Hope that help

Reply
0 Kudos