Move AttributionOptions to ol/control/Attribution
This commit is contained in:
@@ -10,6 +10,34 @@ import {listen} from '../events.js';
|
||||
import EventType from '../events/EventType.js';
|
||||
import {visibleAtResolution} from '../layer/Layer.js';
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {string|undefined} className CSS class name. Default is
|
||||
* `'ol-attribution'`.
|
||||
* @property {Element|string|undefined} target Specify a target if you
|
||||
* want the control to be rendered outside of the map's
|
||||
* viewport.
|
||||
* @property {boolean|undefined} collapsible Specify if attributions can
|
||||
* be collapsed. If you use an OSM source, should be set to `false` — see
|
||||
* {@link https://www.openstreetmap.org/copyright OSM Copyright} —
|
||||
* Default is `true`.
|
||||
* @property {boolean|undefined} collapsed Specify if attributions should
|
||||
* be collapsed at startup. Default is `true`.
|
||||
* @property {string|undefined} tipLabel Text label to use for the button
|
||||
* tip. Default is `'Attributions'`
|
||||
* @property {string|Element|undefined} label Text label to use for the
|
||||
* collapsed attributions button. Default is `'i'`.
|
||||
* Instead of text, also an element (e.g. a `span` element) can be used.
|
||||
* @property {string|Element|undefined} collapseLabel Text label to use
|
||||
* for the expanded attributions button. Default is `'»'`.
|
||||
* Instead of text, also an element (e.g. a `span` element) can be used.
|
||||
* @property {function(ol.MapEvent)|undefined} render Function called when
|
||||
* the control should be re-rendered. This is called in a `requestAnimationFrame`
|
||||
* callback.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Control to show all the attributions associated with the layer sources
|
||||
@@ -19,7 +47,7 @@ import {visibleAtResolution} from '../layer/Layer.js';
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.control.Control}
|
||||
* @param {olx.control.AttributionOptions=} opt_options Attribution options.
|
||||
* @param {module:ol/control/Attribution~Options=} opt_options Attribution options.
|
||||
* @api
|
||||
*/
|
||||
const Attribution = function(opt_options) {
|
||||
|
||||
Reference in New Issue
Block a user