Shift container for all layer renderers together.

This commit is contained in:
Tim Schaub
2012-07-07 13:13:07 -06:00
parent 0650d93d17
commit 523f4d61fc
3 changed files with 120 additions and 60 deletions

View File

@@ -1,5 +1,7 @@
goog.provide('ol.renderer.LayerRenderer');
goog.require('goog.math.Coordinate');
/**
* A single layer renderer that will be created by the composite map renderer.
*
@@ -15,6 +17,15 @@ ol.renderer.LayerRenderer = function(container, layer) {
*/
this.container_ = container;
/**
* Pixel offset between the layer renderer container and the composite
* renderer container. These will always be integer values.
*
* @type {goog.math.Coordinate}
* @protected
*/
this.containerOffset_ = new goog.math.Coordinate(0, 0);
/**
* @type {!ol.layer.Layer}
* @protected
@@ -23,6 +34,16 @@ ol.renderer.LayerRenderer = function(container, layer) {
};
/**
* Set the pixel offset between the layer renderer container and the composite
* renderer container.
*
* @param {goog.math.Coordinate} offset Integer pixel offset.
*/
ol.renderer.LayerRenderer.prototype.setContainerOffset = function(offset) {
this.containerOffset_ = offset;
};
/**
* Get layer being rendered.
*