ScreenSpaceEventHandler

new SuperMap3D.ScreenSpaceEventHandler(element)

Handle user input events. Custom functions can be added to execute on user input.
Name Type Default Description
element Canvas document optional The element to add the event to.

Members

staticSuperMap3D.ScreenSpaceEventHandler.mouseEmulationIgnoreMilliseconds

The amount of time, in milliseconds, that mouse events will be disabled after any touch event is received such that any simulated mouse events will be ignored.
Default Value: 800

Methods

destroy()undefined

Remove listeners held by this object

Once an object is destroyed, it should not be called; calling any function other than isDestroyed will result in DeveloperError abnormal. Therefore, the return value (undefined) is assigned to the object.
Returns:
Throws:
Example:
handler = handler && handler.destroy();
See:

getInputAction(type, modifier)

Returns the function to be executed on input events.
Name Type Description
type Number optional Enter the ScreenSpaceEventType of the event.
modifier Number optional The key of the KeyboardEventModifier held when the type event occurs.
See:

isDestroyed()Boolean

Returns true if this object is destroyed, otherwise false.

If this object is destroyed, it should not be used; calling any function other than isDestroyed will result in DeveloperError Abnormal.
Returns:
true if the object was destroyed, false otherwise.
See:

removeInputAction(type, modifier)

Removes the function to be executed on input events.
Name Type Description
type Number optional Enter the ScreenSpaceEventType of the event.
modifier Number optional The key of the KeyboardEventModifier held when the type event occurs.
See:

setInputAction(action, type, modifier)

Sets the function to be executed on input events.
Name Type Description
action function optional A function to execute when an input event occurs.
type Number optional Enter the ScreenSpaceEventType of the event.
modifier Number optional The key of the KeyboardEventModifier held when the type event occurs.
See: