From c3b2e471ed3bb6eb61c078c903814f40d57ca3fa Mon Sep 17 00:00:00 2001 From: alan-wu Date: Mon, 5 Jun 2023 20:42:34 +1200 Subject: [PATCH] Search will display the label and location of the highest score result. --- package-lock.json | 2 +- package.json | 2 +- src/components/FlatmapVuer.vue | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7a6ffb88..b84fd5e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@abi-software/flatmapvuer", - "version": "0.4.6-fixes-1", + "version": "0.4.6-fixes-2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9a00cc28..8faf9e33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@abi-software/flatmapvuer", - "version": "0.4.6-fixes-1", + "version": "0.4.6-fixes-2", "license": "Apache-2.0", "main": "./dist/flatmapvuer.common.js", "files": [ diff --git a/src/components/FlatmapVuer.vue b/src/components/FlatmapVuer.vue index d5a4622e..b2c556e3 100644 --- a/src/components/FlatmapVuer.vue +++ b/src/components/FlatmapVuer.vue @@ -844,9 +844,10 @@ export default { if (displayLabel && searchResults.results[0].featureId && searchResults.results[0].text) { + const annotation = this.mapImp.annotation(searchResults.results[0].featureId); this.mapImp.showPopup( searchResults.results[0].featureId, - searchResults.results[0].text, + annotation.label, { className: "custom-popup", positionAtLastClick: false, preserveSelection: true } ) }