To perform an action when the user taps on the map, override the onTap() method:
mobileViewer. MyNewControl = OpenLayers.Class(mobileViewer.Control,
{
initializeControl: function(options)
{
},
onTap: function(e)
{
alert(‘Tap at: ‘ + e.clientX + ‘, ‘ + e.clientY);
}
});