diff --git a/webserver/pytreedb_server/static/js/script.js b/webserver/pytreedb_server/static/js/script.js index 26206db..8eaf50e 100644 --- a/webserver/pytreedb_server/static/js/script.js +++ b/webserver/pytreedb_server/static/js/script.js @@ -21,7 +21,8 @@ var filterKeys = { "source": "properties.measurements.source", "dbh": "properties.measurements.DBH_cm", "height": "properties.measurements.height_m", - "crowndia.": "properties.measurements.mean_crown_diameter_m" + "crowndia.": "properties.measurements.mean_crown_diameter_m", + "labels": "properties.data.has_labels" } // Init leaflet map var map = L.map('mapContainer').fitWorld(); @@ -774,6 +775,14 @@ updateAvailableVals = (newFilterID, field) => { break; case "Quality": break; + case "Labels": + var has_labels = ['true', 'false']; + has_labels.forEach(cond => { + $(availableValuesEl).append( + '
  • ' + cond + '
  • ' + ); + }) + break; default: break; } @@ -986,4 +995,3 @@ cleanMap = () => { map.invalidateSize(); // Make sure tiles render correctly markers.clearLayers(); // Remove previous markers } - diff --git a/webserver/pytreedb_server/templates/index.html b/webserver/pytreedb_server/templates/index.html index 0a6574a..189a10d 100644 --- a/webserver/pytreedb_server/templates/index.html +++ b/webserver/pytreedb_server/templates/index.html @@ -128,6 +128,7 @@

    Welcome to pytreedb

  • DBH
  • Height
  • CrownDia.
  • +
  • Labels