Map.setCenter

以指定縮放等級將地圖檢視畫面置中於指定座標。

傳回地圖。

用量傳回
Map.setCenter(lon, lat, zoom)ui.Map
引數類型詳細資料
lon數字中心經度 (以度為單位)。
lat數字中心緯度,以度為單位。
zoom號碼 (選填)縮放等級,範圍為 0 到 24。

範例

程式碼編輯器 (JavaScript)

// Set the position and optional zoom level of the map. Latitude must be
// within [-85, 85].
Map.setCenter(-123.6, 47.7, 9);