2013-04-30 59 views
0

我的GPS提供了這些座標「0023 36.8620 S,W 0046 38.1003」 但我不能把它們放在Google Maps API中,好像他不接受這個類型,有什麼錯?他會接受嗎?或需要轉換?我如何轉換?谷歌地圖類型不同座標的問題

https://maps.google.com.br/maps?q=0023+36.8620+S,+0046+38.1003+W

var coordenadas= [{ 
      "Latitude": "0023 30.1119 S", 
      "Longitude": "0046 42.3806 W", 
      "Velocidade": "0.00", 
      "Data": "2013-04-29 20:05:09" 
     }, { 
      "Latitude": "0023 30.1672 S", 
      "Longitude": "0046 42.4452 W", 
      "Velocidade": "21.00", 
      "Data": "2013-04-29 20:31:05" 
     }, { 
      "Latitude": "0023 31.6420 S", 
      "Longitude": "0046 46.3419 W", 
      "Velocidade": "0.00", 
      "Data": "2013-04-29 20:45:01" 
     }, { 
      "Latitude": "0023 31.4505 S", 
      "Longitude": "0046 46.1651 W", 
      "Velocidade": "155.00", 
      "Data": "2013-04-29 21:01:19" 
     }, { 
      "Latitude": "0023 36.6380 S", 
      "Longitude": "0046 40.4935 W", 
      "Velocidade": "299.00", 
      "Data": "2013-04-29 21:15:05" 
     }, { 
      "Latitude": "0023 36.8620 S", 
      "Longitude": "0046 38.1003 W", 
      "Velocidade": "0.00", 
      "Data": "2013-04-29 21:45:06" 
     } 
    ]; 


    var map = new google.maps.Map(document.getElementById('map_canvas'), { 
     zoom: 13, 
     center: new google.maps.LatLng(-23.5525, -46.638851), 
     mapTypeId: google.maps.MapTypeId.ROADMAP 
    }); 
    var infowindow = new google.maps.InfoWindow(); 
    var image = 'beachflag.png'; 
    $.each(coordenadas, function (i, items) { 
     marker = new google.maps.Marker({ 
      position: new google.maps.LatLng(items.Latitude, items.Longitude), 
      map: map, 
      icon: image 
     }); 
     google.maps.event.addListener(marker, 'click', (function (marker, i) { 
      return function() { 
       infowindow.setContent(); 
       infowindow.open(map, items.Data); 
      } 
     })(marker, i)); 

     console.log(items); 
    }); 

對不起我的英語是如此糟糕!

回答

0

谷歌地圖使用十進制度(WGS84)。

您的設備應該有一個設置以此格式顯示。