added setCartocss method

This commit is contained in:
javi 2013-08-20 12:05:46 +02:00
parent fd0dfb68ca
commit 508dfa8a63

View File

@ -74,6 +74,15 @@ L.TorqueLayer = L.CanvasLayer.extend({
setKey: function(key) { setKey: function(key) {
this.key = key; this.key = key;
this.redraw(); 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) { setKey: function(key) {
this.key = key; this.key = key;
this.redraw(); 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);
} }
}); });