locator = {
const svg = d3
.create("svg")
.attr("viewBox", `0 0 ${mapWidth} ${mapHeight}`)
.attr("width", mapWidth)
.attr("font-family", "sans-serif")
.attr("font-size", 8);
svg
.append("circle")
.attr("r", mapWidth / 2)
.attr("cx", mapHeight / 2)
.attr("cy", mapWidth / 2)
.attr("fill", "none")
.attr("stroke", "#000000")
.attr("stroke-width", 1);
const g = svg.append("g");
const landGroup = g.append("g").attr("class", "base");
landGroup
.append("path")
.datum(land)
.attr("fill", "#ececec")
.attr("stroke", "none")
.attr("d", path);
const countriesGroup = g.append("g").attr("class", "countries");
countriesGroup
.append("path")
.datum(countries)
.attr("fill", "#ececec")
.attr("stroke", "#000")
.attr("stroke-width", 1)
.attr("d", path);
const pointersGroup = svg.append("g");
pointersGroup
.selectAll("circle")
.data(pointers)
.enter()
.append("circle")
.attr("r", 3)
.attr("fill", "red")
.attr("cx", (d) => projection([d.coordinates[1], d.coordinates[0]])[0])
.attr("cy", (d) => projection([d.coordinates[1], d.coordinates[0]])[1]);
return svg.node();
}