From da196b93dcd704e2150e691e2dc588952015b50d Mon Sep 17 00:00:00 2001 From: marc tobias Date: Tue, 24 May 2022 14:53:40 +0200 Subject: [PATCH] reverse map: add tooltips to circle markers --- CHANGES.md | 8 ++++---- package.json | 2 +- src/components/Map.svelte | 4 ++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3aa02a0..0887d3d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # CHANGES +* version 3.2.5 - 2022-05-24 + + * Reverse map: add tooltips to circles as hint what is the search and what is result position + * version 3.2.4 - 2022-05-05 * Configuration: Nominatim_API_Endpoint can now also be a callback @@ -9,10 +13,6 @@ * Fix: On Search page the 'deduplication' checkbox needs to be checked by default -* version 3.2.3 - 2022-04-05 - - * Fix: On Search page the 'deduplication' checkbox needs to be checked by default - * version 3.2.2 - 2022-02-08 * NPM package updates diff --git a/package.json b/package.json index bbfae03..120c9dc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nominatim-ui", "description": "Debug web interface for Nominatim geocoder", - "version": "3.2.4", + "version": "3.2.5", "license": "GPL-2.0", "scripts": { "build": "rollup -c", diff --git a/src/components/Map.svelte b/src/components/Map.svelte index b3b9e83..763495d 100644 --- a/src/components/Map.svelte +++ b/src/components/Map.svelte @@ -108,6 +108,7 @@ clickable: false } ); + cm.bindTooltip(`Search (${position_marker[0]},${position_marker[1]})`).openTooltip(); cm.addTo(map); dataLayers.push(cm); } @@ -136,6 +137,9 @@ let circle = L.circleMarker([lat, lon], { radius: 10, weight: 2, fillColor: '#ff7800', color: 'blue', opacity: 0.75 }); + if (position_marker) { // reverse result + circle.bindTooltip('Result').openTooltip(); + } map.addLayer(circle); dataLayers.push(circle); } -- 2.39.5