Module: ol/control/defaults

ol/control/defaults


函数s

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

地图默认包含的控件集合。除非另行配置,否则返回包含以下每个控件实例的集合: Zoom Rotate Attribution

Name Type Description
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 选项的控件集合。

Type Definitions

DefaultsOptions{Object}

Properties:
Name Type Description
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 的选项。