Addinf trkseg start/end points
This commit is contained in:
parent
6c2573ba8b
commit
bbaf1e798b
|
@ -31,6 +31,14 @@ export const Trkseg: Component<Props> = ({ vectorSource, trksegId }) => {
|
|||
let geo: any = {
|
||||
type: 'FeatureCollection',
|
||||
features: [
|
||||
{
|
||||
type: 'Feature',
|
||||
geometry: {
|
||||
type: 'Point',
|
||||
coordinates: [trkseg().trkpt[0].$.lon, trkseg().trkpt[0].$.lat],
|
||||
},
|
||||
properties: { type: 'trkseg-start' },
|
||||
},
|
||||
{
|
||||
type: 'Feature',
|
||||
geometry: {
|
||||
|
@ -40,6 +48,18 @@ export const Trkseg: Component<Props> = ({ vectorSource, trksegId }) => {
|
|||
trkpt.$.lat,
|
||||
]),
|
||||
},
|
||||
properties: { type: 'trkseg' },
|
||||
},
|
||||
{
|
||||
type: 'Feature',
|
||||
geometry: {
|
||||
type: 'Point',
|
||||
coordinates: [
|
||||
trkseg().trkpt.at(-1).$.lon,
|
||||
trkseg().trkpt.at(-1).$.lat,
|
||||
],
|
||||
},
|
||||
properties: { type: 'trkseg-finish' },
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue