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();
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.