mapbox / tile-cover

Generate the minimum number of tiles to cover a geojson geometry
MIT License
189 stars 40 forks source link

Calculate indexes for MB vector tiles #79

Closed Shane98c closed 7 years ago

Shane98c commented 7 years ago

Thanks for the great library, it has made our app Flyover Country (http://fc.umn.edu/) possible through allowing us to calculate the tiles needed to be saved offline for a given flight path (polygon).

Ex: image

We're upgrading the app to use Mapbox GL JS and are looking at creating a similar solution for requesting vector tiles for offline use. From our early reconnaissance, it looks like mapbox vector tiles have dimensions of 512x512. Is there a way that we can continue to use something similar to our current tilecover solution to calculate which tiles to store offline? Perhaps modifying the library to support 512x512 tiles? I haven't yet wrapped my head around how tilebelt is calculating tile indexes and how tile dimensions factor into that.

Thanks for any thoughts!

Shane98c commented 7 years ago

... this is just a single zoom level change.