Map.setZoom

设置地图的缩放级别。

返回此 ui.Map。

用法返回
Map.setZoom(zoom)ui.Map
参数类型详细信息
zoom数字要为地图设置的缩放级别,范围为 0 到 24。

示例

代码编辑器 (JavaScript)

// See the entire world.
Map.setZoom(1);

// See the smallest region possible.
Map.setZoom(24);

// The most recent zoom is the one the view will have.
Map.setZoom(12);