ol/source/Source.js
父类
ol/Object-BaseObject
主要功能
抽象类,用于创建子类。
参数:VectorSource({})
参数 | 类型 | 说明 |
---|
方法
函数名 | 参数 | 源码 | 返回值类型 | 功能 |
---|
/**
* @module ol/source/Source
*/
import BaseObject from '../Object.js';
import SourceState from './State.js';
import {
abstract} from '../util.js';
import {
get as getProjection} from '../proj.js';
/**
* A function that takes a {@link module:ol/PluggableMap~FrameState} and returns a string or
* an array of strings representing source attributions.
*
* @typedef {function(import("../PluggableMap.js").FrameState): (string|Array<string>)} Attribution
*/
/**
* A type that can be used to provide attribution information for data sources.
*
* It represents either
* * a simple string (e.g. `'© Acme Inc.'`)
* * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`)
* * a function that returns a string or array of strings ({@link module:ol/source/Source~Attribution})
*
* @typedef {string|Array<string>|Attribution} AttributionLike
*/
/**
* @typedef {Object} Options
* @property {AttributionLike} [attributions] Attributions.
* @property {boolean} [attributionsCollapsible=true] Attributions are collapsible.
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
* @property {import("./State.js").default} [state='ready'] State.
* @property {boolean} [wrapX=false] WrapX.
*/
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
* instantiated in apps.
* Base class for {@link module:ol/layer/Layer~Layer} sources.
*
* A generic `change` event is triggered when the state of the source changes.
* @abstract
* @api
*/
class Source