Skip to content

context object with tile as third argument argument to fetch function#21

Open
sttawm wants to merge 1 commit into
masterfrom
tile-aware-fetch-2
Open

context object with tile as third argument argument to fetch function#21
sttawm wants to merge 1 commit into
masterfrom
tile-aware-fetch-2

Conversation

@sttawm

@sttawm sttawm commented Jun 9, 2015

Copy link
Copy Markdown
Contributor

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 context object is nested in order to avoid name-clashes if / when passed to the Queue.js functions.

@sttawm

sttawm commented Jul 19, 2015

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants