mapbox / mapbox/mapbox-maps-ios

Add support for viewport-y symbol-z-order when using symbol-sort-key

Open
#1,804 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged feature :green_apple:
Dominant language
Swift
Stars
601
Forks
196
PR merge metrics
No merged PRs in 30d

Description

## New Feature

I would like to be able to have annotations sorted based on their viewport-y while also having specific annotations shown over top using symbol-sort-key. I would expect annotations with the same symbol-sort-key to be sorted based on their viewport-y and drawn over symbols with a lower symbol-sort-key.

## Why

This would allow "selected"/"active" annotations to be displayed above "unselected"/"inactive" annotations while using viewport-y ordering.

This would allow for behaviour that aligns with how Google Maps orders their markers and would ease the transition to Mapbox.

It would currently be possible to do this using multiple layers, but would quickly get out of hand when using many symbol-sort-keys.

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 existing symbol-sort-key and viewport-y ordering paths in the iOS map-rendering code, then determine how equal sort keys are handled. Done means annotations are ordered by viewport-y within equal symbol-sort-key groups while higher keys remain above lower ones.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile
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.