Add ol.Map.addLayer
This commit is contained in:
@@ -292,6 +292,16 @@ ol.Map = function(mapOptions) {
|
||||
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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user