The Esri Community
Esri Technical Support
Esri Technical Certification
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 ...
Can I prevent automatic model generation when changing user attributes with python?
Network dataset problems
CASE Tool for ArcGIS
Creating many line features with python script
Feature Line Split