Add ol.renderer.Map.getCanvas function. Only valid with the canvas and webgl renderers

This commit is contained in:
Frederic Junod
2013-01-21 15:18:18 +01:00
parent c836c8d9c4
commit 2f2ea373ca
3 changed files with 22 additions and 0 deletions
@@ -67,6 +67,14 @@ ol.renderer.canvas.Map.prototype.createLayerRenderer = function(layer) {
}; };
/**
* @inheritDoc
*/
ol.renderer.canvas.Map.prototype.getCanvas = function() {
return this.canvas_;
};
/** /**
* @inheritDoc * @inheritDoc
*/ */
+6
View File
@@ -148,6 +148,12 @@ ol.renderer.Map.prototype.disposeInternal = function() {
}; };
/**
* @return {Element} Canvas.
*/
ol.renderer.Map.prototype.getCanvas = goog.functions.NULL;
/** /**
* @param {ol.layer.Layer} layer Layer. * @param {ol.layer.Layer} layer Layer.
* @protected * @protected
@@ -294,6 +294,14 @@ ol.renderer.webgl.Map.prototype.disposeInternal = function() {
}; };
/**
* @inheritDoc
*/
ol.renderer.webgl.Map.prototype.getCanvas = function() {
return this.canvas_;
};
/** /**
* @return {WebGLRenderingContext} GL. * @return {WebGLRenderingContext} GL.
*/ */