Add ol.Map.addLayer
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
@exportClass ol.Map ol.MapOptions
|
@exportClass ol.Map ol.MapOptions
|
||||||
|
@exportProperty ol.Map.prototype.addLayer
|
||||||
@exportProperty ol.Map.prototype.addPreRenderFunction
|
@exportProperty ol.Map.prototype.addPreRenderFunction
|
||||||
@exportProperty ol.Map.prototype.addPreRenderFunctions
|
@exportProperty ol.Map.prototype.addPreRenderFunctions
|
||||||
@exportProperty ol.Map.prototype.getInteractions
|
@exportProperty ol.Map.prototype.getInteractions
|
||||||
|
|||||||
@@ -292,6 +292,16 @@ ol.Map = function(mapOptions) {
|
|||||||
goog.inherits(ol.Map, ol.Object);
|
goog.inherits(ol.Map, ol.Object);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {ol.layer.Layer} layer Layer.
|
||||||
|
*/
|
||||||
|
ol.Map.prototype.addLayer = function(layer) {
|
||||||
|
var layers = this.getLayers();
|
||||||
|
goog.asserts.assert(goog.isDef(layers));
|
||||||
|
layers.push(layer);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.PreRenderFunction} preRenderFunction Pre-render function.
|
* @param {ol.PreRenderFunction} preRenderFunction Pre-render function.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user