diff --git a/lib/torque/leaflet/torque.js b/lib/torque/leaflet/torque.js index 79b14cc..9a1377b 100644 --- a/lib/torque/leaflet/torque.js +++ b/lib/torque/leaflet/torque.js @@ -74,6 +74,15 @@ L.TorqueLayer = L.CanvasLayer.extend({ setKey: function(key) { this.key = key; this.redraw(); + }, + + + /** + * set the cartocss for the current renderer + */ + setCartoCSS: function(cartocss) { + if (!this.renderer) throw new Error('renderer is not valid'); + return this.renderer.setCartoCSS(cartocss); } }); @@ -143,6 +152,14 @@ L.TiledTorqueLayer = L.TileLayer.Canvas.extend({ setKey: function(key) { this.key = key; this.redraw(); + }, + + /** + * set the cartocss for the current renderer + */ + setCartoCSS: function(cartocss) { + if (!this.renderer) throw new Error('renderer is not valid'); + return this.renderer.setCartoCSS(cartocss); } });