Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I place a html div over the Google Earth plugin? Involves wmode, I imagine

I'm having trouble laying a html div over the Google Earth plugin in a web application, any help would be appreciated.

It's fine for Map, Terrain and Hybrid mode, but on 'Earth' mode, the Flash kicks in and automatically layers the map on top.

Z-indexing doesn't help.

Presumably I could do something like:

document.getElementById('flashDiv').setAttribute('wmode', 'opaque');

but given that Google's stuff is compiled on the fly, it makes it much more difficult. Viewing the generated code hasn't helped here. Again, due to it being compiled on the fly, stuff like SWFObject can't save the day...

Has anyone encountered anything similar? I've spent the morning trawling the Google Earth API group without much avail.

Update: After more hair-pulling, the answer may lie with an iframe shim. I may have also jumped to the conclusion that the plugin is Flash-based. Investigating...

alt text
(source: googlepages.com)

like image 347
Neil McKeown Avatar asked Feb 03 '09 12:02

Neil McKeown


People also ask

What is Google Earth plugin used for?

Google Earth is a computer program that renders a 3D representation of Earth based primarily on satellite imagery. The program maps the Earth by superimposing satellite images, aerial photography, and GIS data onto a 3D globe, allowing users to see cities and landscapes from various angles.

How to scale an image in Google Earth?

Simply go to the View menu and click Scale Legend> The scale will change constantly as you zoom in and out.

Is Google Earth web based?

While it's available as a desktop and mobile app, you can actually use Google Earth directly within your web browser.

What is Google Earth Web?

Google Earth is a geobrowser that accesses satellite and aerial imagery, topography, ocean bathymetry, and other geographic data over the internet to represent the Earth as a three-dimensional globe.


2 Answers

I put together a demo showing how to use IFRAME shims here:

http://earth-api-samples.googlecode.com/svn/trunk/demos/customcontrols/index.html

like image 145
Roman Nurik Avatar answered Nov 11 '22 16:11

Roman Nurik


The there is no direct support for overlaying 'z-indexing' a div either in the Api or Dom. The plug-in loads an executable file that, in very simple terms, punches a hole in the browser window. Using the 'iframe shim' technique is the standard workaround although transparency can be tricky.

There is an open Feature request for this functionality to be added to the api - the comments section has some good information and links.

Also, there is a great online demo of this here

like image 5
Fraser Avatar answered Nov 11 '22 17:11

Fraser