mapbox / mapbox/mapbox-gl-js

[Feature Request] Provide ability to load vector tiles from a local function

Open
#10,362 3 comments 0 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

## Motivation

I've seen this mentioned a few times, but have not seen an actual request or feature for it. So here it is!

* Client-side generated tiles
* Client-side generated grids
* Anything where the vector tile generation can be offloaded to the client on a tile-by-tile basis
* Alternative caching mechanism or logic that needs to be maintained outside of Mapbox
* Providing an alternative to the delay/lag of loading large datasets that may be much larger than the current viewport, instead it could be generated & rendered tile-by-tile client-side
* Similarly, a changing dataset could be more performant if more use-case specific tile-generating & caching strategies could be employed, and the vector tiles results just fed to mapbox

**Similar Issues:**

* https://github.com/mapbox/mapbox-gl-js/issues/9897

## Design Alternatives

Unknown

## Design

Prove the ability to pass a function as a vector tile source for a layer. Instead of just a URL.

For instance a function `getTile(x,y,z)` could return the appropriate map tiles for mapbox to use for some layer.

### Mock-Up

Unknown

### Concepts

Unknown

### Implementation

Unknown

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 the existing vector tile source API and the related issue #9897. Determine how a source function such as getTile(x,y,z) would provide tiles to a layer, including the expected return behavior. Done means a documented, tested API can accept a local function and render its generated vector tiles.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.