Always use a defined renderGeometryFunction, thanks @elemoine

This commit is contained in:
Tom Payne
2013-11-21 23:52:05 +01:00
parent fd48b06dc0
commit 9396df54c3
2 changed files with 13 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
goog.provide('ol.renderer.canvas.VectorLayer');
goog.require('goog.vec.Mat4');
goog.require('goog.asserts');
goog.require('goog.functions');
goog.require('ol.ViewHint');
goog.require('ol.extent');
goog.require('ol.render.canvas.ReplayGroup');
@@ -61,6 +62,10 @@ ol.renderer.canvas.VectorLayer.prototype.composeFrame =
if (!goog.isNull(replayGroup)) {
var vectorLayer = this.getVectorLayer();
var renderGeometryFunction = vectorLayer.getRenderGeometryFunction();
if (!goog.isDef(renderGeometryFunction)) {
renderGeometryFunction = goog.functions.TRUE;
}
goog.asserts.assert(goog.isFunction(renderGeometryFunction));
context.globalAlpha = layerState.opacity;
replayGroup.draw(
context, frameState.extent, transform, renderGeometryFunction);