@bencevans/xyz-intersect
Find Slippy Map / XYZ Tiles that cover a GeoJSON Feature.
Example
> const findTiles = require('@bencevans/xyz-intersect')
> const zoom = 10
> findTiles.fromPoint(geojsonPointFeature, zoom)
[ 510, 340 ]
> findTiles.fromPolygon(geojsonPolygonFeature, zoom)
[ [ 32680, 21784 ], [ 32681, 21784 ], [ 32682, 21784 ] ]
> findTiles.toGeoJSON(
findTiles.fromPolygon(geojsonPolygonFeature, zoom)
)
# Outputs GeoJSON representation of each of the tiles.
Licence
GPL-3.0