CartoDB/torque — pull request #13 by peterdesmet (2013-09-23 12:51:28+00:00)
Title: Support parameters via querystring

Hi CartoDB folks,

The page at http://cartodb.github.io/torque is really useful to quickly visualize a dataset and we are using this more and more, but we were missing a way to share our visualization with others.

For final visualizations, this can be already done by creating and hosting a html page (e.g. in the examples folder: http://lifewatchinbo.github.io/torque/examples/tracking_eric.html), which also allows you to tune the base map and get rid of the settings panel.

But we wanted a way to share our test visualizations amongst each other, without the need to have access to the server, so I added some code to support parameters via the querystring, which allows you to directly link to a test visualization:

http://lifewatchinbo.github.io/torque/?user=lifewatch-inbo&table=tracking_eric&column=date_time&steps=2000

I'm a Javascript beginner, so I'm probably breaking some coding best practices and the input validation is minimal, but it works and supports all parameters. I noticed there is a `new_torque` branch, so you probably have much cooler features in mind or maybe you have good reasons not to support querystring, but I created a pull request anyway, in case you are interested.

Cheers,

Peter
LifeWatch INBO team