couple modifications to examples

heat-tweaks
Francisco Dans 10 years ago
parent 57d3d169a1
commit 3fbd6ca7a9

@ -53,7 +53,8 @@
var torqueLayer = new L.TorqueLayer({
user : 'viz2',
table : 'ow',
cartocss: CARTOCSS
cartocss: CARTOCSS,
cumulative: true
});
torqueLayer.addTo(map);
torqueLayer.play()

@ -50,6 +50,7 @@ var heat = require('./simpleheat');
this._ctx = canvas.getContext('2d');
this._heat = heat(this._canvas);
this._heat.max(255);
this._heat.radius(6);
this._sprites = []; // sprites per layer
this._shader = null;
this.setCartoCSS(this.options.cartocss || DEFAULT_CARTOCSS);
@ -67,6 +68,7 @@ var heat = require('./simpleheat');
} else {
var ctx = this._ctx;
ctx.setTransform(1, 0, 0, 1, 0, 0);
console.log(this._Map)
var compop = this._Map['comp-op']
ctx.globalCompositeOperation = compop2canvas(compop);
ctx.fillStyle = color;
@ -204,6 +206,9 @@ var heat = require('./simpleheat');
}
prof.end(true);
},
setHeat: function(){
this._heat
},
flush: function() {
this._ctx.setTransform(1, 0, 0, 1, 0, 0);

Loading…
Cancel
Save