mapbox / mapbox/mapbox-gl-js

Add customizable arrow at the end of polyline without external icon

Open
#13,287 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 need to rappresent the direction of a pipeline to express the flow. I'd like to show an arrow at the estremities of the polyline (without adding a png or similar). Arrows might be customizable in color and size to make it consistent with the line. I can't find the method to do this.

![immagine](https://github.com/user-attachments/assets/cd07ebd0-f8ad-489b-9007-139707f0be1f)

Thank you so much.

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 polyline rendering and styling entry points in the mapbox-gl-js codebase, then review how line colors and widths are currently customized. Define the supported arrow placement, color, and size behavior, and add coverage for the requested customizable arrows at polyline ends.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.