Add line-start and line-end to the symbol-placement options
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
## Motivation
There are currently three [symbol placement](https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#layout-symbol-symbol-placement) options: `point`, `line`, and `line-center`.
It would be helpful to also have `line-start` and `line-end` as symbol-placement options. This could allow a user to style either end of a linestring with a symbol. For example, a specific symbol to mark the entrance of a tunnel and a different symbol to mark the departure from a tunnel.
## Design Alternatives
The first point of the geometry is the start point, so a user can use point placement with a symbol layer that points to a source with line geometry. However, this only allows a user to style with the line-start, not the line-end.
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 with the symbol-placement specification linked in the issue and compare the existing point, line, and line-center behavior. Trace how symbol placement is implemented and tested, then confirm that line-start and line-end can style the two endpoints of a line geometry with distinct symbols.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100