Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tiles-in-bbox

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiles-in-bbox

Get all tiles of a web map in x,y,z coordinates for a specified bounding box and zoom.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

tiles-in-bbox

Get all tiles of a web map in x,y,z coordinates for a specified bounding box and zoom.

Installation

npm install tiles-in-bbox

Usage

var t = require('tiles-in-bbox')

//Follows the GeoJson/OpenStreetMaps convention of a clockwise box starting at the bottom.
var bbox = {
    bottom : 42.356,
    left : -71.1279,
    top : 42.3876,
    right : -71.1002
}

var zoom = 15
var tiles = t.tilesInBbox(bbox, zoom)
console.log(tiles)

Results

[ { x: 9909, y: 12116, z: 15 },
  { x: 9909, y: 12117, z: 15 },
  { x: 9909, y: 12118, z: 15 },
  { x: 9909, y: 12119, z: 15 },
  { x: 9909, y: 12120, z: 15 },
  { x: 9910, y: 12116, z: 15 },
  { x: 9910, y: 12117, z: 15 },
  { x: 9910, y: 12118, z: 15 },
  { x: 9910, y: 12119, z: 15 },
  { x: 9910, y: 12120, z: 15 },
  { x: 9911, y: 12116, z: 15 },
  { x: 9911, y: 12117, z: 15 },
  { x: 9911, y: 12118, z: 15 },
  { x: 9911, y: 12119, z: 15 },
  { x: 9911, y: 12120, z: 15 },
  { x: 9912, y: 12116, z: 15 },
  { x: 9912, y: 12117, z: 15 },
  { x: 9912, y: 12118, z: 15 },
  { x: 9912, y: 12119, z: 15 },
  { x: 9912, y: 12120, z: 15 } ]

Keywords

FAQs

Package last updated on 22 Aug 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc