From 508dfa8a63bb61e863521b020bdf2fcbe7953221 Mon Sep 17 00:00:00 2001 From: javi Date: Tue, 20 Aug 2013 12:05:46 +0200 Subject: [PATCH] added setCartocss method --- lib/torque/leaflet/torque.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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); } });