From 7121def00ab0bdf13f5b216bb77ed489d6ea0782 Mon Sep 17 00:00:00 2001 From: regeter <2320305+regeter@users.noreply.github.com> Date: Tue, 20 Jan 2026 23:09:35 -0800 Subject: [PATCH] fix: flp and raw location within 1.1m is considered a match --- src/Map.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Map.js b/src/Map.js index bc49a5e..6df2627 100644 --- a/src/Map.js +++ b/src/Map.js @@ -482,7 +482,9 @@ function MapComponent({ const hasRaw = rawLat !== undefined && rawLng !== undefined; const hasFlp = flpLat !== undefined && flpLng !== undefined; - const isMatch = hasRaw && hasFlp && rawLat === flpLat && rawLng === flpLng; + + const to5 = (num) => (num ? num.toFixed(5) : num); // Within 1.1m is considered a match + const isMatch = hasRaw && hasFlp && to5(rawLat) === to5(flpLat) && to5(rawLng) === to5(flpLng); const updateMarker = (markerRefName, position, color, zIndex, scale = 2) => { if (!position) { @@ -523,7 +525,7 @@ function MapComponent({ }; if (isMatch) { - updateMarker("matchLocation", rawLocation, "#C71585", 8, 3); + updateMarker("matchLocation", flpLocation, "#C71585", 8, 3); updateMarker("rawLocation", null); updateMarker("flpLocation", null); } else {