-
Notifications
You must be signed in to change notification settings - Fork 23
Enable 3rd party vector tile sources #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Ooops, tests seem to need some care after that change. |
|
@BergWerkGIS I'm merging #39 and rolling a new release based on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more to follow the HTTP specification than to meet the needs of third-party sources.
|
I'm working on getting out a new Mapbox Studio Classic release (motivated by having a stable base before moving Mapbox Studio Classic to producing v2 vector tiles per mapbox/vector-tile-spec#39).
My plan:
/cc @yhahn @BergWerkGIS |
|
@yhahn - as part of the v2 spec push team @mapbox/mapnik is hitting a lot of tilelive modules. If you think it might be a good idea to get tilelive modules updated to support non-compressed tiles, let me know and we can push on that. |
This never happened since it was not a priority. So I think this PR can be closed. |
@yhahn do you have time to review/test/merge, or tell me, whom else I should ask?
@springmeyer FYI
It's a hack, any suggestions for a clean solution are welcome
Current State
Accept-Encoding:gzip, because mapbox servers always send gzipped vector tilestile* modulesexpect gzipped vector tilesAccept-EncodingAccept-Encoding:gzip, servers respond with uncompressed contenttile*modulesAccept-Encoding:gzipto requestjs header options, makes the 3rd party vector tiles work, but breaks other stuff, as uncompressed content is expected.gzip:trueto requestjs options makes the other stuff work, because requestjs decompresses on the fly, but breaks the 3rd party vector tiles as they are also decompressed before being passed to the tile* modules.Obvious problem
If 3rd party tile services use a different extension than
.pbfor.mvtHacky Solution
Accept-Encoding:gzipheader to get gzipped responsesgzip:[true|false]). currently I'm checking, if.pbfor.mvtin the url => do nothing:gzip:falsegzip:trueManual tests
I tried
Didn't ru into any problems