mapbox / mapbox/mapbox-gl-draw

How to set the zindex of a layer on the map?

Open
#1,332 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged feature
Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
8d 9h
Merged PRs (30d)
5

Description

map.moveLayer can only move, and cannot set the zindex , likes having a layer with zindex of 10 and draw layers alway under this layer.

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 reviewing how map.moveLayer is used to order draw layers and how Mapbox GL layer ordering is represented. Define a supported way to keep draw layers below a specified layer or at a requested z-index, then verify the ordering behavior with the project's existing tests or examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
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.