The Esri Community
Services & Programs
GeoNet Resource Hub
to create and rate content, and to follow, bookmark, and share content with other members.
Disable onClick Event when Panning the map
Discussion created by
on Apr 8, 2013
on Apr 8, 2013 by evtguy
Show 0 Likes
I have a custom onClick event handler for my map. I'm finding that the handler is called when I click on the map to pan. Is there a way to disable the onClick event if the map is panning?
This content has been marked as final.
Show 1 comment
(Required, will not be published)
Apr 8, 2013 3:10 PM
A little hard to respond without knowing more about what you're doing with your OnClick event so I'll blindly offer a couple (untested) suggestions:
Would it be too awkard to switch your onClick code over to a onDblClick event? That way you avoid the conflicting situation entirely.
Perhaps you could add a conditional statement within your onClick event handler and check if map.OnPan has values. If it does, the map is panning so you know that you shouldn't perform your onClick code.
Show 0 Likes
Retrieving data ...
Looking to automate overwriting a hosted feature layer on Portal for ArcGIS.
arcgis.apps Suvery123 is not an attribute
ArcGIS API for python: find latest items
How do I get the ID of a web map layer?
Pro not showing full record count