diff --git a/lib/torque/provider.json.js b/lib/torque/provider.json.js index 31cc1b1..1331e67 100644 --- a/lib/torque/provider.json.js +++ b/lib/torque/provider.json.js @@ -172,6 +172,7 @@ return { x: x, y: y, + z: zoom, coord: { x: coord.x, y: coord.y, diff --git a/lib/torque/renderer/point.js b/lib/torque/renderer/point.js index 6c6c6e0..dfbbd47 100644 --- a/lib/torque/renderer/point.js +++ b/lib/torque/renderer/point.js @@ -135,7 +135,7 @@ if(c) { var sp = sprites[c]; if(!sp) { - sp = sprites[c] = this.generateSprite(shader, c, _.extend({ zoom: tile.zoom, 'frame-offset': frame_offset }, shaderVars)); + sp = sprites[c] = this.generateSprite(shader, c, _.extend({ zoom: tile.z, 'frame-offset': frame_offset }, shaderVars)); } //var x = tile.x[posIdx]*res - (sp.width >> 1); //var y = (256 - res - res*tile.y[posIdx]) - (sp.height >> 1); diff --git a/vendor/carto.js b/vendor/carto.js index e87ea8c..57255e8 100644 --- a/vendor/carto.js +++ b/vendor/carto.js @@ -4815,7 +4815,7 @@ tree.Value.prototype.toJS = function() { v = "'" + v + "'"; } else if (val.is === 'field') { // replace [varuable] by ctx['variable'] - v = v.replace(/\[(.*)\]/g, "ctx['\$1']") + v = v.replace(/\[(.*)\]/g, "data['\$1']") } return "_value = " + v + ";"; };