map = {
const context = DOM.context2d(width, height);
const path = d3.geoPath(projection, context);
context.save();
context.beginPath(), path(outline), context.clip(), context.fillStyle = "#fff", context.fillRect(0, 0, width, height);
context.beginPath(), path(graticule), context.strokeStyle = "#ccc", context.stroke();
context.beginPath(), path(land), context.fillStyle = "#000", context.globalAlpha = 0.4, context.fill();
const randomColor = d3.scaleOrdinal(d3.schemeTableau10)
basefaces.forEach((f, i) => {
const poly = {type:"Polygon", coordinates: [[...f, f[0]]]};
const centroid = {type: "Point", coordinates: d3.geoCentroid(poly)};
context.beginPath(), path(poly), context.fillStyle = randomColor(i), context.lineWidth = 2,context.globalAlpha = 0.4, context.fill();
context.beginPath(), path.pointRadius(10)(centroid), context.globalAlpha = 1,
context.lineWidth = 1, context.fillStyle='white', context.strokeStyle='black', context.fill(), context.stroke();
context.fillStyle="black", context.strokeStyle="none", context.textBaseline="middle", context.textAlign="center",
context.fillText(i, projection(centroid.coordinates)[0], projection(centroid.coordinates)[1]);
});
context.restore();
context.beginPath(), path(outline), context.strokeStyle = "#888", context.stroke();
return context.canvas;
}