Good Afternoon,
I was just wondering if it is possible via JS to get a layers popup information? I was hoping to just grab the info and send it to another widget.
Any help is greatly appreciated.
Mark
I don't believe this is possible when working from within the WAB framework of Portal. You would likely need to use the developer edition of WAB if you're not using it already.
I am using the Developer version of WAB.
Mark,
In JS the way you get the current popup info is:
var atts = this.map.infoWindow.getSelectedFeature().attributes;
Thanks Rob.
I gather I will need some type of handler to listen to the map for when a feature is selected? Using on click doesn't seem right since it would fire where ever the user clicks on the map. =]
figured it out. =]
evtHandler = this.map.infoWindow.on('set-features', function(){
var atts = this.map.infoWindow.getSelectedFeature().attributes;
console.log(atts);
});
thanks again.