mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 12:17:08 +00:00
Let map cope with non-features being returned by GIS.
Specifically, the raw positioning error vectors
introduced in commit 099cf909c1
This commit is contained in:
@@ -88,15 +88,17 @@ 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 ${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});
|
||||
if (feature.geometry) {
|
||||
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 ${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});
|
||||
}
|
||||
}
|
||||
}),
|
||||
"Final lines": L.geoJSON(null, {
|
||||
|
||||
Reference in New Issue
Block a user