Iwould really like to know if cesium has any SDK for android devices. Running cesium in a Webview (especially in older devices) causes my app to crash. Hello world example barely withstands, but the interpolation example gives me the following error.
@omar I was checking the feasibility of using Cesium JS for my next android project. As a result, I had done my testing on a low grade tablet(512 MB RAM). As you know, as there is no native implementation for android, I had to run it on the android webView. However doing so, really increased the load on the app (obvious when using Webgl on Android).
Hello world example barely runs, but the interpolation example causes gives me the error I had mentioned above in the question. Furthermore, my project would require the rendering of a 3D terrain, along with the rendering of a few a few aircraft models just as given in the interpolation example.
As you see the capabilities do differ across devices. I would really like to know the minimum requirements for running cesium smoothly, for my use case(mentioned in previous post) on low end android device webViews (latest phones might not have a problem). Is there any way to increase performance on such low spec devices.
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.
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.
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. ( -started/#your-first-app)
The html file is on local storage and loading that using WebView.
The button I mentioned is one of the three navigation buttons Androids have.
'back' button, 'home' button and 'overview' button (or maybe you call it 'recents' button).
In this case I am using 'overview' button but the 'home' button will also do the equivalent.
To cause this issue is to intercept the map drag event with these buttons.
Steps
1. Put your device on the table and keep both your hands free.
2. Open Sandcastle with 'Opera mini' and show the globe enough large, to be able to drag from the left to the right of the view.
3. Start dragging from the left toward the right.
4. When your finger is to reach about the center, push the 'overview' button with your other hand.
5. After the screen switched to the 'overview' then end dragging. And go back to 'Opera mini'.
6. Try to drag again and it's it.
If pasting my code or opening the url Omar has prepared, the log from cesium should look odd.
If I cause this issue, while the 'pointermove' events are invoking, the 'pointercancel' event will invoke, which seems OK.
But after that 'pointercancel' invokes every time I try to drag the map. The cancel event was working like a brake.
I think the 'pointermove' event has got a problem, so it invokes the 'pointercancel' event.
I have a web project (depends on WebGL) which works on computers, any browser. Now I am trying this project to be opened as an application on Android based mobile phones. I used WebView to accomplish this. My phone (Nexus 3) had Android 4.3 and as I learnt afterwards before Android 5, WebView component didn't support WebGL. With Android 5, WebView became an updatable independent component which depends on Chromium version 37 (can be updated) and started to support WebGL. So the error I was getting with Android 4.3 is expected.
After this I tried using another phone (Samsung galaxy S4 with Android 5 and Chrome version 43 on it). So then the application should have worked well, but still got error on WebView. I tried
get.webgl.org still the same error:
This still seemed like a configuration problem, so then I tried to open this on Chrome not on WebView yet still the same error. I enabled WebGL on Chrome following instuctions. `Firefox works fine though. I have three questions:
Is there any other way to open a WebGL project as an application. (I have read about cordova and cocoon.js but not sure if it can be accomplished through these.) So if there is one which works fine I'd rather go directly for it.
If you want to use android webview, your device must have android 5+ and your device must not be on gpu_blacklist. There is no device list for gpu_blacklist on the net that I can find, but there is a way to understand that your device is in the gpu_blacklist or not. Open chrome, then type chrome://gpu, then look at reset notification strategy field. If it is 0x8252 then your device supports webgl, if it is 0x0000 then your device is in the blacklist. So with android 5+ and your device not being on the gpu_blacklist, you can use webgl with android webview.
If you want to use chrome instead of android webview even with a device which is on gpu_blacklist, you must use chrome version 37+. To check it, open chrome, type chrome://version. After that open chrome, type chrome://flags, in that page enable webgl and override software rendering list fields. With that you can use webgl even with devices that on the gpu_blacklist or with devices that has os below android 5 on them.
If your device can't provide above requirements, like mine, you can use CrossWalk it works. However, the documentation is not well organized and you can't find much information other than its own documentation, in case you have problems with it. The reason CrossWalk works is when you build apk file you can send command line arguments like --ignore-gru-blacklist. However as the documentation states if you use this on devices that are on the gpu_blacklist, your application or the whole device might froze.
Welcome back to my second tutorial video! Building on our previous guide, this step-by-step tutorial will teach you how to integrate real-time location data from your Android device into a Cesium 3D realistic world within Unreal Engine 5.4 using the OSC (Open Sound Control) Protocol.
Integrating Android Location in Cesium : Access and transmit real-time GPS data from your Android device. to dynamically update the Cesium 3D world.
-android-location-with-cesium-photorealistic-3d-world-in-unreal-engine-5-using-osc-protocol
I have been trying to convert a topjson/geojson file to a cesium 3d tileset. I have been able run the conversion but i cannot get it to display in cesium. I feel that this may be caused by the coordinates not being converted correctly. I cannot figure out how to fix it. I tried using no coordinate system selected and LL-WGS84, but neither worked. I did notice the area cesium zoomed to changed but i could still not see the shapes. Any help would be greatly appreciated. Below is a link to the geo and topo json files i tried.
Does your Cesium map have a terrain? Could the data be under the terrain at 0 elevation? Have you checked the network section developer mode in your browser (F12) to see if .b3dm files are getting downloaded? I have found that converting to WGS84 gives best results in our maps, however, this could be due to configuration.
Also, if you add a background map to the data inspector and set the coordinate system of your data to LL84/WGS84 you should see your data in the right place in the 2D view (it will look really weird in 3D view but that's normal when in LL84).
So i added a map box background and i now see the problem. The shapes are tiny and not visible when i am not zoom very far in. I tried changing the coordinate system but tat had no effect. Do i need to scale? or transform the lat/long?
Scratch that last comment i had to reload the view. So i now see the shaped on the map correctly, but i still can see them on cesium. I am going to try and play with the elevation. as Suggested abbove
3D mapping technology has revolutionized how we visualize and interact with geospatial data. Among the various tools available for creating such immersive experiences, Cesium stands out as a powerful library for rendering 3D globes, maps, and geospatial data on the web.
For developers working with React, integrating Cesium into their applications can unlock a new dimension of interactivity and data presentation. This blog will explore how to combine these two technologies to create compelling 3D mapping applications.
Cesium is an open-source JavaScript library that enables developers to create 3D globes and maps with rich interactive features. Known for its robustness and high-performance rendering capabilities, Cesium allows for visualizing dynamic data sets on a virtual Earth. It's widely used in aerospace, defense, and real estate industries for tasks ranging from flight tracking to property visualization.
3a8082e126