Show raw sequence info on map

This commit is contained in:
D. Berge
2020-08-11 16:03:37 +02:00
parent 380d39dd62
commit cae40c976e

View File

@@ -87,13 +87,15 @@ const layers = {
}
},
onEachFeature (feature, layer) {
const p = feature.properties;
const popup = feature.geometry.type == "Point"
? `Raw sequence ${feature.properties.sequence}<br/>Point <b>${feature.properties.line} / ${feature.properties.point}</b><br/>${feature.properties.objref}<br/>${feature.properties.tstamp}`
: `Raw sequence ${feature.properties.sequence}<br/>
Line <b>${feature.properties.line}</b><br/>
${feature.properties.num_points} points, ???? m<br/>
????<br/>
<table><tr><td>????</td><td>${ftstamp(feature.properties.ts0)}</td></tr><tr><td>????</td><td>${ftstamp(feature.properties.ts1)}</td></tr></table>`;
: `Raw sequence ${p.sequence}<br/>
Line <b>${p.line}</b><br/>
${p.num_points} points${p.missing_shots ? " <i>("+p.missing_shots+" missing)</i>" : ""}<br/>
${Math.round(p.length)} m ${p.azimuth.toFixed(1)}°<br/>
${p.duration}<br/>
<table><tr><td><b>${p.fsp}</b></td><td>@ ${ftstamp(p.ts0)}</td></tr><tr><td><b>${p.lsp}</b></td><td>@ ${ftstamp(p.ts1)}</td></tr></table>`;
layer.bindTooltip(popup, {sticky: true});
}
}),