InfoWindow Events - WAB

2064
2
Jump to solution
07-12-2016 10:17 PM
HamishKingsbury2
New Contributor II

Hey

I'm trying to get popups/infowindows to communicate with a custom widget. What i'm wanting to do is when a popup/infowindow appears (ie map is clicked) to grab some values from the popup/infowindow and use the min the widget.

I've tried the events in the js api but can't seem to get anything working....

Has anyone tried this before or has some code snippets that facilitate this functionality?

Cheers

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Hamish,

You need to add an event listener to the this.map.infoWindow set-features event, then you can use the this.map.infoWindow.getSelectedFeature() to get the graphic object that is selected and then get to its attributes.

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Hamish,

You need to add an event listener to the this.map.infoWindow set-features event, then you can use the this.map.infoWindow.getSelectedFeature() to get the graphic object that is selected and then get to its attributes.

HamishKingsbury2
New Contributor II

Excellent, Thank you Robert

0 Kudos