From fe2d94dad0d3bd627d54a7ab0dfa9c17697ec1ae Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Wed, 5 Jun 2024 09:55:20 -0400 Subject: [PATCH] '#2088 corrects marker checked sync state for items with multiple valued locations --- .../main/java/iped/geo/impl/MapViewer.java | 3 +- .../java/iped/geo/js/GetResultsJSWorker.java | 3 ++ .../resources/iped/geo/openstreet/L.KML.js | 31 ++++++++++--------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/iped-geo/src/main/java/iped/geo/impl/MapViewer.java b/iped-geo/src/main/java/iped/geo/impl/MapViewer.java index d228f63c49..91b41beba8 100644 --- a/iped-geo/src/main/java/iped/geo/impl/MapViewer.java +++ b/iped-geo/src/main/java/iped/geo/impl/MapViewer.java @@ -175,8 +175,7 @@ public void applyCheckedItems() { Entry entry = (Entry) iterator.next(); IItemId item = entry.getKey(); if (mapaPanel.hasItem(item)) { - String gid = GetResultsJSWorker.MARKER_PREFIX + item.getSourceId() + "_" + item.getId(); //$NON-NLS-1$ //$NON-NLS-2$ - checked.put(gid, entry.getValue()); + mapaPanel.addSelection(checked, item, entry.getValue()); } } mapaPanel.browserCanvas.sendCheck(checked); diff --git a/iped-geo/src/main/java/iped/geo/js/GetResultsJSWorker.java b/iped-geo/src/main/java/iped/geo/js/GetResultsJSWorker.java index a328bed0f5..302c0e96ac 100644 --- a/iped-geo/src/main/java/iped/geo/js/GetResultsJSWorker.java +++ b/iped-geo/src/main/java/iped/geo/js/GetResultsJSWorker.java @@ -126,6 +126,8 @@ protected KMLResult doReloadInBackground() throws Exception { minlat = 190.0; maxlat = -190.0; + lastResultBitmap = createCasesEmptyBitmapArray(msource); + IMultiSearchResult results = app.getResults(); Document doc; @@ -204,6 +206,7 @@ void addItemGeoToGidLists(IItemId item, Map> gpsItems, St int finalMapOrder) throws IOException { int luceneId = app.getIPEDSource().getLuceneId(item); Document doc = app.getIPEDSource().getSearcher().doc(luceneId); + lastResultBitmap[item.getSourceId()].add(item.getId()); String[] locations = doc.getValues(ExtraProperties.LOCATIONS); diff --git a/iped-geo/src/main/resources/iped/geo/openstreet/L.KML.js b/iped-geo/src/main/resources/iped/geo/openstreet/L.KML.js index c9ab75e529..5cc77986d8 100644 --- a/iped-geo/src/main/resources/iped/geo/openstreet/L.KML.js +++ b/iped-geo/src/main/resources/iped/geo/openstreet/L.KML.js @@ -356,11 +356,7 @@ L.KML = L.MarkerClusterGroup.extend({ checkMarcador: function (id, b, notify){ for(i=0;i