For a list of Map Control events, see VEMap Events.
When the event fires, you can specify either the name of the function to call or the function itself. The following example shows each option.
For the keyboard and mouse events, the custom function is executed before the default action is executed. If the custom function returns false, the default action is executed. If the custom function returns true, the default action is not executed. For example, if you have attached the onLeftMouseDoubleClick event, then your custom function is executed first. If it returns false, the default map behavior, which is to zoom-in, is executed. If it returns true, the zoom-in behavior is disabled.
You can also perform actions based on the type of object associated with the event. The VEShape Class object is normally the object associated with an event.
Note: |
|---|
|
If you specify the entire function to attach, as opposed to just the function name, it will be impossible to detach it later.
|
See the VEMap Events topic for more information.