var lastSelectedGraphic; function init() { /** ** Do your init work here... **/ map.graphics.enableMouseEvents(); dojo.connect(map.graphics, "onClick", function(evt) { lastSelectedGraphic = evt.graphic; // You can do more work with the graphic here, but it is also stored for access anytime time later. }); } init(); From there you can get what you need, I think.
var lastSelectedGraphic; function init() { /** ** Do your init work here... **/ map.graphics.enableMouseEvents(); dojo.connect(map.graphics, "onClick", function(evt) { lastSelectedGraphic = evt.graphic; // You can do more work with the graphic here, but it is also stored for access anytime time later. }); } init();
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.