Long-press + flyout: line, rectangle, circle geometry tools#11
Draft
tordans wants to merge 2 commits into
Draft
Conversation
Long-press the map toolbar + button (≥0.5s) to open an action sheet with Line, Rectangle, and Circle tools. Short press behavior is unchanged. Each tool enters a dedicated map edit mode with rubber-band preview tied to the crosshair. Rectangle and circle math live in GeometryDrawMath with unit tests. Line mode reuses extendSelectedWay via successive crosshair taps. Co-authored-by: Tobias <t@tobiasjordans.de>
When a matched preset uses a wildcard tag (e.g. playground=*) and the object has a concrete value, use the field strings option title (Spielbagger for playground=excavator in German) for pushpin tooltips, friendlyDescription, and the POI Type row. Falls back to preset name when no strings entry exists. Co-authored-by: Tobias <t@tobiasjordans.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
As a mapper, I want a long-press on the + toolbar control to offer Line, Rectangle, and Circle so I can start structured ways/areas without only dropping isolated nodes.
As a mapper, when a point uses a generic preset with a wildcard tag (e.g.
playground=*+playground=excavator), I want the localized type label from the preset field strings (e.g. „Spielbagger“) in the map pushpin tooltip—not only the generic preset name (e.g. „Spielplatzgerät“).Implementation notes (by Cursor)
Geometry flyout
extendSelectedWay; rectangle/circle useGeometryDrawMath+ dashed preview.Kind / type labels
PresetFeature.localizedKindLabel(for:)resolves wildcard preset tags via fieldstringsoptions (first matching field in preset order).friendlyDescription()(pushpin, voice, pickers) and POI Type row (PresetDisplayForFeature).Testing notes (by @tordans)
Geometry
Kind labels
5.
playground=excavator(DE): pushpin shows „Spielbagger“, not „Spielplatzgerät“.6. Tag without strings option — generic preset name unchanged.
7. Named POI —
namestill wins (existing rule).