From a8b404133eff91f3db1707b5434432bf3ddb28be Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 29 Dec 2024 19:14:23 -0700 Subject: [PATCH] add requests for map tiles with counts of plans (commented out) --- CHANGELOG.md | 7 +- package.json | 4 +- src/views/DiscoverView.vue | 157 ++++++++++++++++++++++++++++++++++- src/views/SearchAreaView.vue | 8 +- 4 files changed, 167 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd95435..bc0466f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.3.42] - 2024.12.27 +## [0.3...] +### Added +- Projects on a map + + +## [0.3.42] - 2024.12.27 - 9751934bc24a1040415a8cfeacbae59ed91f92a5 ### Added - Link from certificate page to the claim ### Changed diff --git a/package.json b/package.json index 4c59808..77b185b 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@veramo/did-provider-peer": "^6.0.0", "@veramo/did-resolver": "^5.6.0", "@veramo/key-manager": "^5.6.0", + "@vue-leaflet/vue-leaflet": "^0.10.1", "@vueuse/core": "^10.9.0", "@zxing/text-encoding": "^0.9.0", "asn1-ber": "^1.2.2", @@ -52,6 +53,7 @@ "jdenticon": "^3.2.0", "js-generate-password": "^0.1.9", "js-yaml": "^4.1.0", + "leaflet": "^1.9.4", "localstorage-slim": "^2.7.0", "lru-cache": "^10.2.0", "luxon": "^3.4.4", @@ -91,14 +93,12 @@ "@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/parser": "^6.21.0", "@vitejs/plugin-vue": "^5.0.4", - "@vue-leaflet/vue-leaflet": "^0.10.1", "@vue/eslint-config-typescript": "^11.0.3", "autoprefixer": "^10.4.19", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-vue": "^9.23.0", - "leaflet": "^1.9.4", "postcss": "^8.4.38", "prettier": "^3.2.5", "tailwindcss": "^3.4.1", diff --git a/src/views/DiscoverView.vue b/src/views/DiscoverView.vue index 12d0e66..5f1345b 100644 --- a/src/views/DiscoverView.vue +++ b/src/views/DiscoverView.vue @@ -16,6 +16,7 @@ id="QuickSearch" class="mt-8 mb-4 flex" v-on:keyup.enter="searchSelected()" + :style="{ visibility: isSearchVisible ? 'visible' : 'hidden' }" > Nearby + +
  • Anywhere +
  • @@ -89,6 +115,25 @@ +
    +
    + + + +
    +
    +
    None found in the selected area. - No projects were found with that search. + No projects were found with that search.

    @@ -144,7 +189,15 @@ + \ No newline at end of file diff --git a/src/views/SearchAreaView.vue b/src/views/SearchAreaView.vue index b8c3767..ff1da94 100644 --- a/src/views/SearchAreaView.vue +++ b/src/views/SearchAreaView.vue @@ -68,7 +68,7 @@ -
    +
    void; isChoosingSearchBox = false; @@ -166,8 +166,8 @@ export default class DiscoverView extends Vue { // This doesn't seem like the right approach but it's the only way I can find to get the screen bounds. const bounds = event.target.boxZoom?._map?.getBounds(); if (bounds) { - latDiff = Math.abs(bounds._northEast.lat - bounds._southWest.lat) / 8; - longDiff = Math.abs(bounds._northEast.lng - bounds._southWest.lng) / 8; + latDiff = Math.abs(bounds.getNorthEast().lat - bounds.getSouthWest().lat) / 8; + longDiff = Math.abs(bounds.getNorthEast().lng - bounds.getSouthWest().lng) / 8; } this.localLatDiff = latDiff; this.localLongDiff = longDiff;