我採用了棱角分明谷歌地圖,文檔這裏
https://angular-ui.github.io/angular-google-maps/#!/api/GoogleMapApi谷歌地圖獲得西北和東南長,緯度
我只是試圖找出當前LNG和LAT是在地圖上然後如果它們發生變化就會得到回調。
我加載地圖,像這樣:
// uiGmapGoogleMapApi is a promise.
// The "then" callback function provides the google.maps object.
uiGmapGoogleMapApi.then(function(map) {
console.log(map);
});
我認爲的LatLngBounds會給我的界限,使我正在尋找和閱讀文檔,我可以看到它在https://developers.google.com/maps/documentation/javascript/3.exp/reference
我的問題是,調用任何是未定義的。人們會簡單地認爲,這種事情會有很好的簡單功能,但似乎並非如此。
現在我卡住了。角度文檔幾乎沒用,gmaps文檔也沒有涉及。
有誰知道我能做什麼?