Rename ol.layer.LayerBase to ol.layer.Base
This commit is contained in:
@@ -53,7 +53,7 @@
|
|||||||
* @property {ol.Collection|Array.<ol.control.Control>|undefined} controls
|
* @property {ol.Collection|Array.<ol.control.Control>|undefined} controls
|
||||||
* Controls initially added to the map.
|
* Controls initially added to the map.
|
||||||
* @property {ol.Collection|undefined} interactions Interactions.
|
* @property {ol.Collection|undefined} interactions Interactions.
|
||||||
* @property {Array.<ol.layer.LayerBase>|ol.Collection|undefined} layers Layers.
|
* @property {Array.<ol.layer.Base>|ol.Collection|undefined} layers Layers.
|
||||||
* @property {ol.Collection|Array.<ol.Overlay>|undefined} overlays
|
* @property {ol.Collection|Array.<ol.Overlay>|undefined} overlays
|
||||||
* Overlays initially added to the map.
|
* Overlays initially added to the map.
|
||||||
* @property {ol.RendererHint|undefined} renderer Renderer.
|
* @property {ol.RendererHint|undefined} renderer Renderer.
|
||||||
@@ -312,7 +312,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.layer.LayerBaseOptions
|
* @typedef {Object} ol.layer.BaseOptions
|
||||||
* @property {number|undefined} brightness Brightness.
|
* @property {number|undefined} brightness Brightness.
|
||||||
* @property {number|undefined} contrast Contrast.
|
* @property {number|undefined} contrast Contrast.
|
||||||
* @property {number|undefined} hue Hue.
|
* @property {number|undefined} hue Hue.
|
||||||
@@ -340,7 +340,7 @@
|
|||||||
* @property {number|undefined} opacity Opacity.
|
* @property {number|undefined} opacity Opacity.
|
||||||
* @property {number|undefined} saturation Saturation.
|
* @property {number|undefined} saturation Saturation.
|
||||||
* @property {boolean|undefined} visible Visibility.
|
* @property {boolean|undefined} visible Visibility.
|
||||||
* @property {Array.<ol.layer.LayerBase>|ol.Collection|undefined} layers Child layers.
|
* @property {Array.<ol.layer.Base>|ol.Collection|undefined} layers Child layers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ goog.require('goog.asserts');
|
|||||||
goog.require('goog.events');
|
goog.require('goog.events');
|
||||||
goog.require('goog.events.EventType');
|
goog.require('goog.events.EventType');
|
||||||
goog.require('goog.object');
|
goog.require('goog.object');
|
||||||
goog.require('ol.layer.LayerBase');
|
goog.require('ol.layer.Base');
|
||||||
goog.require('ol.source.Source');
|
goog.require('ol.source.Source');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.layer.LayerBase}
|
* @extends {ol.layer.Base}
|
||||||
* @param {ol.layer.LayerOptions} options Layer options.
|
* @param {ol.layer.LayerOptions} options Layer options.
|
||||||
*/
|
*/
|
||||||
ol.layer.Layer = function(options) {
|
ol.layer.Layer = function(options) {
|
||||||
@@ -37,7 +37,7 @@ ol.layer.Layer = function(options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
goog.inherits(ol.layer.Layer, ol.layer.LayerBase);
|
goog.inherits(ol.layer.Layer, ol.layer.Base);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
goog.provide('ol.layer.LayerBase');
|
goog.provide('ol.layer.Base');
|
||||||
goog.provide('ol.layer.LayerProperty');
|
goog.provide('ol.layer.LayerProperty');
|
||||||
goog.provide('ol.layer.LayerState');
|
goog.provide('ol.layer.LayerState');
|
||||||
|
|
||||||
@@ -38,9 +38,9 @@ ol.layer.LayerState;
|
|||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.Object}
|
* @extends {ol.Object}
|
||||||
* @param {ol.layer.LayerBaseOptions} options Layer options.
|
* @param {ol.layer.BaseOptions} options Layer options.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase = function(options) {
|
ol.layer.Base = function(options) {
|
||||||
|
|
||||||
goog.base(this);
|
goog.base(this);
|
||||||
|
|
||||||
@@ -76,13 +76,13 @@ ol.layer.LayerBase = function(options) {
|
|||||||
this.handleLayerVisibleChange, false, this);
|
this.handleLayerVisibleChange, false, this);
|
||||||
|
|
||||||
};
|
};
|
||||||
goog.inherits(ol.layer.LayerBase, ol.Object);
|
goog.inherits(ol.layer.Base, ol.Object);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.dispatchChangeEvent = function() {
|
ol.layer.Base.prototype.dispatchChangeEvent = function() {
|
||||||
this.dispatchEvent(goog.events.EventType.CHANGE);
|
this.dispatchEvent(goog.events.EventType.CHANGE);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -90,43 +90,43 @@ ol.layer.LayerBase.prototype.dispatchChangeEvent = function() {
|
|||||||
/**
|
/**
|
||||||
* @return {number} Brightness.
|
* @return {number} Brightness.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.getBrightness = function() {
|
ol.layer.Base.prototype.getBrightness = function() {
|
||||||
return /** @type {number} */ (this.get(ol.layer.LayerProperty.BRIGHTNESS));
|
return /** @type {number} */ (this.get(ol.layer.LayerProperty.BRIGHTNESS));
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.LayerBase.prototype,
|
ol.layer.Base.prototype,
|
||||||
'getBrightness',
|
'getBrightness',
|
||||||
ol.layer.LayerBase.prototype.getBrightness);
|
ol.layer.Base.prototype.getBrightness);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {number} Contrast.
|
* @return {number} Contrast.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.getContrast = function() {
|
ol.layer.Base.prototype.getContrast = function() {
|
||||||
return /** @type {number} */ (this.get(ol.layer.LayerProperty.CONTRAST));
|
return /** @type {number} */ (this.get(ol.layer.LayerProperty.CONTRAST));
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.LayerBase.prototype,
|
ol.layer.Base.prototype,
|
||||||
'getContrast',
|
'getContrast',
|
||||||
ol.layer.LayerBase.prototype.getContrast);
|
ol.layer.Base.prototype.getContrast);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {number} Hue.
|
* @return {number} Hue.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.getHue = function() {
|
ol.layer.Base.prototype.getHue = function() {
|
||||||
return /** @type {number} */ (this.get(ol.layer.LayerProperty.HUE));
|
return /** @type {number} */ (this.get(ol.layer.LayerProperty.HUE));
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.LayerBase.prototype,
|
ol.layer.Base.prototype,
|
||||||
'getHue',
|
'getHue',
|
||||||
ol.layer.LayerBase.prototype.getHue);
|
ol.layer.Base.prototype.getHue);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {ol.layer.LayerState} Layer state.
|
* @return {ol.layer.LayerState} Layer state.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.getLayerState = function() {
|
ol.layer.Base.prototype.getLayerState = function() {
|
||||||
var brightness = this.getBrightness();
|
var brightness = this.getBrightness();
|
||||||
var contrast = this.getContrast();
|
var contrast = this.getContrast();
|
||||||
var hue = this.getHue();
|
var hue = this.getHue();
|
||||||
@@ -151,7 +151,7 @@ ol.layer.LayerBase.prototype.getLayerState = function() {
|
|||||||
* modified in place).
|
* modified in place).
|
||||||
* @return {Array.<ol.layer.Layer>} Array of layers.
|
* @return {Array.<ol.layer.Layer>} Array of layers.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.getLayersArray = goog.abstractMethod;
|
ol.layer.Base.prototype.getLayersArray = goog.abstractMethod;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -164,49 +164,49 @@ ol.layer.LayerBase.prototype.getLayersArray = goog.abstractMethod;
|
|||||||
* layerStates: Array.<ol.layer.LayerState>}} Object that store both the
|
* layerStates: Array.<ol.layer.LayerState>}} Object that store both the
|
||||||
* layers and the layerStates.
|
* layers and the layerStates.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.getLayerStatesArray = goog.abstractMethod;
|
ol.layer.Base.prototype.getLayerStatesArray = goog.abstractMethod;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {number} Opacity.
|
* @return {number} Opacity.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.getOpacity = function() {
|
ol.layer.Base.prototype.getOpacity = function() {
|
||||||
return /** @type {number} */ (this.get(ol.layer.LayerProperty.OPACITY));
|
return /** @type {number} */ (this.get(ol.layer.LayerProperty.OPACITY));
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.LayerBase.prototype,
|
ol.layer.Base.prototype,
|
||||||
'getOpacity',
|
'getOpacity',
|
||||||
ol.layer.LayerBase.prototype.getOpacity);
|
ol.layer.Base.prototype.getOpacity);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {number} Saturation.
|
* @return {number} Saturation.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.getSaturation = function() {
|
ol.layer.Base.prototype.getSaturation = function() {
|
||||||
return /** @type {number} */ (this.get(ol.layer.LayerProperty.SATURATION));
|
return /** @type {number} */ (this.get(ol.layer.LayerProperty.SATURATION));
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.LayerBase.prototype,
|
ol.layer.Base.prototype,
|
||||||
'getSaturation',
|
'getSaturation',
|
||||||
ol.layer.LayerBase.prototype.getSaturation);
|
ol.layer.Base.prototype.getSaturation);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {boolean} Visible.
|
* @return {boolean} Visible.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.getVisible = function() {
|
ol.layer.Base.prototype.getVisible = function() {
|
||||||
return /** @type {boolean} */ (this.get(ol.layer.LayerProperty.VISIBLE));
|
return /** @type {boolean} */ (this.get(ol.layer.LayerProperty.VISIBLE));
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.LayerBase.prototype,
|
ol.layer.Base.prototype,
|
||||||
'getVisible',
|
'getVisible',
|
||||||
ol.layer.LayerBase.prototype.getVisible);
|
ol.layer.Base.prototype.getVisible);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.handleLayerChange = function() {
|
ol.layer.Base.prototype.handleLayerChange = function() {
|
||||||
if (this.getVisible() && this.isReady()) {
|
if (this.getVisible() && this.isReady()) {
|
||||||
this.dispatchChangeEvent();
|
this.dispatchChangeEvent();
|
||||||
}
|
}
|
||||||
@@ -216,7 +216,7 @@ ol.layer.LayerBase.prototype.handleLayerChange = function() {
|
|||||||
/**
|
/**
|
||||||
* @protected
|
* @protected
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.handleLayerVisibleChange = function() {
|
ol.layer.Base.prototype.handleLayerVisibleChange = function() {
|
||||||
if (this.isReady()) {
|
if (this.isReady()) {
|
||||||
this.dispatchChangeEvent();
|
this.dispatchChangeEvent();
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,7 @@ ol.layer.LayerBase.prototype.handleLayerVisibleChange = function() {
|
|||||||
/**
|
/**
|
||||||
* @return {boolean} Is ready.
|
* @return {boolean} Is ready.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.isReady = goog.abstractMethod;
|
ol.layer.Base.prototype.isReady = goog.abstractMethod;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -249,13 +249,13 @@ ol.layer.LayerBase.prototype.isReady = goog.abstractMethod;
|
|||||||
*
|
*
|
||||||
* @param {number} brightness Brightness.
|
* @param {number} brightness Brightness.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.setBrightness = function(brightness) {
|
ol.layer.Base.prototype.setBrightness = function(brightness) {
|
||||||
this.set(ol.layer.LayerProperty.BRIGHTNESS, brightness);
|
this.set(ol.layer.LayerProperty.BRIGHTNESS, brightness);
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.LayerBase.prototype,
|
ol.layer.Base.prototype,
|
||||||
'setBrightness',
|
'setBrightness',
|
||||||
ol.layer.LayerBase.prototype.setBrightness);
|
ol.layer.Base.prototype.setBrightness);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -265,13 +265,13 @@ goog.exportProperty(
|
|||||||
*
|
*
|
||||||
* @param {number} contrast Contrast.
|
* @param {number} contrast Contrast.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.setContrast = function(contrast) {
|
ol.layer.Base.prototype.setContrast = function(contrast) {
|
||||||
this.set(ol.layer.LayerProperty.CONTRAST, contrast);
|
this.set(ol.layer.LayerProperty.CONTRAST, contrast);
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.LayerBase.prototype,
|
ol.layer.Base.prototype,
|
||||||
'setContrast',
|
'setContrast',
|
||||||
ol.layer.LayerBase.prototype.setContrast);
|
ol.layer.Base.prototype.setContrast);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -279,25 +279,25 @@ goog.exportProperty(
|
|||||||
* unchanged. Other values are radians around the color circle.
|
* unchanged. Other values are radians around the color circle.
|
||||||
* @param {number} hue Hue.
|
* @param {number} hue Hue.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.setHue = function(hue) {
|
ol.layer.Base.prototype.setHue = function(hue) {
|
||||||
this.set(ol.layer.LayerProperty.HUE, hue);
|
this.set(ol.layer.LayerProperty.HUE, hue);
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.LayerBase.prototype,
|
ol.layer.Base.prototype,
|
||||||
'setHue',
|
'setHue',
|
||||||
ol.layer.LayerBase.prototype.setHue);
|
ol.layer.Base.prototype.setHue);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {number} opacity Opacity.
|
* @param {number} opacity Opacity.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.setOpacity = function(opacity) {
|
ol.layer.Base.prototype.setOpacity = function(opacity) {
|
||||||
this.set(ol.layer.LayerProperty.OPACITY, opacity);
|
this.set(ol.layer.LayerProperty.OPACITY, opacity);
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.LayerBase.prototype,
|
ol.layer.Base.prototype,
|
||||||
'setOpacity',
|
'setOpacity',
|
||||||
ol.layer.LayerBase.prototype.setOpacity);
|
ol.layer.Base.prototype.setOpacity);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -308,22 +308,22 @@ goog.exportProperty(
|
|||||||
*
|
*
|
||||||
* @param {number} saturation Saturation.
|
* @param {number} saturation Saturation.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.setSaturation = function(saturation) {
|
ol.layer.Base.prototype.setSaturation = function(saturation) {
|
||||||
this.set(ol.layer.LayerProperty.SATURATION, saturation);
|
this.set(ol.layer.LayerProperty.SATURATION, saturation);
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.LayerBase.prototype,
|
ol.layer.Base.prototype,
|
||||||
'setSaturation',
|
'setSaturation',
|
||||||
ol.layer.LayerBase.prototype.setSaturation);
|
ol.layer.Base.prototype.setSaturation);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {boolean} visible Visible.
|
* @param {boolean} visible Visible.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerBase.prototype.setVisible = function(visible) {
|
ol.layer.Base.prototype.setVisible = function(visible) {
|
||||||
this.set(ol.layer.LayerProperty.VISIBLE, visible);
|
this.set(ol.layer.LayerProperty.VISIBLE, visible);
|
||||||
};
|
};
|
||||||
goog.exportProperty(
|
goog.exportProperty(
|
||||||
ol.layer.LayerBase.prototype,
|
ol.layer.Base.prototype,
|
||||||
'setVisible',
|
'setVisible',
|
||||||
ol.layer.LayerBase.prototype.setVisible);
|
ol.layer.Base.prototype.setVisible);
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ goog.require('ol.Collection');
|
|||||||
goog.require('ol.CollectionEvent');
|
goog.require('ol.CollectionEvent');
|
||||||
goog.require('ol.CollectionEventType');
|
goog.require('ol.CollectionEventType');
|
||||||
goog.require('ol.Object');
|
goog.require('ol.Object');
|
||||||
|
goog.require('ol.layer.Base');
|
||||||
goog.require('ol.layer.Layer');
|
goog.require('ol.layer.Layer');
|
||||||
goog.require('ol.layer.LayerBase');
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,7 +25,7 @@ ol.layer.LayerGroupProperty = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.layer.LayerBase}
|
* @extends {ol.layer.Base}
|
||||||
* @param {ol.layer.LayerGroupOptions=} opt_options Layer options.
|
* @param {ol.layer.LayerGroupOptions=} opt_options Layer options.
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerGroup = function(opt_options) {
|
ol.layer.LayerGroup = function(opt_options) {
|
||||||
@@ -63,7 +63,7 @@ ol.layer.LayerGroup = function(opt_options) {
|
|||||||
this.setLayers(layers);
|
this.setLayers(layers);
|
||||||
|
|
||||||
};
|
};
|
||||||
goog.inherits(ol.layer.LayerGroup, ol.layer.LayerBase);
|
goog.inherits(ol.layer.LayerGroup, ol.layer.Base);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -123,7 +123,7 @@ ol.layer.LayerGroup.prototype.handleLayersChanged_ = function(event) {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) {
|
ol.layer.LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) {
|
||||||
var layer = /** @type {ol.layer.LayerBase} */ (collectionEvent.getElement());
|
var layer = /** @type {ol.layer.Base} */ (collectionEvent.getElement());
|
||||||
this.listenerKeys_[goog.getUid(layer).toString()] = goog.events.listen(
|
this.listenerKeys_[goog.getUid(layer).toString()] = goog.events.listen(
|
||||||
layer, goog.events.EventType.CHANGE, this.handleLayerChange, false,
|
layer, goog.events.EventType.CHANGE, this.handleLayerChange, false,
|
||||||
this);
|
this);
|
||||||
@@ -136,7 +136,7 @@ ol.layer.LayerGroup.prototype.handleLayersAdd_ = function(collectionEvent) {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
ol.layer.LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) {
|
ol.layer.LayerGroup.prototype.handleLayersRemove_ = function(collectionEvent) {
|
||||||
var layer = /** @type {ol.layer.LayerBase} */ (collectionEvent.getElement());
|
var layer = /** @type {ol.layer.Base} */ (collectionEvent.getElement());
|
||||||
var key = goog.getUid(layer).toString();
|
var key = goog.getUid(layer).toString();
|
||||||
goog.events.unlistenByKey(this.listenerKeys_[key]);
|
goog.events.unlistenByKey(this.listenerKeys_[key]);
|
||||||
delete this.listenerKeys_[key];
|
delete this.listenerKeys_[key];
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ goog.require('ol.ViewHint');
|
|||||||
goog.require('ol.control');
|
goog.require('ol.control');
|
||||||
goog.require('ol.extent');
|
goog.require('ol.extent');
|
||||||
goog.require('ol.interaction');
|
goog.require('ol.interaction');
|
||||||
goog.require('ol.layer.LayerBase');
|
goog.require('ol.layer.Base');
|
||||||
goog.require('ol.layer.LayerGroup');
|
goog.require('ol.layer.LayerGroup');
|
||||||
goog.require('ol.proj');
|
goog.require('ol.proj');
|
||||||
goog.require('ol.proj.common');
|
goog.require('ol.proj.common');
|
||||||
@@ -366,7 +366,7 @@ ol.Map.prototype.addControl = function(control) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the given layer to the top of this map.
|
* Adds the given layer to the top of this map.
|
||||||
* @param {ol.layer.LayerBase} layer Layer.
|
* @param {ol.layer.Base} layer Layer.
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.addLayer = function(layer) {
|
ol.Map.prototype.addLayer = function(layer) {
|
||||||
var layers = this.getLayerGroup().getLayers();
|
var layers = this.getLayerGroup().getLayers();
|
||||||
@@ -874,14 +874,14 @@ ol.Map.prototype.removeControl = function(control) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes the given layer from the map.
|
* Removes the given layer from the map.
|
||||||
* @param {ol.layer.LayerBase} layer Layer.
|
* @param {ol.layer.Base} layer Layer.
|
||||||
* @return {ol.layer.LayerBase|undefined} The removed layer or undefined if the
|
* @return {ol.layer.Base|undefined} The removed layer or undefined if the
|
||||||
* layer was not found.
|
* layer was not found.
|
||||||
*/
|
*/
|
||||||
ol.Map.prototype.removeLayer = function(layer) {
|
ol.Map.prototype.removeLayer = function(layer) {
|
||||||
var layers = this.getLayerGroup().getLayers();
|
var layers = this.getLayerGroup().getLayers();
|
||||||
goog.asserts.assert(goog.isDef(layers));
|
goog.asserts.assert(goog.isDef(layers));
|
||||||
return /** @type {ol.layer.LayerBase|undefined} */ (layers.remove(layer));
|
return /** @type {ol.layer.Base|undefined} */ (layers.remove(layer));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user