AnsweredAssumed Answered

Executing a javascript function from a link/button in a callout

Question asked by mturnbullesriaustralia-com-au-esridist Employee on Jul 9, 2019
Latest reply on Jul 10, 2019 by rscheitlin

I am embedding a WAB Dev Ed application into a customers content management system web page and the customer has a requirement to send an attribute of a clicked feature back to the content management system.

The obvious solution would be to configure a link/button in the callout configuration within the web map to execute some logic, but this is not allowed and any javascript calls are filtered out of the web map.

The next approach could be to use feature actions at the WAB level, which would provide a means to execute a javascript function but by default these are not obvious or easily accessible from the callout (click ellipsis to show context menu, select appropriate feature action).

Is it possible to include a call to a feature action from a button/link created in the callout? If so, how?

Alternatively, can a feature action be added as a link to the callout footer, like the "zoom to" link? If so, how?

Can the callout footer be customised to include a javascript function call with an attribute of the selected feature as a parameter?

 

Thanks

Outcomes