diff --git a/src/ol/framestate.js b/src/ol/framestate.js index 5ab8fdb9a7..e7ebadae9c 100644 --- a/src/ol/framestate.js +++ b/src/ol/framestate.js @@ -24,6 +24,7 @@ goog.require('ol.layer.LayerState'); * coordinateToPixelMatrix: goog.vec.Mat4.Number, * extent: (null|ol.Extent), * focus: ol.Coordinate, + * index: number, * layersArray: Array., * layerStates: Object., * logos: Object., diff --git a/src/ol/map.js b/src/ol/map.js index 70cb4928a4..c551e7317b 100644 --- a/src/ol/map.js +++ b/src/ol/map.js @@ -168,6 +168,12 @@ ol.Map = function(options) { */ this.pixelToCoordinateMatrix_ = goog.vec.Mat4.createNumber(); + /** + * @private + * @type {number} + */ + this.frameIndex_ = 0; + /** * @private * @type {?ol.FrameState} @@ -804,6 +810,7 @@ ol.Map.prototype.renderFrame_ = function(time) { coordinateToPixelMatrix: this.coordinateToPixelMatrix_, extent: null, focus: goog.isNull(this.focus_) ? view2DState.center : this.focus_, + index: this.frameIndex_++, layersArray: layersArray, layerStates: layerStates, logos: {},