6
过了一段时间,Google Maps似乎将属性名称(Qa或Pa)更改为Na或其他名称。纬度和经度错误 - Google Maps API JS 3.0
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)
}
这会影响我的应用程序。任何身体可以帮助吗?
非常感谢您......工作;) – fmlvaz
真棒,不能在文档中找到这个! –
被这个难住了。我的地图应用程序自发地停止了工作,因为我像fmlvaz一样依靠'Qa'和'Pa'值(尽管它们早先是'Qa'和'Ra') –