2011-12-26 52 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