mapbox / mapbox/mapbox-gl-js

Wrapping text on certain character

Open
#13,407 0 comments 0 reactions 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

Hi!

On some roads in OSM, we encounter a combined ref—for example, on [this way](https://www.openstreetmap.org/way/273827949) where the ref is "E34;E313". I would like to have an option to either wrap this text or select only one of the two names by splitting the string on the semicolon.

I looked up the source of the OSM style and found that they use a different approach: [see this section](https://github.com/geofabrik/openstreetmap-carto-vector-tiles/blob/80f8d70b17c2db4b24bfed94f128f3ef03e0ef16/roads.mss#L2504C7-L2504C26). Is there a similar option available in Mapbox styling?

KR
Michiel

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 referenced roads.mss section and the Mapbox styling options for road labels, using way 273827949 and its "E34;E313" ref as the example. Determine whether the requested wrapping or semicolon-based selection is supported; done means the supported behavior or limitation is clear and covered by the relevant styling documentation or implementation.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.