Add preplot point layers (sail / source line)

This commit is contained in:
D. Berge
2025-08-03 11:52:48 +02:00
parent 5b82f8540d
commit c97eaa64f5

View File

@@ -379,9 +379,41 @@ export default {
}, },
preplotSaillinesPointLayer (options = {}) { preplotSaillinesPointLayer (options = {}) {
return new DougalSequenceLayer({
id: 'pslp',
data: `/api/project/${this.$route.params.project}/line/sail`, // API endpoint returning binary data
loaders: [DougalBinaryLoader],
loadOptions: {
fetch: {
method: 'GET',
headers: { Accept: 'application/vnd.aaltronav.dougal+octet-stream' }
}
},
getRadius: 2,
getFillColor: (d, {data, index}) => data.attributes.value2.value[index] ? [240, 248, 255, 200] : [85, 170, 255, 200],
//getFillColor: [0, 120, 220, 200],
pickable: true,
...options
});
}, },
preplotPointsLayer (options = {}) { preplotPointsLayer (options = {}) {
return new DougalSequenceLayer({
id: 'pplp',
data: `/api/project/${this.$route.params.project}/line/source`, // API endpoint returning binary data
loaders: [DougalBinaryLoader],
loadOptions: {
fetch: {
method: 'GET',
headers: { Accept: 'application/vnd.aaltronav.dougal+octet-stream' }
}
},
getRadius: 2,
getFillColor: (d, {data, index}) => data.attributes.value2.value[index] ? [240, 248, 255, 200] : [85, 170, 255, 200],
//getFillColor: [0, 120, 220, 200],
pickable: true,
...options
});
}, },
plannedLinesPointsLayer (options = {}) { plannedLinesPointsLayer (options = {}) {