mapbox / mapbox/mapbox-gl-js

Labeling offset lines

Open
#4,112 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

From @peterqliu on March 31, 2016 2:30

There's no good way to offset labels to track their corresponding lines, at the moment. Two obstacles:

  • Units (minor): line-offset is in px, while text-offset is in ems
  • Frame of reference (major): line-offset is relative to the line's direction, while text-offset is relative to the map or viewport. Depending on direction, the two can get offset in opposite directions:
screen shot 2016-03-30 at 7 28 11 pm

Copied from original issue: mapbox/mapbox-gl-style-spec#437

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 with the issue description, offset definitions, and attached screenshot, then review the copied mapbox-gl-style-spec#437 discussion for context. Determine how line and text offsets should share units and a frame of reference; done means labels can consistently track their corresponding lines in both directions.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.