tilebelt

simple tile utilities

This module is now under the @mapbox namespace: install @mapbox/tilebelt instead
Last updated 5 years ago by morganherlocker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tilebelt 
SYNC missed versions from official npm registry.

tilebelt

Build Status Coverage Status

simple tile utilities

install

npm install tilebelt

usage

var tilebelt = require('tilebelt');

var tile = [10,15,8] // x,y,z

console.log(tilebelt.tileToGeoJSON(tile));
console.log(tilebelt.getParent(tile));

features

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

tests

npm test

benchmarks

npm run bench

Current Tags

  • 1.0.1                                ...           latest (5 years ago)

15 Versions

  • 1.0.1 [deprecated]           ...           5 years ago
  • 1.0.0 [deprecated]           ...           5 years ago
  • 0.7.1 [deprecated]           ...           6 years ago
  • 0.7.0 [deprecated]           ...           6 years ago
  • 0.6.1 [deprecated]           ...           6 years ago
  • 0.6.0 [deprecated]           ...           6 years ago
  • 0.5.3 [deprecated]           ...           6 years ago
  • 0.5.2 [deprecated]           ...           6 years ago
  • 0.5.1 [deprecated]           ...           6 years ago
  • 0.5.0 [deprecated]           ...           6 years ago
  • 0.4.0 [deprecated]           ...           6 years ago
  • 0.3.0 [deprecated]           ...           6 years ago
  • 0.2.0 [deprecated]           ...           6 years ago
  • 0.1.1 [deprecated]           ...           6 years ago
  • 0.1.0 [deprecated]           ...           6 years ago

Copyright 2014 - 2016 © taobao.org |