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();
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.