I'm now working on an android app using Cesium.
I noticed that while swiping the map, if I tap the "overview button" (the square button at the bottom) and then go back to my app, the map doesn't move smooth anymore.
So I tested it in Chrome and Opera mini and Chrome didn't cause the same problem but Opera mini did. Even if I reload the page, the issue continued.
I also tested to detect the view points using the ScreenSpaceEventHandler and javascript's TouchEvent. After causing the issue, ScreenSpaceEventHandler stopped to log the points continuously. But the TouchEvent seems to have no problem.
Is there anyway to prevent or recover this?
This is my code for testing.
var viewer = new Cesium.Viewer('cesiumContainer');
var logMovement = movement => console.log("cesium x: " + movement.endPosition.x + ", y: " + movement.endPosition.y);
var logTouchEvent = event => console.log("js touch x: " + event.changedTouches[0].pageX + ", y: " + event.changedTouches[0].pageY);
document.onmousemove = event => console.log("js mouse x: " + event.clientX + ", y: " + event.clientY);
viewer.screenSpaceEventHandler.setInputAction(logMovement, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
document.getElementById('cesiumContainer').addEventListener("touchmove", logTouchEvent, false);
I tested in Android 8 & 9 with the latest browsers.
Thanks.
This issue happens not only in my app but also in Opera mini, browsing Sandcastle. As far as I know it only happens on Androids excluding Chrome. My Mac and iPad didn't occurred this issue.
I believe this will happen easily. If you have an Android device and downloaded Opera mini and opened Sandcastle, while swiping the map and while your finger is still following the display, with your other hand tap the overview button and go back to Opera mini and you will get the awkward map. And if you're running my test code, I think the log will let you know what's happening.
My App for now, I'm not putting the Cesium.js file inside my app. Nor using other libraries and frameworks such as Cordova or anything else.
Just like it is written in the Tutorials. (https://cesium.com/docs/tutorials/getting-started/#your-first-app)
The html file is on local storage and loading that using WebView.
I believe that Opera mini is using WebView also. So I think this issue is something between WebView and Cesium.
But as Chrome is preventing this issue, I hope there is something I can do.
Thanks