diff --git a/lib/torque/renderer/cartocss_render.js b/lib/torque/renderer/cartocss_render.js index b8528ae..1e580d2 100644 --- a/lib/torque/renderer/cartocss_render.js +++ b/lib/torque/renderer/cartocss_render.js @@ -72,7 +72,9 @@ } function renderSprite(ctx, st) { - var img = st['point-file'] || st['marker-file']; + var img_name = st['point-file'] || st['marker-file']; + var img = new Image(); + img.src = img_name; var ratio = img.height/img.width; var w = st['marker-width'] || img.width; var h = st['marker-width'] || st['marker-height'] || w*ratio;