Latest web development tutorials

地圖API getBounds() 方法

Map() 構造器 Map()構造器

實例

返回當前視口的西南緯度/經度和東北緯度/經度:

map.getBounds();

嘗試一下»

定義和用法

getBounds() 方法返回當前視口的西南緯度/經度和東北緯度/經度。


語法

mapvariable.getBounds();


返回值

描述
(south-west latitude, longitude),(north-east latitude, longitude) 从点的西南角和东北角规定一个矩形。


Map() 構造器 Map()構造器