Skip to content

Map-based picker for geospatial point fields #5871

Description

@kanasznagyzoltan

Feature request: map-based picker for geospatial point fields

Is your feature request related to a problem? Please describe.

DSpace 10 added a geospatial map viewer (item pages, "map view" in search results, "browse by map"), which reads point coordinates from a metadata field (dcterms.spatial by default) stored as a WKT POINT(longitude latitude) string.

However, there is currently no way to set that value other than typing the WKT string by hand — both when submitting a new item, and when editing an existing item's metadata. This is error-prone and unfriendly:

  • The submitter/editor has to know the WKT syntax and the (longitude, latitude) order, which is easy to get backwards (a common source of "point ends up in the wrong country" bugs).
  • There is no visual feedback: you cannot see on a map where the coordinates you're typing actually point to, so a typo or swapped value is easy to miss until someone notices the item showing up in the wrong place.
  • For an existing item, there is no quick way to verify that a previously entered point is correct — you'd have to copy the value out, parse it manually, and look it up on an external map.

Given the map viewer itself is already built on Leaflet, it seems like a natural gap that the same library isn't available to enter the data it later displays.

Describe the solution you'd like

A way to pick (or visually verify/correct) a geospatial point on an interactive map, instead of typing WKT by hand, available in both places where the value can currently be edited:

  • the submission form, for the field(s) configured to hold geospatial points;
  • the item metadata editor, for the same field(s).

Ideally this would also help when correcting an existing value: opening the picker for a field that already has a point should show that point on the map (centred on it, with a marker), not just an empty map, so the editor can confirm at a glance whether it's in the right place.

The existing plain-text entry of the WKT value should remain available alongside it (e.g. for power users, or for pasting an already-known coordinate), rather than being replaced outright.

Describe alternatives you've considered

  • Leaving it as a documentation/training issue (just tell submitters to be careful with the WKT format) — doesn't solve the lack of visual verification, and the failure mode (item shows up in the wrong place, possibly the wrong country) is easy to miss without a map to look at.
  • Asking submitters to look up coordinates in an external tool (e.g. Google Maps) and copy them in manually — extra steps, still requires manually constructing/copying the WKT string correctly.

Additional context

Related to the geospatial map viewer functionality (item page / search "map view" / "browse by map").

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    Status
    🏗 In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions