mapbox / mapbox/mapbox-gl-js

Add a synchronous version of GeoJSONSource#setData

Open
#2,275 3 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Having a synchronous (main-thread) `setData` API dovetails nicely with the synchronous `queryRenderedFeatures` API. I see this API being useful in cases where
- very small GeoJSON sources need to be updated very quickly for animations
- users want to know exactly when a `setData` operation completes

previously implemented in #1979 as `skipWorker`

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 with GeoJSONSource#setData and review the earlier implementation referenced as #1979. Clarify how a synchronous main-thread operation should complete and interact with the existing API; the work is done when the proposed synchronous API has settled semantics and supports the small, immediate updates described in the issue.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.