Call web service that can be reached by a url

01-09-2019 11:37 PM
New Contributor


In a web app builder gis ,how do i add a button that call a web service that can be reached by a url and then when finish refresh the map?

If you have examples it will be nice.

Thank you

0 Kudos
1 Reply
MVP Esteemed Contributor


   You would develop a custom widget and call the web service using esriRequest.

Here is a JS API sample that uses esriRequest:

Feature collection | ArcGIS API for JavaScript 3.27 

If you want the web service to be called from a button and not open a widget panel then you can look at my code for URL button widget on how to execute code on widget button click without have a panel open.

0 Kudos