context object with tile as third argument argument to fetch function#21
Open
sttawm wants to merge 1 commit into
Open
context object with tile as third argument argument to fetch function#21sttawm wants to merge 1 commit into
sttawm wants to merge 1 commit into
Conversation
9f7fe3d to
56fe877
Compare
Contributor
Author
|
I came across another use for this while labeling, where-in I'd like to class the city labels differently according to their zoom. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It can be useful for transcoders (AKA the "fetch" function) to be aware of the tile's coordinates. Though they are generally available via the url, this is not standardized and is annoying to parse.
The current use-case is binning.
Binning involves quantizing a tile, which (in general) requires knowledge of its bounds. Servers may occassionally provide responses with enough information (i.e. via
topojson.q), but in general this cannot be assumed.The
contextobject is nested in order to avoid name-clashes if / when passed to the Queue.js functions.