mapbox / mapbox/mapbox-gl-js

Multiple layer type shapes like the circle

Open
#10,931 5 comments 1 reaction 0 assignees View on GitHub
feature :green_apple: needs discussion :speech_balloon:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

## Motivation

Currently we are testing the map to render 100k markers as circle shapes (with outgoing updates, drags etc). Works really well for the performance. We tried to add symbols but that reduces the performance by half, so symbols are off the charts.

Since circles are the best way to render the data and its the fastest way to do it, could we have multiple shapes like this or custom shapes added as a layer type?

Our goal is to have 100k markers but with various shapes displaying in them. We cant achieve good performance if we added symbols as a separate layer to draw the shapes inside the circles, but if we could render different layer on top as a separate markers of the type like the circle, it would be amazing.

## Design Alternatives

Add multiple layer types like the circle (triangle, square, star etc) which has the same functionality as the existing circle or a property to pass custom canvas ctx shapes.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the existing circle rendering path with symbol rendering, focusing on how each handles 100k markers, outgoing updates, and drags. Define whether the requested work should support built-in shapes, custom canvas context shapes, or both, and validate that the chosen approach preserves the required performance.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics, 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.