Google maps api 3 纬度和经度错误-谷歌地图API JS 3.0

Google maps api 3 纬度和经度错误-谷歌地图API JS 3.0,google-maps-api-3,latitude-longitude,Google Maps Api 3,Latitude Longitude,一段时间后,谷歌地图似乎将属性名称(Qa或Pa)更改为Na或其他名称 var map; function initialize() { var myLatlng = new google.maps.LatLng(-25.363882,131.044922); var myOptions = { zoom: 4, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new go

一段时间后,谷歌地图似乎将属性名称(Qa或Pa)更改为Na或其他名称

var map;
function initialize() {
  var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
  var myOptions = {
    zoom: 4,
    center: myLatlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

  google.maps.event.addListener(map, 'click', function(event) {
    AlertPos(event.latLng);
  });
}

function AlertPos (location) {

    // try to show the latitude and longitude
    document.getElementById('lat').value = location.Qa; 
    document.getElementById('long').value = location.Pa; 
    alert(location.Qa)
    alert(location.Pa)
}
这会影响我的申请。有人能帮忙吗

使用
lat()
lng()


非常感谢你。。。工作;)太棒了,在文档中找不到这个!我只是被这件事难住了。我的map应用程序自动停止工作,因为我和fmlvaz一样,依赖于
Qa
Pa
值(尽管它们之前是
Qa
Ra
),我依赖于Na和Oa,然后他们将其更改为Ra和Sa。。。wtf谷歌。。。但是感谢lat()lng()函数。。。没有注意到他们:)
function AlertPos (location) {        
    // try to show the latitude and longitude
    document.getElementById('lat').value = location.lat(); 
    document.getElementById('long').value = location.lng(); 
    alert(location.lat()); 
    alert(location.lng());
}