Earth on Web: The road to cross browser

By Jordon Mears, Tech Lead Manager, Google Earth on Web

On Earth day 2017, we rebooted Google Earth as a web application on Google Chrome after a 12-plus year history as a desktop application installable on Windows, Mac and Linux. We have been really excited to bring Earth to the web (and Chromebooks) for the first time. However one of the questions we have gotten a lot from the technical community is why only Chrome?

Bringing Google Earth to the web was a multi-year effort. First, we rebuilt Google Earth’s rendering engine from the ground up. With the new rendering engine in place, designed to be cross platform (mobile and desktop) from the start, we set out to bring the desktop application to the web. At that time there were two major ways to bring native code into a browser: Emscripten/ASM.js and Native Client. After extensive prototyping of both options, we chose Native Client, a sandbox for running compiled C and C++ code in the browser efficiently and securely. For Google Earth, Native Client would give users the best performance, thanks to its native threading support.

Make no mistake, we were (and still are) thrilled to give people a new way to experience Google Earth — all within the browser. However we initially made a trade off by going with Native Client, as Chrome was the only browser using Native Client at the time.

It has always been our intention to bring Earth to as many people as possible on as many browsers as possible. Parallel to our efforts in building the first iteration of Earth on web, Google and the Chrome team have been active participants in the W3C process for WebAssembly. WebAssembly is really the first W3C based open standard for running native code in the browser, and they recently standardized their support for threading. WebAssembly also has the advantage of being supported by the four major browsers (Chrome, Edge, Firefox, Safari). So since the April launch of Earth on web, the Earth team has been working to port Earth on web over to WebAssembly from Native Client.

A few shots of Earth running in Firefox with WebAssembly.

We’re proud to show a demo of Earth for the first time running in WebAssembly on Chrome, Firefox and Chromium (with more browsers in the works) at this year’s Chrome Dev Summit.

As WebAssembly’s threading support continues to grow in popularity with browsers, we look forward to launching in a browser near you!