webapp builder widget customization

3464
7
Jump to solution
01-22-2016 05:26 AM
Labels (1)
shankarb
New Contributor

Hi,

Can we write the code for button click to zoom to a particular location on web map using webapp builder widget? If yes, please share the code snippet.

Thanks in advance

Regards

Shankar

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Shankar,

  Sure widgets support button and map actions. I threw together a sample to give you a jump start. One of the best ways to learn widget development is to look at code in existing widgets.

View solution in original post

7 Replies
shankarb
New Contributor

But I don't see any button click event written in those link for zooming on map.

0 Kudos
shankarb
New Contributor

Thanks for reply Robert

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Shankar,

   Well you have to start some where and the first step is to know how to create a custom widget. Then you would add you custom functionality to the widget. Adding a button is simple JS skill you will need to learn if you are going to be developing widgets for WAB. Are you wanting to zoom to a map point or an extent. Where is this location coming from, something hard coded?

0 Kudos
shankarb
New Contributor

Thanks Robert for quick tag.

I created custom widget suggested by ESRI WAB help and added button & its event but after deployment it is not functioning so question arises whether widgets supports button event & map actions? I was not able to find such code so suspected am i on right track?

Also through REST API I got geometry(point) as per my business rule where I want to zoom. It has to trigger by user by clicking "zoom" button on the widget.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Shankar,

  Sure widgets support button and map actions. I threw together a sample to give you a jump start. One of the best ways to learn widget development is to look at code in existing widgets.

shankarb
New Contributor

Many Thanks. The shared sample helped me a lot.

0 Kudos