2014-11-05 102 views
-3

谷歌地圖不顯示在我的網站頁面的PHP版本。請幫忙。這裏是網頁和源代碼。谷歌地圖不顯示在網站上

<section class="meteor-google-map fullwidth block" style="height: 450px; border: solid transparent; border-width: 1px 0; margin-bottom: 4em;"> 
<div class="" style="height: 450px; border: solid transparent; border-width: 1px 0; margin-bottom: 4em;"> 
<span class="map-data hidden">{"latlong":"44.99746,-91.72712","type":"ROADMAP","zoom":16,"title":"Our Headquarters","link":"","tooltip":"","fullscreen":true}</span> 
<div class="infobox-content hidden"> 
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> 
</div> 
</div><!-- .meteor-google-map --> 
</section> 
+0

你從哪裏得到這段代碼?我只看到嵌入了iframe的谷歌地圖,通常需要API密鑰https://developers.google.com/maps/documentation/embed/guide – 2014-11-05 02:40:52

+0

從themeforest.net下載的模板 – steiger16 2014-11-05 02:42:04

+0

它的工作原理是html版本的頁面,但當切換到PHP它不會顯示 – steiger16 2014-11-05 02:42:37

回答

0

而不是使用您的SPAN標籤中的內容,您可以使用此:

<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d2821.3526561090844!2d-91.72712!3d44.997460000000004!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x0!2zNDTCsDU5JzUwLjkiTiA5McKwNDMnMzcuNiJX!5e0!3m2!1ses!2sar!4v1415155466768" width="600" height="450" frameborder="0" style="border:0"></iframe> 

我希望這是你在找什麼

+0

沒有那麼多。地圖只顯示在頁面的左側偏離中心,而不是全屏寬度。 – steiger16 2014-11-05 02:59:20

+0

<! - 。流星谷歌地圖 - >
steiger16 2014-11-05 03:01:08

+0

這裏是一個鏈接到PHP頁面和HTML頁面供參考。 [鏈接](http://www.menomoniepainting.com/contact.php)和[鏈接](http://www.menomoniepainting.com/contact.php) – steiger16 2014-11-05 03:02:32

0

只是看着你的頁面源,你.PHP版本不會在your.html版本的標題中加載一半腳本。我認爲這可能是相關的。

+0

哪些腳本?它們在源文件中看起來都一樣.... – steiger16 2014-11-05 05:07:42