Select to view content in your preferred language

How to call Feature Actions from popup/infoWindow?

1117
2
Jump to solution
05-09-2017 06:48 AM
BenedekSimó
Regular Contributor

I have successfully inserted a link in a popup window, like this. Now how can I call a Feature action (Export to CSV, View in Attribute Table, etc.) on a click on that link?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Benedek,

   It is as simple as calling code like this from your function:

var feature = this.mapManager.map.infoWindow.getSelectedFeature();
var fs = {features:[feature]};
var csvAct = FeatureActionManager.getInstance().getActionsByActionName("ExportToCSV")[0];
csvAct.onExecute(fs);

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Benedek,

   It is as simple as calling code like this from your function:

var feature = this.mapManager.map.infoWindow.getSelectedFeature();
var fs = {features:[feature]};
var csvAct = FeatureActionManager.getInstance().getActionsByActionName("ExportToCSV")[0];
csvAct.onExecute(fs);
BenedekSimó
Regular Contributor

Thank you, Robert!

0 Kudos