Skip to content
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

tilemaker format status #10

Closed
Alphatiger opened this issue Jul 22, 2015 · 8 comments
Closed

tilemaker format status #10

Alphatiger opened this issue Jul 22, 2015 · 8 comments

Comments

@Alphatiger
Copy link

Is there any way we can host tilemaker output .pbf files,

I tried to host in apache and used leaflet vector plugin started getting unimplemented error.

If there is any other way or some help, kindly advise.

@systemed
Copy link
Owner

I've successfully got the Leaflet.MapboxVectorTile plugin reading tiles. Do you have a link to your tiles anywhere to test against?

@Alphatiger
Copy link
Author

http://ec2-52-3-48-243.compute-1.amazonaws.com/rhode/
I have hosted them for preusal, data is rhodeisland taken from http://download.geofabrik.de/north-america/us/rhode-island-latest.osm.pbf, after using tilemaker they are hosted in apache (strictly apache no other modules)

@systemed
Copy link
Owner

I think this is because the .pbfs are compressed (standard zlib deflate) and Leaflet.MapboxVectorTile doesn't know how to uncompress them.

If you set "compress" to false in the config file, it'll create uncompressed tiles which Leaflet.MapboxVectorTile can read. Alternatively, you can tell Apache to send a Content-Encoding: gzip header with each file, perhaps simply with an .htaccess directive like this:

Header set Content-Encoding: gzip

The spec for vector tile compression is a bit of a mess and Tilemaker tries to just do whatever you tell it!

@pnorman
Copy link
Contributor

pnorman commented Jul 26, 2015

Alternatively, you can tell Apache to send a Content-Encoding: gzip header with each file

Yes, this is the preferred method. To do it right, it also needs to reject requests that only accept identity. You SHOULD NOT serve the file as compressed if no Accept-Encoding header was sent, but I believe Mapbox studio is broken and fails to send accept-encoding, so you may need to ignore the HTTP RFC SHOULD.

@pnorman
Copy link
Contributor

pnorman commented Jul 26, 2015

nginx might be easier, with the ngx_http_gzip_static_module and the "always" value. Haven't tried it myself.

@Alphatiger
Copy link
Author

thank you guys, it is working now compress=false, i haven't tried the server solution, will try it soon

@systemed
Copy link
Owner

Great - glad it's working.

@Booligoosh
Copy link
Contributor

Just an fyi for anyone coming across this now, rather than "compress": false you want "compress": "none"

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

No branches or pull requests

4 participants