openlayers / openlayers/openlayers
Expose trace targets
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 12.6k
- Forks
- 3.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 21
Description
Is your feature request related to a problem? Please describe.
I would like to be able to know which features were involved in a drawing that has traced enabled.
So for example the trace source has multiple features and I draw a new polygon that "uses" (traces) parts of some of these features. Then I would like to know which ones were involved.
Describe the solution you'd like
There's multiple ways this could be done and I'm not quite sure what would be the best approach.
Currently all the trace state is private and the features that were selected as targets are not remembered. We could keep a history between a draw start and draw end and expose this through a public getter. Or just have it as part of the drawend event. Or just emit an event when the trace state changes and leave it up to the consumer of that event to track the history.
If you would agree on the usefulness of this feature and help me decide on the approach I could whip up a PR for this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the drawing interaction's private trace state and the draw start, draw end, and drawend event entry points. Compare the proposed history, public getter, drawend data, and trace-state event approaches. Done means consumers can reliably identify which trace-source features contributed to a traced drawing through a documented public API.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100