2016-05-16 60 views
-2

我有以下代碼來顯示我的家。但在我的網頁中,它一般只顯示我的城市。儘管我使用了正確的高度和經度,但它並沒有顯示我的位置。PHP谷歌地圖 - 位置紅色氣球沒有顯示

我想要這樣;

I want image

但現在這樣表示;

now image

這裏是我的代碼;

<html> 
<head> 
    <script src="http://maps.googleapis.com/maps/api/js"> 
    </script> 

    <script> 
     function initialize(){ 
      var mapProp = { 
       center:new google.maps.LatLng(6.2422975,80.0603382),//latitude and longitude respectively 
       zoom:13, 
       mapTypeId:google.maps.MapTypeId.ROADMAP 
      }; 
      var map = new google.maps.Map(document.getElementById("googleMap"), mapProp); 
     } 
     google.maps.event.addDomListener(window, 'load', initialize) 
    </script> 
</head> 
<body> 
    <div id="googleMap" style="width:680px;height:400px;"> </div> 
</body> 

回答