模块:ol/control/defaults

ol/control/defaults


函数

import {defaults} from 'ol/control/defaults';

默认情况下,地图包含一组控件。除非另有配置,否则返回一个集合,其中包含以下每个控件的实例:ZoomRotateAttribution

Name Type 描述
attribution boolean (defaults to true)

包括Attribution.

attributionOptions Options | undefined

选项Attribution.

rotate boolean (defaults to true)

包含Rotate.

rotateOptions Options | undefined

选项Rotate.

zoom boolean | undefined

包括Zoom.

zoomOptions Options | undefined

选项Zoom.

返回:
用于 Map 构造函数的 controls 选项的控件集合。

类型定义

DefaultsOptions{Object}

属性:
Name Type 描述
attribution boolean
(defaults to true)

包含Attribution.

attributionOptions Options | undefined

配置选项Attribution.

rotate boolean
(defaults to true)

包含Rotate.

rotateOptions Options | undefined

配置选项Rotate.

zoom boolean | undefined

包括Zoom.

zoomOptions Options | undefined

配置选项Zoom.