0

I use mapbox/tippecanoe to create .pbf tiles. But when I try to display them using L.vectorGrid.protobuf nothing is rendered, although I see that proper .pbf files are requested and downloaded by browser.

I suspect that missing options parameter is the root of the problem but I am not sure:

var layer = L.vectorGrid.protobuf('http://my_static_files_server/{z}/{x}/{y}.pbf')
map.addLayer(layer)

Is it necessary to set options if I want just display vector layer represented by single polygon?

How can I set common options?

0

I found the similar problem reported at https://github.com/mapbox/tippecanoe/issues/582 By default tippecanoe creates gzip-compressed tiles, but L.vectorGrid.protobuf relies on uncompressed. Running tippecanoe with --no-tile-compression option solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.