canvas = {
const context = DOM.context2d(width, height * 1.1);
const path = d3.geoPath(null, context);
context.canvas.style.maxWidth = "100%";
context.lineJoin = "round";
context.lineCap = "round";
context.fillStyle = "#FFF8E7";
context.fillRect(0, 0, width, height * 1.1);
var geoGenerator = d3
.geoPath()
.pointRadius(5)
.projection(projection)
.context(context);
context.beginPath();
context.lineWidth = 3;
context.strokeStyle = "purple";
geoGenerator({ type: 'FeatureCollection', features: data.features });
context.stroke();
context.beginPath();
context.strokeStyle = "purple";
context.lineWidth = 0.5;
geoGenerator({
type: 'FeatureCollection',
features: topojson.feature(secondary, secondary.objects.secondary).features
});
context.stroke();
context.beginPath();
context.strokeStyle = "red";
context.lineWidth = 1.5;
geoGenerator({
type: 'FeatureCollection',
features: topojson.feature(primary, primary.objects.primary).features
});
context.stroke();
return context.canvas;
}