Search results map - #1027
Conversation
based on the custom footer PoC by Paul Boon
|
@julian-schneider Great work! |
|
FWIW: Using ?query_entities=false in the Dataverse API is a factor or 10x faster, so unless you needed the added info, I'd definitely add it. |
- pins are now placed in the averaged center of bboxes - when clicking a pin, the map zooms out to show all bboxes - while popup & bboxes are displayed, the pin will not be clustered
|
Made some updates, here's a short video showcasing the behavior 🗺️ map-tab-status.webmNote that each dataset's marker is placed in the center of its bounding box (averaged, if it has more than one). These bounding boxes come from the geospatial metadata block. Initially, the map loads the 50 geospatial datasets that are the most relevant results of the search query. "Load more" fetches the next 50 datasets and adds them into the view. |
|
Regarding performance: Thanks for linking your stuff @PaulBoon! I've used the data generation tool to produce an initial set of around 200 datasets for testing purposes. So far I've only executed the project locally using @qqmyers I'm not sure why, but
yield the same API response, and take about the same time. Also, to populate the map I definitely need the bounding boxes, so I need to use |
|
query_entities was restored as a working parameter in Feb. 2025 so Dataverse releases before then won't use it. If that's not the issue, I can't think of anything off-hand. As for getting the bounding box, those fields are in solr - I'd guess that means you don't need to query the entities, but I'm not sure w/o checking. I guess it would be easy to check once the issue with not being able to see a difference with query_entities true/false is resolved. |
|
(Ah yes when executing With that fixed, now I'm getting the drastic speed-up from The query {
"name": "Test dataset 27 with 2 boxes 3ee7538a-8b72-461d-8221-7dc29a05f2bd",
"type": "dataset",
"url": "https://doi.org/10.5072/FK2/VOS4AT",
"global_id": "doi:10.5072/FK2/VOS4AT",
"description": "test",
"published_at": "2026-08-14T10:47:38Z",
"publisher": "Root",
"citationHtml": "Admin, Dataverse, 2026, \"Test dataset 27 with 2 boxes 3ee7538a-8b72-461d-8221-7dc29a05f2bd\", <a href=\"https://doi.org/10.5072/FK2/VOS4AT\" target=\"_blank\">https://doi.org/10.5072/FK2/VOS4AT</a>, Root, V1",
"identifier_of_dataverse": "root",
"name_of_dataverse": "Root",
"citation": "Admin, Dataverse, 2026, \"Test dataset 27 with 2 boxes 3ee7538a-8b72-461d-8221-7dc29a05f2bd\", https://doi.org/10.5072/FK2/VOS4AT, Root, V1",
"publicationStatuses": [
"Published"
],
"authors": [
"Admin, Dataverse"
]
},As far as I can tell, SolrSearchResult.java and SolrSearchServiceBean.java decide which fields from Solr are added into the API response. Do you think we could get the geospatial information in there? Or would it be possible to add a parameter that allows specifying which fields from the Solr schema should get returned (so, similar to |
|
Bummer. In general, I can’t think of any reason we couldn’t return more fields from solr, someone would just have to do the work. The only thing I can think to make sure you’re search is as fast as currently possible is to use the geo_point/geo_radius parameters to just find the datasets that would be in view. |

What this PR does / why we need it:
Adds a browsable map of all search results with geospatial information. It is located in a tab on the search results page, as an alternative to the normal list of search results. The map displays one pin per dataset, which can be clicked for a small preview that leads the user to the details page. Clusters of pins are grouped to declutter the area.
This implementation is entirely based on the proof of concept by @PaulBoon described in detail here. That PoC uses a custom footer to inject the map into the classic UI, while this implementation is based on
react-leaflet.This PR is a work-in-progress draft version. Some open issues I'm aware of:
Which issue(s) this PR closes:
Suggestions on how to test this:
Populate an installation with datasets filling out the official geospatial metadata block, and the map should display them.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Yes. The map was entirely based on the design of the previously-mentioned PoC.
Is there a release notes or changelog update needed for this change?:
Yes