2011-12-26 49 views
0

我有一个表格包含位置代码(我们通过右键单击然后选择“这里是什么”得到) I必须将此位置代码添​​加为替代变量。但我不知道是什么,我要添加到我的位置代码,仅保留地图不是谷歌地图的整个页面,其链接.. 如什么是我需要添加位置代码来获取地图的位置链接

http://maps.google.com/maps?q=#LOCATIONS# 

http://maps.google.com/maps?q=25.052013,55.270243 链接给整个页面的Google,但我只需要将地图显示在Facny Box中。

回答

0

这个简短的教程应该帮助你:How to integrate Fancybox and Google Maps

显示的地图是一个隐藏的div像这里面:

<div style="display:none; *margin-left:-9999px; *height:0px; *position:relative; *top:-500px; *display:block "> 
    <div id="mapBox" > 
     <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?q=25.052907,55.2702&amp;num=1&amp;vpsrc=0&amp;ie=UTF8&amp;t=m&amp;z=14&amp;ll=25.052013,55.270243&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?q=25.052907,55.2702&amp;num=1&amp;vpsrc=0&amp;ie=UTF8&amp;t=m&amp;z=14&amp;ll=25.052013,55.270243&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small> 
    </div> 
</div> 

我想,链接,你正在寻找的,是这样的一个内部iframe。点击链接图标后,你可以得到iframe,它位于你打开的页面的左上角http://maps.google.com/maps?q=25.052013,55.270243

0

你也可以查看我的帖子,了解如何在fancybox中打开google maps easy way here