0
我正在使用谷歌地圖自動完成功能供用戶輸入地點。之後,我會從自動完成對象中調用getPlace()
。谷歌地圖自動完成的getbounds?不工作
它顯示以下錯誤。
Uncaught TypeError: Object ((13.0284176, 80.23215529999993), (13.0501581, 80.2641701)) has no method 'lat' here is my code:
我的代碼:
autocomplete = new google.maps.places.Autocomplete(g,autoc_options);
google.maps.event.addListener(autocomplete,'place_changed',function() {
var g=autocomplete.getPlace();
var h=new google.maps.LatLngBounds(g.geometry.viewport);
var l=new google.maps.LatLng(g.geometry.viewport.getSouthWest());
alert(l.toString());
});