2016-01-13 79 views

回答

0

這應該工作,把它放在一個被調用你的bounds_changed事件函數內處理者:

var bounds = map.getBounds(); 
var northEastCorner = bounds.getNorthEast(); 
var southWestCorner = bounds.getSouthWest(); 

var northWestCorner = { 
    lat: northEastCorner.lat(), 
    lng: southWestCorner.lng() 
}; 

var southEastCorner = { 
    lat: southWestCorner.lat(), 
    lng: northEastCorner.lng() 
};