Merge pull request #8016 from romanzoller/remove-ol-layer-olx-first-PR
Move olx.layer.BaseOptions to ol/layer/Base
This commit is contained in:
@@ -5,67 +5,6 @@
|
||||
let olx;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{opacity: (number|undefined),
|
||||
* visible: (boolean|undefined),
|
||||
* extent: (ol.Extent|undefined),
|
||||
* zIndex: (number|undefined),
|
||||
* minResolution: (number|undefined),
|
||||
* maxResolution: (number|undefined)}}
|
||||
*/
|
||||
olx.layer.BaseOptions;
|
||||
|
||||
|
||||
/**
|
||||
* Opacity (0, 1). Default is `1`.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.BaseOptions.prototype.opacity;
|
||||
|
||||
|
||||
/**
|
||||
* Visibility. Default is `true`.
|
||||
* @type {boolean|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.BaseOptions.prototype.visible;
|
||||
|
||||
|
||||
/**
|
||||
* The bounding extent for layer rendering. The layer will not be rendered
|
||||
* outside of this extent.
|
||||
* @type {ol.Extent|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.BaseOptions.prototype.extent;
|
||||
|
||||
|
||||
/**
|
||||
* The z-index for layer rendering. At rendering time, the layers will be
|
||||
* ordered, first by Z-index and then by position. The default Z-index is 0.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.BaseOptions.prototype.zIndex;
|
||||
|
||||
|
||||
/**
|
||||
* The minimum resolution (inclusive) at which this layer will be visible.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.BaseOptions.prototype.minResolution;
|
||||
|
||||
|
||||
/**
|
||||
* The maximum resolution (exclusive) below which this layer will be visible.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.BaseOptions.prototype.maxResolution;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{opacity: (number|undefined),
|
||||
* source: (ol.source.Source|undefined),
|
||||
|
||||
@@ -7,6 +7,22 @@ import LayerProperty from '../layer/Property.js';
|
||||
import {clamp} from '../math.js';
|
||||
import {assign} from '../obj.js';
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {number} [opacity=1] Opacity (0, 1).
|
||||
* @property {boolean} [visible=true] Visibility.
|
||||
* @property {ol.Extent} [extent] The bounding extent for layer rendering. The layer will not be
|
||||
* rendered outside of this extent.
|
||||
* @property {number} [zIndex=0] The z-index for layer rendering. At rendering time, the layers
|
||||
* will be ordered, first by Z-index and then by position.
|
||||
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
|
||||
* visible.
|
||||
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
|
||||
* be visible.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Abstract base class; normally only used for creating subclasses and not
|
||||
@@ -18,7 +34,7 @@ import {assign} from '../obj.js';
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {module:ol/Object~BaseObject}
|
||||
* @param {olx.layer.BaseOptions} options Layer options.
|
||||
* @param {module:ol/layer/Base~Options} options Layer options.
|
||||
* @api
|
||||
*/
|
||||
const BaseLayer = function(options) {
|
||||
|
||||
@@ -53,7 +53,7 @@ const Layer = function(options) {
|
||||
const baseOptions = assign({}, options);
|
||||
delete baseOptions.source;
|
||||
|
||||
BaseLayer.call(this, /** @type {olx.layer.BaseOptions} */ (baseOptions));
|
||||
BaseLayer.call(this, /** @type {module:ol/layer/Base~Options} */ (baseOptions));
|
||||
|
||||
/**
|
||||
* @private
|
||||
|
||||
Reference in New Issue
Block a user