webglearth / webglearth2

[UNMAINTAINED] WebGL Earth 2 - the source code of the project
Apache License 2.0
884 stars 212 forks source link

Touch-/Mobile-/Drag-Support in latest Chrome-Version(s) #89

Open sebastian-marinescu opened 7 years ago

sebastian-marinescu commented 7 years ago

Hi all,

I'm trying to make webglearth work with a touch-screen. So far no luck. The readme says it supports mobile devices, but I can't confirm that either.

I am initializing my earth like that:

            var earth = new WE.map('world', {
                zoom: 1,
                altitude: 7000000,
                minAltitude: 3500000,
                maxAltitude: 20000000,
                tilting: false,
                atmosphere: false,
                sky: true,
                dragging: true
            });

What am I doing wrong?


Edit: As it turns out I've done nothing wrong and the framework is touch-able. There seems to be a problem with the latest chrome-version(s) that is blocking this functionality. I'll leave this issue open for anybody also encountering this problem.

As the time of writing I'm using Chrome 56.0.2924.87 (64-bit).

For the NodeWebkit (nwjs) App I'm developing I fell back to Chrome 52 and it works.

thijssmudde commented 7 years ago

Just encountered this problem. Chrome for android still has this issue.

forresto commented 7 years ago

Would updating Cesium fix this?

sebastian-marinescu commented 2 years ago

Just stumbled upon another little thing: after many years, I had to update the application. But the touch wasn't working anymore on touch-devices.

It turns out, that my wrapper-div needed a css-rule of touch-action: none, to not interfere with the handlers of this library.

"Funny" enough, on their website https://www.webglearth.com/ it works on touch, but on the demos (like http://examples.webglearth.com/examples/helloworld.html) it doesn't. Comparing them, I found that css-rule, and fixed my application.