I am working with leaflet. I am wondering, if it is possible to animate points on the leaflet map like cartoDB is doing it with torque.js. I basically need a timeslider for manual display and a play-button for automatic display of the data. I cannot use torque.js because my data depends on the user input and may change during a session various times. Uploading it to cartoDB is therefore no option. I am aware that there is the possibility to create torque-tiles from a postGIS database. But: loading the data which the user requests into a postGIS database, running the .py from cartoDB to create torque-tiles on it and then feeding it to the torque framework sounds hacky.

I am further interested in applying the solution - if possible - to polygons. I need to change a choropleth map over time.

2 Answers 2


You could try using d3js.

This example seems to match what you want : http://stat4701-edav-d3.github.io/viz/cities/cities.html

  • Yes, I am working with d3.js. Is there the commented code somewhere? It looks like what I need...
    – four-eyes
    Feb 20, 2017 at 12:59
  • The (non-commented..) code is available here : view-source:stat4701-edav-d3.github.io/viz/cities/js/main.js. I am working on an adaptation of this script and the code is not too hard to get in especially if you already work with d3js. You basically need to use and adapt the createSlider,() animate() and drawMonth() functions.
    – ConstanceL
    Feb 20, 2017 at 13:08
  • Thanks. I found the sourcecode already. I thought there might be a commented version that I overlooked. I will have a look at it!
    – four-eyes
    Feb 20, 2017 at 13:35

Check this guide Is a guide of how to animate a path in map using d3


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.