All checks were successful
CI / test-and-build (push) Successful in 47s
Root cause: osm-data.mjs emitted ways with 'out center' (no geometry) as a flat [lon,lat] labeled 'LineString'. Leaflet reads those as two invalid points and threw 'Invalid LatLng', which aborted the entire layer load loop in onMount -- so no layers rendered and the checkboxes all showed unchecked. Toggling then appeared to do nothing. Fixes: - osm-data.mjs: coordsFor/geometryFor now emit a proper Point for any flat [lon,lat] (from nodes / 'out center' ways) instead of a malformed LineString - MapView.svelte: isolate each layer's load + each feature's searchable build in try/catch so one bad feature/layer can't break all layers; skip invalid bounds in fitBounds - osm-data.mjs: preserve manifest entries it doesn't generate (e.g. dump layers from osm-dump.mjs) so data/osm-dump scripts don't clobber each other - scripts/test.mjs: add geometry-integrity checks (no malformed coords) Verified in a real browser: all 6 layers render, each toggles off/on independently (33361->0 overlays), and the Directions panel loads.
36 lines
1.0 KiB
JSON
36 lines
1.0 KiB
JSON
{
|
|
"name": "navigator",
|
|
"private": true,
|
|
"version": "0.0.1",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite dev",
|
|
"data": "node scripts/osm-data.mjs",
|
|
"data:area": "node scripts/osm-data.mjs",
|
|
"build:data": "node scripts/osm-data.mjs",
|
|
"build:dump": "node scripts/osm-dump.mjs",
|
|
"build": "npm run build:data && npm run build:dump && vite build",
|
|
"build:static": "vite build",
|
|
"test": "tsx scripts/test.mjs",
|
|
"preview": "vite preview",
|
|
"prepare": "svelte-kit sync || echo ''",
|
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
|
|
},
|
|
"devDependencies": {
|
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
"@sveltejs/kit": "^2.63.0",
|
|
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
|
"svelte": "^5.56.1",
|
|
"svelte-check": "^4.6.0",
|
|
"tsx": "^4.19.2",
|
|
"typescript": "^6.0.3",
|
|
"vite": "^8.0.16"
|
|
},
|
|
"dependencies": {
|
|
"@types/leaflet": "^1.9.22",
|
|
"leaflet": "^1.9.4",
|
|
"osm-pbf-parser": "^2.3.0"
|
|
}
|
|
}
|