From d7d7396ba803faf92f5bc7651e057a8f14a3a211 Mon Sep 17 00:00:00 2001 From: Francisco Dans Date: Tue, 24 Feb 2015 12:06:47 +0100 Subject: [PATCH] properly invalidates ballrenderer with each tile --- lib/torque/leaflet/torque.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/torque/leaflet/torque.js b/lib/torque/leaflet/torque.js index 3d6a55e..5b6d119 100644 --- a/lib/torque/leaflet/torque.js +++ b/lib/torque/leaflet/torque.js @@ -210,7 +210,10 @@ L.TorqueLayer = L.CanvasLayer.extend({ var canvas = this.getCanvas(); this.renderer.clearCanvas(); var ctx = canvas.getContext('2d'); - + if(typeof this.renderer.ballRenderer !== "undefined"){ + this.renderer._ctx.setTransform(1, 0, 0, 1, 0, 0); + this.renderer.ballRenderer.invalidate(); + } for(t in this._tiles) { tile = this._tiles[t]; if (tile) {