mapbox / mapbox/mapbox-gl-js

Add SymbolPlacement options of 'justEnd' and 'justBegin' to work similarly to the CIMSymbol options for ExtremityPlacement

Open
#13,140 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged feature :green_apple:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

## Motivation

I want to be able to position a symbol at the end of a line. Like an arrow, or x-marks-the-spot, so users can easily understand where a ployline beings and ends.

## Design Alternatives

Right now, as the data I am using is not under my team's control, we need to make a 2nd call to fetch both vector and GeoJSON data and then create a second layer that places the end points using the GeoJSON. I know you can add things along the line, but that can create unnecessary clutter.

## Design

I think it should work like CIMSymbol's ExtremityPlacement, with SymbolPlacement having a justEnd and justBegin option. The symbol would default rotation to align with the line at the point of placement.

### Mock-Up

'symbol-placement': 'justEnd '

### Concepts

'symbol-placement' would get 2 new options

Contributor guide

Open the 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.

Research direction

Start by locating the SymbolPlacement implementation and the CIMSymbol ExtremityPlacement behavior referenced in the issue. Determine how the proposed justEnd and justBegin options should affect placement and line-aligned rotation, then verify the symbol-placement behavior with the project's existing rendering tests. Done means both options are supported without requiring a second data call or layer.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.