dojox/geo/openlayers/TouchInteractionSupport (version 1.10)

Summary

class to handle touch interactions on a OpenLayers.Map widget

Usage

var foo = new TouchInteractionSupport(map);
dojox/geo/openlayers/TouchInteractionSupport
Parameter Type Description
map OpenLayers.Map

the Map widget this class provides touch navigation for.

See the dojox/geo/openlayers/TouchInteractionSupport reference documentation for more information.

Property Summary

Method Summary

  • _doubleTapHandler(touchEvent) action performed on the map when a double tap was triggered
  • _getFingerSpacing(touchEvent) computes the distance between the first two fingers
  • _getTouchBarycenter(touchEvent) returns the midpoint of the two first fingers (or the first finger location if only one)
  • _isDoubleTap(touchEvent) checks whether the specified touchStart event is a double tap (i.e. follows closely a previous touchStart at approximately the same location)
  • _touchEndHandler(touchEvent) action performed on the map when a touch end was triggered
  • _touchMoveHandler(touchEvent) action performed on the map when a touch move was triggered
  • _touchStartHandler(touchEvent) action performed on the map when a touch start was triggered

Properties

Methods

_doubleTapHandler(touchEvent)

action performed on the map when a double tap was triggered

Parameter Type Description
touchEvent TouchEvent

a touch event

_getFingerSpacing(touchEvent)

computes the distance between the first two fingers

Parameter Type Description
touchEvent Event

a touch event

Returns:float | undefined

a distance. -1 if less that 2 fingers

_getTouchBarycenter(touchEvent)

returns the midpoint of the two first fingers (or the first finger location if only one)

Parameter Type Description
touchEvent TouchEvent

a touch event

Returns:any | object

the midpoint as an {x,y} object.

_isDoubleTap(touchEvent)

checks whether the specified touchStart event is a double tap (i.e. follows closely a previous touchStart at approximately the same location)

Parameter Type Description
touchEvent TouchEvent

a touch event

Returns:boolean

true if this event is considered a double tap

_touchEndHandler(touchEvent)

action performed on the map when a touch end was triggered

Parameter Type Description
touchEvent Event

a touch event

_touchMoveHandler(touchEvent)

action performed on the map when a touch move was triggered

Parameter Type Description
touchEvent Event

a touch event

_touchStartHandler(touchEvent)

action performed on the map when a touch start was triggered

Parameter Type Description
touchEvent Event

a touch event

Error in the documentation? Can’t find what you are looking for? Let us know!