Mobile device click not working


Marker click events are not working in mobile device

1 Like

For mobile devices you need to use Touch Events.


Thanks for reply,

zoom event’s are working as well as touch event’s working,

my concern is click event not working on mobile device.

I need your help. ASAP


You need something like this:

window.addEventListener("touchend", onTouchEnd);

and in the onTouchEnd function you need to get coordinates of the touch (see here or here), transform them into NDC and the rest of the logics is the same like you do here

window.onmousedown = function(event) {

Because they are implemented in the orbit controls. So you can see how it works under the hood, taking a look at the source code of the controls

PS I’m sure, there are many advanced users on the forum who could give you more valuable advice :slight_smile:

1 Like