Expose the map renderer type to the public API
In the case where the map decides itself which renderer to use. It can be convenient for the developer to have knowledge of the choice made.
This commit is contained in:
@@ -726,6 +726,15 @@ ol.Map.prototype.getPixelFromCoordinate = function(coordinate) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the map renderer.
|
||||||
|
* @return {ol.renderer.Map} Renderer
|
||||||
|
*/
|
||||||
|
ol.Map.prototype.getRenderer = function() {
|
||||||
|
return this.renderer_;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the size of this map.
|
* Get the size of this map.
|
||||||
* @return {ol.Size|undefined} The size in pixels of the map in the DOM.
|
* @return {ol.Size|undefined} The size in pixels of the map in the DOM.
|
||||||
|
|||||||
@@ -126,6 +126,14 @@ ol.renderer.canvas.Map.prototype.getCanvasLayerRenderer = function(layer) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
ol.renderer.canvas.Map.prototype.getType = function() {
|
||||||
|
return 'canvas';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -75,6 +75,14 @@ ol.renderer.dom.Map.prototype.createLayerRenderer = function(layer) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
ol.renderer.dom.Map.prototype.getType = function() {
|
||||||
|
return 'dom';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -163,6 +163,12 @@ ol.renderer.Map.prototype.getMap = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {string} Type
|
||||||
|
*/
|
||||||
|
ol.renderer.Map.prototype.getType = goog.abstractMethod;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} layerKey Layer key.
|
* @param {string} layerKey Layer key.
|
||||||
* @return {ol.renderer.Layer} Layer renderer.
|
* @return {ol.renderer.Layer} Layer renderer.
|
||||||
|
|||||||
@@ -346,6 +346,14 @@ ol.renderer.webgl.Map.prototype.getTileTextureQueue = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritDoc
|
||||||
|
*/
|
||||||
|
ol.renderer.webgl.Map.prototype.getType = function() {
|
||||||
|
return 'webgl';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {goog.events.Event} event Event.
|
* @param {goog.events.Event} event Event.
|
||||||
* @protected
|
* @protected
|
||||||
|
|||||||
Reference in New Issue
Block a user