{
const canvas = DOM.canvas(width, height);
const c = canvas.getContext('2d');
const path = d3.geoPath(projection, c);
const [minx, miny] = projection(extents.max);
const [maxx, maxy] = projection(extents.min);
const wx = Math.abs(maxx - minx);
const wy = Math.abs(maxy - miny);
c.drawImage(bufferCanvas, minx, miny, wx, wy);
c.strokeStyle = "lightblue";
c.fillStyle = "none";
c.beginPath();
const riverpaths = path(rivers);
c.stroke();
c.beginPath();
path({ type: "MultiPoint", coordinates: [extents.min, extents.max] });
c.fillStyle = "red";
c.fill();
if (showPollingLocations) {
c.beginPath();
path.pointRadius(1.5)(data);
c.fillStyle = "steelblue";
c.strokeStyle = "black";
c.stroke();
c.fill();
}
return canvas;
}