Add ADS-B, AIS, and ALPR map layers with live CoT streaming #36

Merged
Keli Grubb merged 2 commits from feature/alpr-deflock-layer into main 2026-06-24 20:54:50 +00:00
2 changed files with 13 additions and 12 deletions
Showing only changes of commit 755309d103 - Show all commits
+4 -3
View File
@@ -28,7 +28,7 @@ export function useCotStream(boundsRef, layerQueryRef) {
const subscribedKey = ref('') const subscribedKey = ref('')
const streamBounds = ref(null) const streamBounds = ref(null)
const setEntities = record => { const setEntities = (record) => {
entities.value = Object.freeze(record) entities.value = Object.freeze(record)
} }
@@ -66,8 +66,9 @@ export function useCotStream(boundsRef, layerQueryRef) {
})) }))
es.addEventListener('remove', e => parseEvent(e, ({ id }) => { es.addEventListener('remove', e => parseEvent(e, ({ id }) => {
if (!id) return if (!id) return
const { [id]: _removed, ...rest } = entities.value setEntities(Object.fromEntries(
setEntities(rest) Object.entries(entities.value).filter(([key]) => key !== String(id)),
))
})) }))
es.onerror = () => { es.onerror = () => {
closeStream() closeStream()