From 59a84690c29495f9aef4eeb91ae9952d9d9894eb Mon Sep 17 00:00:00 2001 From: Francisco Dans Date: Tue, 12 May 2015 12:14:03 +0200 Subject: [PATCH] compatibilizes ballrenderer with cartocss --- lib/torque/renderer/point.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/torque/renderer/point.js b/lib/torque/renderer/point.js index 6e44c0b..94fd3ad 100644 --- a/lib/torque/renderer/point.js +++ b/lib/torque/renderer/point.js @@ -223,6 +223,7 @@ var ballRenderer = require('./ball.js'); // the torque tile // _renderTile: function(tile, key, frame_offset, sprites, shader, shaderVars, pos) { + shaderVars = shaderVars || { zoom: tile.z, 'frame-offset': frame_offset } if (!this._canvas) return; var prof = Profiler.metric('torque.renderer.point.renderTile').start(); @@ -245,7 +246,10 @@ var ballRenderer = require('./ball.js'); if (c) { var x = tile.x[posIdx]; var y = tileMax - tile.y[posIdx]; // flip mercator - this.ballRenderer.addBall(pos.x + x, pos.y + y); + var st = shader.getStyle({ + value: c + }, shaderVars); + this.ballRenderer.addBall(pos.x + x, pos.y + y, st); // var sp = sprites[c]; // if (sp === undefined) { // sp = sprites[c] = this.generateSprite(shader, c, torque.extend({ zoom: tile.z, 'frame-offset': frame_offset }, shaderVars)); @@ -369,6 +373,7 @@ var ballRenderer = require('./ball.js'); }, applyFilters: function(){ + return; if(this._style){ if(this._style['image-filters']){ function gradientKey(imf){