Decode APRS station symbols and improve map centering
Render local APRS symbol sprites with table and overlay details while preserving markers and open popups during refresh. Open the map around the local station with a 30 km radius and fit the densest station group without distant outliers. Add localization, attribution and regression coverage.
This commit is contained in:
1 parent
2ef3c25eb3
commit
8ee4e9636a
14 files changed
+605
-21
No files matched your search
+1
-1
@@ -210,7 +210,7 @@ const server=http.createServer(async(req,res)=>{
|
||||
}
|
||||
if(req.method!=='GET'){json(res,405,{error:'Metodo non disponibile'});return;}
|
||||
const vendor=url.pathname.match(/^\/vendor\/pdfjs\/(pdf\.min\.mjs|pdf\.worker\.min\.mjs|(?:standard_fonts|cmaps)\/[A-Za-z0-9_.-]+)$/);if(vendor&&!vendor[1].includes('..')){const bytes=await readFile(path.join(dir,'public','vendor','pdfjs',vendor[1]));res.writeHead(200,{'Content-Type':vendor[1].endsWith('.mjs')?'text/javascript':'application/octet-stream','Cache-Control':'public, max-age=86400'});res.end(bytes);return;}
|
||||
const files={'/busy.js':'busy.js','/busy.css':'busy.css','/vendor/leaflet/leaflet.js':'vendor/leaflet/leaflet.js','/vendor/leaflet/leaflet.css':'vendor/leaflet/leaflet.css','/aprs-activity.js':'aprs-activity.js','/aprs-activity.css':'aprs-activity.css','/aprs.js':'aprs.js','/aprs.css':'aprs.css','/radio-ports.js':'radio-ports.js','/radio-ports.css':'radio-ports.css','/compose-attachments.js':'compose-attachments.js','/compose-attachments.css':'compose-attachments.css','/i18n.js':'i18n.js','/i18n.css':'i18n.css','/sync-state.js':'sync-state.js','/sync-progress.js':'sync-progress.js','/sync-progress.css':'sync-progress.css','/radio-control.js':'radio-control.js','/radio-control.css':'radio-control.css','/terminal.js':'terminal.js','/terminal.css':'terminal.css','/winlink-radio.js':'winlink-radio.js','/winlink-radio.css':'winlink-radio.css','/forwarding.js':'forwarding.js','/forwarding.css':'forwarding.css','/journal.js':'journal.js','/journal.css':'journal.css','/world-land.json':'world-land.json','/monitor.js':'monitor.js','/monitor.css':'monitor.css','/':'index.html','/app.js':'app.js','/enhancements.js':'enhancements.js','/notifications.js':'notifications.js','/winlink.js':'winlink.js','/mission.js':'mission.js','/attachments.js':'attachments.js','/mission.css':'mission.css','/style.css':'style.css','/dark.css':'dark.css'};const file=files[url.pathname];if(!file){json(res,404,{error:'Pagina non trovata'});return;}const bytes=await readFile(path.join(dir,'public',file));res.writeHead(200,{'Content-Type':file.endsWith('.json')?'application/json':file.endsWith('.css')?'text/css; charset=utf-8':file.endsWith('.js')?'text/javascript; charset=utf-8':'text/html; charset=utf-8','Cache-Control':'no-cache'});res.end(bytes);
|
||||
const files={'/aprs-symbols.js':'aprs-symbols.js','/vendor/aprs-symbols/primary.png':'vendor/aprs-symbols/primary.png','/vendor/aprs-symbols/alternate.png':'vendor/aprs-symbols/alternate.png','/vendor/aprs-symbols/README.md':'vendor/aprs-symbols/README.md','/vendor/aprs-symbols/COPYRIGHT.md':'vendor/aprs-symbols/COPYRIGHT.md','/busy.js':'busy.js','/busy.css':'busy.css','/vendor/leaflet/leaflet.js':'vendor/leaflet/leaflet.js','/vendor/leaflet/leaflet.css':'vendor/leaflet/leaflet.css','/aprs-activity.js':'aprs-activity.js','/aprs-activity.css':'aprs-activity.css','/aprs.js':'aprs.js','/aprs.css':'aprs.css','/radio-ports.js':'radio-ports.js','/radio-ports.css':'radio-ports.css','/compose-attachments.js':'compose-attachments.js','/compose-attachments.css':'compose-attachments.css','/i18n.js':'i18n.js','/i18n.css':'i18n.css','/sync-state.js':'sync-state.js','/sync-progress.js':'sync-progress.js','/sync-progress.css':'sync-progress.css','/radio-control.js':'radio-control.js','/radio-control.css':'radio-control.css','/terminal.js':'terminal.js','/terminal.css':'terminal.css','/winlink-radio.js':'winlink-radio.js','/winlink-radio.css':'winlink-radio.css','/forwarding.js':'forwarding.js','/forwarding.css':'forwarding.css','/journal.js':'journal.js','/journal.css':'journal.css','/world-land.json':'world-land.json','/monitor.js':'monitor.js','/monitor.css':'monitor.css','/':'index.html','/app.js':'app.js','/enhancements.js':'enhancements.js','/notifications.js':'notifications.js','/winlink.js':'winlink.js','/mission.js':'mission.js','/attachments.js':'attachments.js','/mission.css':'mission.css','/style.css':'style.css','/dark.css':'dark.css'};const file=files[url.pathname];if(!file){json(res,404,{error:'Pagina non trovata'});return;}const bytes=await readFile(path.join(dir,'public',file));res.writeHead(200,{'Content-Type':file.endsWith('.png')?'image/png':file.endsWith('.md')?'text/plain; charset=utf-8':file.endsWith('.json')?'application/json':file.endsWith('.css')?'text/css; charset=utf-8':file.endsWith('.js')?'text/javascript; charset=utf-8':'text/html; charset=utf-8','Cache-Control':'no-cache'});res.end(bytes);
|
||||
}catch(e){json(res,502,{error:e.message||'BPQ temporaneamente non disponibile'});}
|
||||
});
|
||||
server.listen(port,'0.0.0.0',()=>console.log(`BPQ Console: http://127.0.0.1:${port}`));
|
||||
Reference in new issue
Block a user