specifying initial columns in the cartoons
This commit is contained in:
parent
dea2f1f27f
commit
aafbf83d6c
@ -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"
|
||||
});
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user