With the demise of the Google Earth API fast approaching we are looking at what alternatives are available. For some use cases, one possibility is to try and implement what you want to do within Google Earth rather than with the Google Earth plugin. In order to see what is possible we need to know more about the capabilities of Google Earth’s internal web browser.
Google Earth’s internal browser is most obvious when you open a link in a Placemark or if you click the “Earth Gallery” button found at the top of the Layers section. Depending on your settings this will open a web page in Google Earth. However, we prefer to have Google Earth open links in our normal browser. You can achieve this by turning on the setting “Tools->Options->General->Display->Show web results in external browser”.
What we are most interested in is the fact that Google Earth’s internal browser is used in Placemark popups. Because Placemarks are rendered using a browser you can do many things in them that you can do in a web page. We have seen in the past that it is possible to use Adobe Flash in Placemarks and one of the built-in layers uses this functionality. However, most people will not have it installed and may have difficulty installing it. JavaScript, on the other hand, works well and should work for everyone.
So what browser does Google Earth use? We can put a little JavaScript in a popup and it will tell us:
Mozilla/5.0 (Windows; N; ; en-US) AppleWebKit/532.4 (KHTML, like Gecko) Google Earth Pro/7.1.5.1557 Safari/532.4
For comparison the current version of Chrome says:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36
The important part is “AppleWebKit/532.4”, which tells us that it is based on the same layout engine as Google Chrome, Safari and Opera. However, it is an older version than the one currently found in those browsers.
Popups also support the IFrame tag, which allows you to insert any external website into a popup. This means that we can easily do a feature test with the website html5test.com.
As you can see above, it is not very HTML 5 compatible, attaining a score of only 119 out of 555, whereas the current version of Google Chrome scores 521 out of 555.
To try the above tests for yourself in Google Earth download this KML file.
In future posts we will explore what functionality can be achieved with popups and JavaScript.
About Timothy Whitehead
Timothy has been using Google Earth since 2004 when it was still called Keyhole before it was renamed Google Earth in 2005 and has been a huge fan ever since. He is a programmer working for Red Wing Aerobatx and lives in Cape Town, South Africa.
Does anyone know what engine exactly they were using prior to Chrome (which was introduced with what? GE 4 or 5? )
I remember how their switching to Chrome broke many of my own placemarks (had a number of webcams placed that would simply stream a live video feed “just like that” in the pop-up, basically the MJPEG output like many cameras offer it – the Chrome engine didn’t support MJPEG output and either showed just a static image or nothing at all).
Hello. I’m a relative newbie trying to set up a system to map events with a timeline for widespread public use. I have discovered that the standard YouTube embedding code (iframe) does not work to display a video inside a placemark popup in Google Earth. It is recommended to use the “old” YouTube embedding code; however, that uses Flash which of course won’t work in iOS. I did get the linked video to show in Google’s KML viewer gadget. However, I don’t want to depend on the user logging into a Google account and launching the gadget.
The embedded iframe method does work in the latest version of Google Earth. What version were you trying it in?