Merge branch 'master' of github.com:openlayers/ol3 into vector

Resolved conflicts:
  src/ol/renderer/canvas/canvasrenderer.js
This commit is contained in:
Tim Schaub
2013-02-20 00:38:07 -07:00
38 changed files with 1717 additions and 219 deletions

View File

@@ -94,6 +94,7 @@ ol.renderer.canvas.ImageLayer.prototype.renderFrame =
if (!goog.isNull(this.image_)) {
image = this.image_;
var imageExtent = image.getExtent();
var imageResolution = image.getResolution();
var transform = this.transform_;
@@ -111,5 +112,7 @@ ol.renderer.canvas.ImageLayer.prototype.renderFrame =
(imageExtent.minX - viewCenter.x) / imageResolution,
(viewCenter.y - imageExtent.maxY) / imageResolution,
0);
this.updateAttributions(frameState.attributions, image.getAttributions());
}
};

View File

@@ -1,5 +1,5 @@
goog.provide('ol.renderer.canvas.Renderer');
goog.provide('ol.renderer.canvas.isSupported');
goog.provide('ol.renderer.canvas.SUPPORTED');
goog.require('goog.asserts');
goog.require('goog.vec.Mat4');
@@ -17,9 +17,10 @@ goog.require('ol.style.SymbolizerLiteral');
/**
* @return {boolean} Is supported.
* @const
* @type {boolean} Is supported.
*/
ol.renderer.canvas.isSupported = ol.canvas.isSupported;
ol.renderer.canvas.SUPPORTED = ol.canvas.SUPPORTED;
@@ -291,4 +292,3 @@ ol.renderer.canvas.Renderer.renderShape = function(shape) {
}
return canvas;
};

View File

@@ -106,6 +106,8 @@ ol.renderer.dom.ImageLayer.prototype.renderFrame =
this.image_ = image;
}
this.setTransform(transform);
this.updateAttributions(frameState.attributions, image.getAttributions());
}
};

View File

@@ -1,9 +1,8 @@
goog.provide('ol.renderer.dom.isSupported');
goog.require('goog.functions');
goog.provide('ol.renderer.dom.SUPPORTED');
/**
* @return {boolean} Is supported.
* @const
* @type {boolean} Is supported.
*/
ol.renderer.dom.isSupported = goog.functions.TRUE;
ol.renderer.dom.SUPPORTED = true;

View File

@@ -2,6 +2,7 @@ goog.provide('ol.renderer.Layer');
goog.require('goog.events');
goog.require('goog.events.EventType');
goog.require('ol.Attribution');
goog.require('ol.FrameState');
goog.require('ol.Image');
goog.require('ol.ImageState');
@@ -201,6 +202,23 @@ ol.renderer.Layer.prototype.scheduleExpireCache =
};
/**
* @protected
* @param {Object.<string, ol.Attribution>} attributionsSet Attributions
* set (target).
* @param {Array.<ol.Attribution>} attributions Attributions (source).
*/
ol.renderer.Layer.prototype.updateAttributions =
function(attributionsSet, attributions) {
var i;
var attribution;
for (i = 0; i < attributions.length; ++i) {
attribution = attributions[i];
attributionsSet[goog.getUid(attribution).toString()] = attribution;
}
};
/**
* @protected
* @param {Object.<string, Object.<string, ol.TileRange>>} usedTiles Used tiles.

View File

@@ -198,6 +198,8 @@ ol.renderer.webgl.ImageLayer.prototype.renderFrame =
this.image_ = image;
this.texture_ = texture;
this.updateAttributions(frameState.attributions, image.getAttributions());
}
};

View File

@@ -1,9 +1,10 @@
goog.provide('ol.renderer.webgl.isSupported');
goog.provide('ol.renderer.webgl.SUPPORTED');
goog.require('ol.webgl');
/**
* @return {boolean} Is supported.
* @const
* @type {boolean} Is supported.
*/
ol.renderer.webgl.isSupported = ol.webgl.isSupported;
ol.renderer.webgl.SUPPORTED = ol.webgl.SUPPORTED;