map = geoJSON => {
const ctx = DOM.context2d(width, height);
const path = d3
.geoPath()
.projection(d3.geoMercator().fitSize([width, height], geoJSON))
.context(ctx);
ctx.beginPath();
path(geoJSON);
ctx.lineWidth = 1;
ctx.strokeStyle = "#000";
ctx.stroke();
return ctx.canvas;
const svg = d3.create("svg").attr("viewBox", [0, 0, width, height]);
svg
.selectAll("path")
.data(geoJSON.features)
.join("path")
.style("stroke", "black")
.style("fill", "none")
.attr("d", path);
return svg.node();
}