mapbox / mapbox/geojson-vt

Do we need to invoke getTile for each tileCoords to pre-generate tiles?

Open
#184 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
JavaScript
Stars
2.1k
Forks
279
PR merge metrics
No merged PRs in 30d

Description

This part in the readme doesn't seem obvious to me:
To pre-generate tiles, we need to set maxZoom and indexMaxZoom to the same value, indexMaxPoints to 0, "and then accessing the resulting tile coordinates from the tileCoords property of tileIndex."
The toleCoords property is just a list of tile coordinates, so does this mean to say we need to invoke getTile with each, or the tileCoords array has some "get" proxy behavior to complete the tile generation?
My assumption was that after I pre-generate tileIndex with the proper configuration, I can just continue to use .getTile and they'll be just there. Apropos, it's also not clear if setting "maxZoom" and "indexMaxZoom" to eg. 15, means that i won't be able to getTile above zoom level of 15? It seems like I can, so the "max" only refers to the limit for pre-generation.
Thanks for clarifying!

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 the README section describing pre-generation, then inspect the documented behavior of tileCoords, getTile, maxZoom, and indexMaxZoom. Clarify whether each coordinate must be passed to getTile, whether pre-generated tiles can be fetched normally afterward, and what the zoom limits mean.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.