如何在 Google Earth 插件上放置 html div?涉及wmode,我想 [英] How can I place a html div over the Google Earth plugin? Involves wmode, I imagine

查看:24
本文介绍了如何在 Google Earth 插件上放置 html div?涉及wmode,我想的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网络应用程序中在 Google 地球插件上放置 html div 时遇到问题,我们将不胜感激.

适用于地图、地形和混合模式,但在地球"模式下,Flash 启动并自动将地图分层.

Z 索引没有帮助.

大概我可以这样做:

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

但考虑到 Google 的东西是即时编译的,这让它变得更加困难.查看生成的代码在这里没有帮助.同样,由于它是动态编译的,SWFObject 之类的东西无法挽救...

有没有人遇到过类似的情况?我花了一上午时间浏览 Google Earth API 组,但无济于事.

更新:经过更多的梳理,答案可能在于
(来源:googlepages.com)

解决方案

我在这里整理了一个演示,展示如何使用 IFRAME 垫片:

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

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)

解决方案

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

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

这篇关于如何在 Google Earth 插件上放置 html div?涉及wmode,我想的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆