AnsweredAssumed Answered

map.infowindow.getselectedfeature() returning undefined and How to get the currently selected feature ?

Question asked by aesriuser on May 18, 2017
Latest reply on May 18, 2017 by rscheitlin

When I select a geometry on map, the method map.infoWindow.getSelectedFeature() always returns "undefined". This behaviour is not working code below:

 

map = new Map("mapDiv", {});

map.infoWindow.on("selection-change", function ()

{ var graphic = map.infoWindow.getSelectedFeature(); // graphics is always "undefined" }

 

How to get the currently selected feature ?

Thank you!

Outcomes