canvas = {
const context = DOM.context2d(width, height);
const projection = d3.geoMercator().fitSize([width, height], mapData);
const path = d3.geoPath().projection(projection).context(context);
mapData.features.forEach((feature) => {
context.beginPath();
path(feature);
context.strokeStyle = "#ddd";
context.lineWidth = 1;
context.stroke();
});
treesCoords.forEach((d) => {
const [x, y] = projection(d);
context.beginPath();
context.arc(x, y, 1, 0, 2 * Math.PI);
context.fillStyle = "green";
context.fill();
});
return context.canvas
}