CartoDB / torque

Temporal mapping for CARTO
http://cartodb.github.com/torque/
BSD 4-Clause "Original" or "Old" License
397 stars 129 forks source link

Contribution of ol3 Torque Layer's implementation to CartoDb #263

Closed ashchurova closed 8 years ago

ashchurova commented 8 years ago

Contribution of Torque Layer's implementation for OpenLayers version 3.17 and above to CartoDb by Bloomberg.

vasyl-ivanchuk commented 8 years ago

@ashchurova Hi Anna! I'm not from torque team but I've just checked your implementation of torque layer for OpenLayers and I have few questions/points.

  1. You've changed the lib sources and added example/navy_ol.html but you didn't regenerate build files in dist folder, as a result your example is not working right after checkout.
  2. I've built library with your changes and checked that example/navy_ol.html example is working, but unfortunately some of original torque examples are not working anymore. For instance: examples/car.html, examples/data_peek.html and so on. If I missed something, please explain how to bring them back.

Best regards, Vasyl.

ashchurova commented 8 years ago

@vasyl-ivanchuk Hi Vasyl, I originally did include build files in the dist folder but was asked by @javisantana to remove them as they are built automatically.. I will try to run the original samples and see why they are not working. My changes shouldn't effected them. I was able to run my torque example with leaflet but it was mine, that was how I was testing my changes.

vasyl-ivanchuk commented 8 years ago

@ashchurova thanks for such quick response and explanation about the build files. Waiting for the outcome regarding the original samples. Thank you in advance!

ashchurova commented 8 years ago

@vasyl-ivanchuk it looks like at some point you guys started using d3.js. All original samples are breaking in d3.js. The exception I get is "Invalid or unexpected token" on line 16686 in torque.full.uncompressed. js and the line has the following script: var ε = 1e-6, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π; Which would make sense why it is complaining.

ashchurova commented 8 years ago

@vasyl-ivanchuk I looked at d3.js under node_modules\d3 and the line that causes this issue looks like this in the original d3.js:

var ε = 1e-6, ε2 = ε * ε, π = Math.PI, τ = 2 * π, τε = τ - ε, halfπ = π / 2, d3_radians = π / 180, d3_degrees = 180 / π;

vasyl-ivanchuk commented 8 years ago

@ashchurova yep, it seems that upgrading d3 to the latest version solves the problem. I think we should address this issue as a separate one to someone from development team, because as you've mentioned it is not related to your customization.

ashchurova commented 8 years ago

@vasyl-ivanchuk sorry, I had missed your comment that you are not on CartoDb development team :).. I have found one issue, it is not even an issue, it is just the way I have it not the best way to clean up after layer is removed. I have found it a better way now since I am working on writing the actual Cartodb views implementation for Ol for Cartodb editor. I will fix it and probably resubmit this pull request.

ashchurova commented 8 years ago

@vasyl-ivanchuk do you use make file to built it? I have found only this way to build torque.

vasyl-ivanchuk commented 8 years ago

@ashchurova great news about the improvement you've mentioned! Yes, I use make file to build torque.