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...
(source: googlepages.com)
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.
Simply go to the View menu and click Scale Legend> The scale will change constantly as you zoom in and out.
While it's available as a desktop and mobile app, you can actually use Google Earth directly within your web browser.
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.
I put together a demo showing how to use IFRAME
shims here:
http://earth-api-samples.googlecode.com/svn/trunk/demos/customcontrols/index.html
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With