|
|
|
@ -146,8 +146,8 @@ var heat = require('./simpleheat');
|
|
|
|
|
//
|
|
|
|
|
// renders all the layers (and frames for each layer) from cartocss
|
|
|
|
|
//
|
|
|
|
|
renderTile: function(tile, key) {
|
|
|
|
|
this._renderTile(tile, 0, 0, null, null);
|
|
|
|
|
renderTile: function(tile, key, pos) {
|
|
|
|
|
this._renderTile(tile, key, 0, null, null, null, pos);
|
|
|
|
|
/*var prof = Profiler.metric('torque.renderer.point.renderLayers').start();
|
|
|
|
|
var layers = this._shader.getLayers();
|
|
|
|
|
for(var i = 0, n = layers.length; i < n; ++i ) {
|
|
|
|
@ -182,7 +182,7 @@ var heat = require('./simpleheat');
|
|
|
|
|
// renders a tile in the canvas for key defined in
|
|
|
|
|
// the torque tile
|
|
|
|
|
//
|
|
|
|
|
_renderTile: function(tile, key, frame_offset, sprites, shader, shaderVars) {
|
|
|
|
|
_renderTile: function(tile, key, frame_offset, sprites, shader, shaderVars, pos) {
|
|
|
|
|
if(!this._canvas || !this._heat) return;
|
|
|
|
|
|
|
|
|
|
var prof = Profiler.metric('torque.renderer.point.renderTile').start();
|
|
|
|
@ -198,8 +198,7 @@ var heat = require('./simpleheat');
|
|
|
|
|
if(c) {
|
|
|
|
|
var x = tile.x[posIdx];
|
|
|
|
|
var y = tileMax - tile.y[posIdx]; // flip mercator
|
|
|
|
|
this._heat.add([x, y, c]);
|
|
|
|
|
this._ctx.fillRect(x, y, 2, 2);
|
|
|
|
|
this._heat.add([pos.x + x, pos.y + y, c]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -207,6 +206,7 @@ var heat = require('./simpleheat');
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
flush: function() {
|
|
|
|
|
this._ctx.setTransform(1, 0, 0, 1, 0, 0);
|
|
|
|
|
if(!this._heat) return;
|
|
|
|
|
this._heat.draw();
|
|
|
|
|
this._heat.clear();
|
|
|
|
|