map = html`<h1>Paths ${filterString} ${regionName}</h1><svg viewBox="0 0 ${width} ${height}" style="display: block;">
<style>
.world { stroke: #eeeeee; stroke-width: 0.5; fill-opacity: 0.3 }
.hop-loc { fill: none; stroke-width: 1.5; stroke: black; }
.probe-loc { stroke-width: 2; stroke: none; fill: white; fill-opacity: 0.8 }
.l-path { fill: none; stroke-width: 2; stroke: lightBlue; }
.kreis { fill-opacity: 0.8; }
.bunch-of-lines { stroke: black; stroke-width: 0.2; fill: none; stroke-opacity: 1; }
.f-locs { fill: white; fill-opacity: 0.6; stroke: black; stroke-width: 1; }
.pt-locs { fill: none; stroke: #a2cade; }
.e-line { fill: none; stroke: #ff8e19; stroke-opacity: 0.7; }
.probe-center { fill: none; stroke: none; }
.cc-name { fill: white; stroke: none; font: normal 14px arial; }
</style>
<defs>
<path id="outline" d="${path(outline)}" />
<clipPath id="clip"><use xlink:href="${new URL("#outline", location)}" /></clipPath>
</defs>
<g class="world" clip-path="url(${new URL("#clip", location)})">
<use xlink:href="${new URL("#outline", location)}" fill="#fff" />
${land.features.filter(c => { const cc = c.properties.countryCode; return regionCountries.find(ccc => ccc === cc) }).map(l => { const center = projection(turf.centerOfMass(l.geometry).geometry.coordinates); return `<path class="kreis" d="${path(l.geometry)}" style="fill: ${popKreisColor(l.properties.pop_density)}"></path><text class="cc-name" x=${center[0]} y=${center[1]}>${l.properties.countryCode}</text>`; })}
</g>
<g>${filterString === "outside" && ffLocs.map(l => {
let eCoords = projection(l.geometry.coordinates);
let bCoords = projection(probeCenter.geometry.coordinates);
return `<line class="e-line" x1="${bCoords[0]}" y1="${bCoords[1]}" x2="${eCoords[0]}" y2="${eCoords[1]}" style="stroke-width: ${farthestLine(l.properties.farthestCount)};"/>`;
})}</g>
<g>${ffLocs.map(l => { let coords = projection(l.geometry.coordinates);
return `<circle class="pt-locs" r="${farthestScale(l.properties.aggPassThroughCount || l.properties.passThroughCount)}" cx="${coords[0]}" cy="${coords[1]}"/><circle class="f-locs" style="fill: ${pathLengthScale(l.properties.avgMedianPathLength || l.properties.medianPathLength)}" r="${farthestScale(l.properties.aggFarthestCount || l.properties.farthestCount)}" cx="${coords[0]}" cy="${coords[1]}"/><text x="${coords[0]}" y="${coords[1]}">${l.properties.cityName !== "Astana" && l.properties.cityName || "Nur-Sultan"}</text>`})}
</g>
<g><circle class="probe-center" cx="${projection(probeCenter.geometry.coordinates)[0]}" cy="${projection(probeCenter.geometry.coordinates)[1]}" r="5"/></g>
<use xlink:href="${new URL("#outline", location)}" fill="none" stroke="#000" />
</svg>`