diff --git a/examples/bi.html b/examples/bi.html index 6ddb0a5..ff7bba5 100644 --- a/examples/bi.html +++ b/examples/bi.html @@ -29,8 +29,8 @@ //color scale from http://colorbrewer2.org/ var CARTOCSS = [ 'Map {', - '-torque-time-attribute: "tpep_dropoff_datetime";', - '-torque-aggregation-function: "avg(temp::float)";', + '-torque-time-attribute: "transaction_date";', + '-torque-aggregation-function: "count(1);avg(confidence_score);merchant_name";', '-torque-frame-count: 1;', '-torque-animation-duration: 15;', '-torque-resolution: 1', @@ -63,7 +63,7 @@ var torqueLayer = new L.TorqueLayer({ user : 'stuartlynn', - table : 'sampled_taxi_data', + table : 'yodlee_512', cartocss: CARTOCSS, provider: "filterable_sql_api" }); diff --git a/lib/torque/leaflet/torque.js b/lib/torque/leaflet/torque.js index ab7d98f..e1ff9c8 100644 --- a/lib/torque/leaflet/torque.js +++ b/lib/torque/leaflet/torque.js @@ -30,10 +30,15 @@ L.TorqueLayer = L.CanvasLayer.extend({ this.key = 0; this.prevRenderedKey = 0; this._filters = {} + if (options.cartocss) { torque.extend(options, torque.common.TorqueLayer.optionsFromCartoCSS(options.cartocss)); } + + options.columns = options.countby.split(";") + + options.resolution = options.resolution || 2; options.steps = options.steps || 100; options.visible = options.visible === undefined ? true: options.visible;