feat: filter sequences from openstreetcam and streetside

This commit is contained in:
Nikola Plesa
2020-07-24 17:13:18 +02:00
parent d7aa6f920b
commit 8a5002aa15
5 changed files with 80 additions and 13 deletions
+6 -1
View File
@@ -217,11 +217,16 @@ export default {
.forEach(function(sequenceKey) {
var seq = _oscCache.sequences[sequenceKey];
var images = seq && seq.images;
if (images) {
lineStrings.push({
type: 'LineString',
coordinates: images.map(function (d) { return d.loc; }).filter(Boolean),
properties: { key: sequenceKey }
properties: {
captured_at: images[0] ? images[0].captured_at: null,
captured_by: images[0] ? images[0].captured_by: null,
key: sequenceKey
}
});
}
});
+5 -1
View File
@@ -177,7 +177,11 @@ function connectSequences() {
// create a GeoJSON LineString
sequence.geojson = {
type: 'LineString',
properties: { key: sequence.key },
properties: {
captured_at: sequence.bubbles[0] ? sequence.bubbles[0].captured_at : null,
captured_by: sequence.bubbles[0] ? sequence.bubbles[0].captured_by : null,
key: sequence.key
},
coordinates: sequence.bubbles.map(d => d.loc)
};