mapbox / mapbox/mapbox-maps-ios

Implement source.filter from the MapBox styleJSON spec

Open
#2,399 2 comments 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

Add filtering at the source level without having to set the `data` attribute. [This already exists as `source.filter` in the MapBox style spec.](https://docs.mapbox.com/style-spec/reference/sources/#geojson-filter)

## Why

I would love to be able to filter sources without having to set the data attribute, and be able to filter **before clustering** (which layer-level filtering doesn't allow). `mapbox-gl` already implements this and it's super convenient.

Thank you :)

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 reading the Mapbox style specification for GeoJSON source.filter and compare it with the source data attribute and existing mapbox-gl behavior. Trace how source filtering interacts with clustering in the iOS SDK. Done means source-level filtering is supported before clustering, with tests covering the new behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.