diff --git a/web/app.js b/web/app.js index d50e6e3..f6d9a37 100644 --- a/web/app.js +++ b/web/app.js @@ -123,10 +123,13 @@ function countyStyle(feature) { // Filter function for OSM features function shouldShowOsmFeature(feature) { const props = feature.properties || {}; - const isService = props.highway === 'service'; + const isService = props.highway === 'service' || props.highway === 'track'; + const isUnclassified = props.highway === 'unclassified'; const hideService = document.getElementById('hideService').checked; + const hideUnclassified = document.getElementById('hideUnclassified').checked; if (isService && hideService) return false; + if (isUnclassified && hideUnclassified) return false; return true; } @@ -172,11 +175,13 @@ function createOsmLayer() { function shouldShowFeature(feature) { const props = feature.properties || {}; const isRemoved = props.removed === true || props.removed === 'True'; - const isService = props.highway === 'service'; + const isService = props.highway === 'service' || props.highway === 'track'; + const isUnclassified = props.highway === 'unclassified'; const showAdded = document.getElementById('showAdded').checked; const showRemoved = document.getElementById('showRemoved').checked; const hideService = document.getElementById('hideService').checked; + const hideUnclassified = document.getElementById('hideUnclassified').checked; // Check removed/added filter if (isRemoved && !showRemoved) return false; @@ -184,6 +189,7 @@ function shouldShowFeature(feature) { // Check service filter if (isService && hideService) return false; + if (isUnclassified && hideUnclassified) return false; return true; } @@ -229,10 +235,13 @@ function createDiffLayer() { // Filter function for county features function shouldShowCountyFeature(feature) { const props = feature.properties || {}; - const isService = props.highway === 'service'; + const isService = props.highway === 'service' || props.highway === 'track'; + const isUnclassified = props.highway === 'unclassified'; const hideService = document.getElementById('hideService').checked; + const hideUnclassified = document.getElementById('hideUnclassified').checked; if (isService && hideService) return false; + if (isUnclassified && hideUnclassified) return false; return true; } @@ -617,6 +626,12 @@ document.addEventListener('DOMContentLoaded', function() { createCountyLayer(); }); + document.getElementById('hideUnclassified').addEventListener('change', function() { + createDiffLayer(); + createOsmLayer(); + createCountyLayer(); + }); + // Load button document.getElementById('loadButton').addEventListener('click', loadFiles); diff --git a/web/index.html b/web/index.html index 766e13e..64c4d29 100644 --- a/web/index.html +++ b/web/index.html @@ -178,7 +178,11 @@ +