Don't attempt to render features whose style is undefined or null

This commit is contained in:
Tom Payne
2013-12-12 11:07:02 +01:00
parent afdfb92198
commit ec7d193543

View File

@@ -231,6 +231,10 @@ ol.renderer.canvas.VectorLayer.prototype.renderFeature =
function(feature, resolution, styleFunction, replayGroup) {
var loading = false;
var styles = styleFunction(feature, resolution);
// FIXME if styles is null, should we use the default style?
if (!goog.isDefAndNotNull(styles)) {
return false;
}
// simplify to a tolerance of half a CSS pixel
var squaredTolerance = resolution * resolution / 4;
var i, ii, style, imageStyle, imageState;