webglearth / webglearth2-offline

Example of offline use of WebGL Earth 2 with tiles rendered by MapTiler
https://github.com/webglearth/webglearth2-offline/archive/gh-pages.zip
105 stars 44 forks source link

Earth not visible when completely offline #2

Open sharmaeklavya2 opened 9 years ago

sharmaeklavya2 commented 9 years ago

I have apache running on Ubuntu 15.04. I used that to access index.html. It worked. Later, I cleared my browser's cache and disconnected myself from the Internet. It stopped working. When I now open index.html, I just see a blank page with a gradient; no earth.

I thought maybe I haven't set up things correctly, so I turned off security restrictions in Firefox (by setting security.fileuri.strict_origin_policy to false). But earth was again absent when I directly opened index.html.

klokan commented 9 years ago

If you run local webserver in python - what error do you see in developer console? What browser and version do you use?

sharmaeklavya2 commented 9 years ago

Well I didn't run a webserver in python. I used apache. I'm running Mozilla Firefox 40.0. Today I checked the developer console. When I click the network tab, I see that most files are being locally fetched. But some of them are being fetched from www.webglearth.com and some from www.google-analytics.com. Here is the list of files being fetched from the internet:

  1. http://www.google-analytics.com/analytics.js
  2. http://www.webglearth.com/v2/Workers/cesiumWorkerBootstrapper.js
  3. http://www.webglearth.com/v2/Workers/transferTypedArrayTest.js
  4. http://www.google-analytics.com/r/collect?a_really_big_querystring
  5. http://www.webglearth.com/v2/Workers/createVerticesFromHeightmap.js
sebastian-marinescu commented 8 years ago

Hi @sharmaeklavya2

Your requests to webglearth.com came, because you didn't adapt the CESIUM_BASE_URL at the top of the webglearth.js. And then you also have to locally save the contents of the v2-folder.

The other requests to google-analytics.com come from the webglearth's source code. That's something I also just stumbled upon while testing the offline-capability. So @klokan, why is it that you collect data? And why don't you share this information on your website? Also if it should throw an uncatched error, it would break the rest of the JavaScript, what probably happened to OP.

klokan commented 8 years ago

We need the tracking via Google Analytics for the CDN hosted version of WebGLEarth API. It appeared in this repo by accident - simply because we have used the same javascript as it is on CDN.

Feel free to make a pull request removing it here - and ideally another PR into https://github.com/webglearth/webglearth2 where inclusion of the tracking code will be wrapped by a constant defined by a new "define" in the plovr api.json.

We are busy on other tasks right now, unfortunately. We may get to this at later point, if time allows. But if you make the PRs we review and accept it.