I have a DynamicMapServiceLayer and I'd like to fire off a method when someone clicks on it, (like you can with on("click") in a feature layer), is this possible?
Hi David,
There may be a way to do this directly, but I haven't found it.
Instead I listen for a click event on the map, then loop through the list of Dynamic layers and fire off the method (eg, running a query task).
Steve
I agree with Stephen. Since the API reference doesn't list 'click' as an event, that's your answer right there, you can't do it that way. I have always used to map click event to either execute a queryTask or identifyTask together with some sort of looping.
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.