Added pointCount method
This commit is contained in:
parent
30bd226d71
commit
52cc4c663c
@ -286,7 +286,7 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
this.setKeys([key], options);
|
||||
},
|
||||
|
||||
/**
|
||||
/**
|
||||
* returns the array of keys being rendered
|
||||
*/
|
||||
getKeys: function() {
|
||||
@ -472,6 +472,20 @@ L.TorqueLayer = L.CanvasLayer.extend({
|
||||
return sum;
|
||||
},
|
||||
|
||||
/** return the number of points for a step */
|
||||
pointCount: function(step) {
|
||||
var t, tile;
|
||||
step = step === undefined ? this.key: step;
|
||||
var c = 0;
|
||||
for(t in this._tiles) {
|
||||
tile = this._tiles[t];
|
||||
if (tile) {
|
||||
c += tile.timeCount[step];
|
||||
}
|
||||
}
|
||||
return c;
|
||||
},
|
||||
|
||||
invalidate: function() {
|
||||
this.provider.reload();
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user