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

478
1
10-26-2020 09:48 AM
Henry_PeleshBW
Occasional Contributor

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

0 Kudos
1 Reply
NicolasGIS
Occasional Contributor III

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

0 Kudos