diff --git a/lib/torque/leaflet/torque.js b/lib/torque/leaflet/torque.js index 85ef695..48a3945 100644 --- a/lib/torque/leaflet/torque.js +++ b/lib/torque/leaflet/torque.js @@ -649,9 +649,10 @@ L.TorqueLayer = L.CanvasLayer.extend({ for(_x = x; _x < xf; _x += this.options.resolution){ var thisValue = this.getValueForPos(_x,_y); if (thisValue !== null) { + var xy = this._map.latLngToContainerPoint([bb[0].lat, bb[0].lon]); values.push({ - x: _x, - y: _y, + x: xy.x, + y: xy.y, value: thisValue.value }) }