OrdnanceSurvey / OS-Vector-Tile-API-Stylesheets

Cartographic stylesheets for use with OS Vector Tile API
8 stars 9 forks source link

Unimplemented type: 3 with Mapbox #5

Open alexcroox opened 1 year ago

alexcroox commented 1 year ago

Mapbox fires an error to the console with every interaction:

image

After some initial searching it seems to be because Mapbox expects uncompressed tiles. Here is a SO talking about how to add a compression header to your response to prevent this:

https://stackoverflow.com/a/53807204/241465

tmnnrs commented 1 year ago

Hi @alexcroox. Unfortunately I can't currently replicate the issue...

Please could you provide a few more details around how you are accessing the OS Vector Tile API (e.g. browser, Mapbox GL version, etc) and/or send through an example code you might have.

I have run a few tests and the tile requests all appear to be returned with the expected Content-Encoding: gzip header. However I do know that this error can also fire when it sees something unexpected when decoding tiles from protocol buffers. Thus any extra information you can provide in order for us to investigate further would be greatly appreciated.

Not sure if you have seen the Data Hub copy-and-paste code examples - but here is a link which demonstrates use of the custom styles: https://labs.os.uk/public/os-data-hub-examples/os-vector-tile-api/vts-example-custom-style (might be of use?)