continuousMap = {
const svg = d3.select(DOM.svg(width, height)).style("background", "white");
const mapGroup = svg.append("g");
const w = 0.35;
const h = 0.12;
const titlePlace = mapGroup
.append("text")
.attr("x", width * w)
.attr("y", height * h)
.attr("text-anchor", "end")
.attr("font-size", 20)
.text("");
const titleDuration = mapGroup
.append("text")
.attr("x", width * w)
.attr("y", height * h)
.attr("dy", 20)
.attr("text-anchor", "end")
.text("");
const paths = mapGroup
.selectAll("path")
.data(topojson.feature(jls, jls.objects["JLS"]).features)
.enter()
.append("path")
.attr("fill", (d, i) => {
const mb = `HR_${d.properties.JLS_MB}`;
var durationItem = data.filter((item) => item.id == mb);
var item = durationItem[0];
return colorInterpolated(item.duration / (7 * 3600));
})
.attr("stroke", "lightgrey")
.attr("stroke-width", 0.4)
.attr("stroke-linejoin", "round")
.attr("d", d3.geoPath(projection))
.on("mouseover", (e, d) => {
const mb = `HR_${d.properties.JLS_MB}`;
var durationItem = data.filter((item) => item.id == mb);
var item = durationItem[0];
const travelTime = item.duration;
var hours = Math.floor(travelTime / 60 / 60);
var minutes = (travelTime / 60) % 60;
titlePlace.text(item.name);
titleDuration.text(`${hours}h ${minutes.toFixed(0)}m`);
});
return svg.node();
}