[OpenLayers-Users] Problem with click event in mobile browsers

Christian Spanring cspanring at gmail.com
Sun Jul 17 18:41:24 EDT 2011


Hi,

I'm having problems with a 'click' event in mobile browsers. A 'click'
event registered with

    map.events.register('click', map, clickEvent);

doesn't seem to fire in default browsers on Android 2.3, 3.2 and iOS
4.2 (works without error on desktop browsers).

I'm trying to read the coordinates a user 'tapped' on a map with something like

    function clickEvent(e) {
        var clickCoord = e.object.getLonLatFromPixel(e.xy);
    }

without much luck so far.

Is there something fundamentally wrong with my approach or is this a
known issue with mobile browsers?

I'm working with OpenLayers 2.x at 0b9555a4c81fb1f94d56.

Thanks!
Christian


More information about the Users mailing list