Nokia Maps API Reference

Contents

Interface nokia.maps.dom.TouchEventTarget

Interface Summary

This class is a virtual interface that exists only for documentation purposes. Each class implementing this interface delcares that it can act as the target for certain events. Each event in this interface (and therefore also within the classes implementing the interface) represents an event of a specific type.

The following example shows event handling for events of the type "click":

// Note that "obj" can be either a DOM node or any other JavaScript object.
var obj = nokia.maps.dom.EventTarget( {} );
obj.addListener("click", function (evt) {
	console.log("This is the '"+evt.type+"' event!");
});

obj.dispatch( new nokia.maps.dom.Event({
	type: "click"
});

The example creates an instant of nokia.maps.dom.EventTarget, adds a listener for "click" events to it, and dispatches a "click" event to all registered listeners (in this case one) - the listeners receive the object that represents the target of the event.

For more information about dispatching events, please refer to the documentation of the nokia.maps.dom.EventTarget.

Events
dbltap(evt)
This event is fired after a two tap events have been fired in a certain amount of time.
Parameters:
{nokia.maps.dom.TouchEvent} evt An object representing the event
gesturechange(evt)
This high-level event is fired whenever either of the two finger making a gesture is moved, changing the properties of the gesture.
Parameters:
{nokia.maps.dom.TouchEvent} evt An object representing the event
gestureend(evt)
This high-level event is fired as soon as the gesture ends, for example because one of the two fingers touching the touch screen are lifted.
Parameters:
{nokia.maps.dom.TouchEvent} evt An object representing the event
gesturestart(evt)
This high-level event is fired when two or more fingers touch the touch screen and are used to make a "gesture".
Parameters:
{nokia.maps.dom.TouchEvent} evt An object representing the event
longpress(evt)
This event is fired after a finger has been pressed against the screen for a certain amount of time without starting a drag or gesture.
Parameters:
{nokia.maps.dom.TouchEvent} evt An object representing the event
tap(evt)
This event is fired after a touchstart and touchend has occurred at the same target and only if neither of the touchstart nor the touchend event has been canceled and no gesture was started in between.
Parameters:
{nokia.maps.dom.TouchEvent} evt An object representing the event
touchend(evt)
This event is fired when a finger is lifted from a touch screen.
Parameters:
{nokia.maps.dom.TouchEvent} evt An object representing the event
touchmove(evt)
This event is fired when a finger touches and moves on a touch screen. This event is different from a mousemove event, because the user can touch the screen with more than one finger at the same time.
Parameters:
{nokia.maps.dom.TouchEvent} evt An object representing the event
touchstart(evt)
This event is fired when a finger is touches a touch screen.
Parameters:
{nokia.maps.dom.TouchEvent} evt An object representing the event
Documentation generated on Thu Dec 15 2011 15:14:29 GMT+0100 (CET).