Tag Info

New answers tagged

0

triggerEvent wants an event as second argument and that event apparently needs an "xy" property with the coordinates like that: event.xy = {x: 0, y: 0} Fixes the error message but unfortunately still does not trigger the popup for me.


0

indeed Torque can send events to JS functions. maybe it's not exactly what you need (the number of bubbles accumulated) but you can set a listener on time change. Thus you can access the time and step values. Find attached an example: http://bl.ocks.org/matallo/db7bcda00e6168a061eb For the number of bubbles you can get them with the example query by ...


2

You don't need a javascript query, you only need to know the number of bubbles per time and then get the change:time signal in torque layer. layer.on('change:time', function(datetime) { // update graph }) For number of bubbles you can get them from SQL API with a simple query or use this small hack I did some time ago ...


0

I found another question (register event "loadend" on layer) with one answer which lead me to the right event: vectorLayer.on('postcompose', function(event) { if (vectorLayer.getVisible()) { doSomething(); } }); The method doSomething(); is now called when the corresponding vector layer was completely rendered on the Canvas.



Top 50 recent answers are included