google earth plugin 上的popup window
标签:
JavaScript
在web页面中,加载google earth plugin之后,就会出现google earth永久保持在最上层,即使用div封装,设置z-index都无法实现其他控件出现在google earth 的上层。
不过,现在可以使用http://prototype-window.xilinus.com上编写的prototype window就可以实现,在web页面,弹出一个新的dialog覆盖在google earth上面。
用法如下:
It's easy to use, just include two javascripts and one css (more if you want different skins).
<script type="text/javascript" class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="/javascripts/prototype.js"> </script> <script type="text/javascript" class="lazyload" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC" data-original="/javascripts/window.js"> </script> <link href="/stylesheets/themes/default.css" rel="stylesheet" type="text/css"/> <!-- Add this to have a specific theme--> <link href="themes/nuncio.css" rel="stylesheet" type="text/css"/>
To create a window, you just have to instanciate a Window object with some optional parameters, set innerHTML of the window main content and call show() or showCenter() function. Check out the samples tab with more sample codes。
win = new Window({className: "nuncio", title: "demo3", width:200, height:150, destroyOnClose: true, recenterAuto:false}); win.getContent().update("<h1>Hello world !!</h1>"); win.showCenter();
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦