Support the reference-geometry parameter on geo questions

Open
#924 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
65/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Domain
frontend, web-dev

Research direction

The issue is about adding support for the reference-geometry parameter to geo questions (geoshape, geotrace, geopoint) in Web Forms. Start by examining the form parsing and map rendering code to understand how parameters are read and how geometry is currently drawn. The referenced features from a dataset (CSV or entity list) or a repeat should be displayed on the map as non-interactive context. Check the linked ODK documentation for the parameter's specification. Implement the reading of the parameter and the drawing of the features, then test with forms that use reference-geometry.

Written by the indexing model from the issue text.

Description

Description

Forms can show existing geometry on the map to give context when capturing new points, lines or shapes. This is set with reference-geometry= in the parameters column of a geoshape, geotrace or geopoint question. The source can be a dataset (CSV or entity list) or a repeat.

Web Forms ignores this parameter today. We should read it and draw the referenced features on the map. They should not be interactive.

Docs: https://docs.getodk.org/form-datasets/#reference-geometry


Checklist
  • Does it need UI/UX design?
    • Yes. Describe the UI/UX requirements or attach a Figma link in the "Design" section.
    • No
  • Does it need API design?
    • Yes. Specify the endpoints, methods, or data structures needed.
    • No
  • Does it need design around state flow?
    • Yes. Outline the state flow requirements.
    • No
  • Does it need a test plan?
    • Yes. Add the test plan as a comment in this task or attach the document.
    • No

User Stories

As a data collector,
I want to see existing points, lines and shapes on the map,
so that I have context when I capture new geometry.


Design
  • Figma: [Insert URL]
  • Design Docs: [Insert URL]

Dependencies

Additional Notes

Related Issues
Dominant language
TypeScript
Stars
38
Forks
24
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from getodk/web-forms

All issues in getodk/web-forms

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.