Here are a couple of approaches to dealing with touchevent as created on apple mobile devices.
-
Mouse Emulation for Touch Events:
Basically, it intercepts touchevents and turns them into
mouse events. The debug box prints out some of the
information available in the touchevents.
Note that it allows for the use of common control elements
(though the controls need to be supersized to use easily
outside the simulator on real devices).
Credits: This technique is straight
from Ross
Boucher. Special thanks to him for providing the code sample
and explanations.
-
Direct event calls to pan and zoom:
Traditional direct event handling approach. More work, but more control, less sideeffects.
Credits:
Based on event handling code provided by FAN Baiquan and the whatamap team
-
An integrative
approach: Based on suggestions by Tim Schaub,
this tries to work closely with the paradigm of touch and
the structures of OpenLayers.