Set render order to null in ol.layer.Heatmap

For performance reasons: the render order is not relevant for a
heatmap representation and this avoids to sort the features each frame.
This commit is contained in:
Frederic Junod
2014-04-02 10:27:24 +02:00
parent 3c32f8b9e4
commit 6469b6c889

View File

@@ -86,6 +86,10 @@ ol.layer.Heatmap = function(opt_options) {
return style;
});
// For performance reasons, don't sort the features before rendering.
// The render order is not relevant for a heatmap representation.
this.setRenderOrder(null);
goog.events.listen(this, ol.render.EventType.RENDER,
this.handleRender_, false, this);