Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@mapbox/tilebelt
Advanced tools
simple tile utilities
npm install tilebelt
var tilebelt = require('tilebelt');
var tile = [10,15,8] // x,y,z
console.log(tilebelt.tileToGeoJSON(tile));
console.log(tilebelt.getParent(tile));
function | description |
---|---|
tileToGeoJSON(tile) | get a geojson representation of a tile |
tileToBBOX(tile) | get the bbox of a tile |
bboxToTile(bbox) | get the smallest tile to cover a bbox |
getChildren(tile) | get the 4 tiles one zoom level higher |
getParent(tile) | get the tile one zoom level lower |
getSiblings(tile) | get the 3 sibling tiles for a tile |
hasSiblings(tiles, tile) | check to see if an array of tiles contains a tiles siblings |
hasTile(tiles, tile) | check to see if an array of tiles contains a particular tile |
tilesEqual(tile1, tile2) | check to see if two tiles are the same |
tileToQuadkey(tile) | get the quadkey for a tile |
quadkeyToTile(quadkey) | get the tile for a quadkey |
pointToTile(lon, lat, zoom) | get the tile for a point at a specified zoom level |
pointToTileFraction(lon, lat, zoom) | get the precise fractional tile location for a point at a zoom level |
npm test
npm run bench
FAQs
simple tile utilities
The npm package @mapbox/tilebelt receives a total of 21,516 weekly downloads. As such, @mapbox/tilebelt popularity was classified as popular.
We found that @mapbox/tilebelt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.