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

bbox-dateline

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bbox-dateline

Modifies a BBox to fit within the bounds of the International Date Line

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
25
decreased by-24.24%
Maintainers
1
Weekly downloads
 
Created
Source

BBox Date Line

Build Status Coverage Status npm version MIT licensed

Standard - JavaScript Style Guide

Modifies a BBox to fit within the bounds of the International Date Line.

Install

npm

$ npm install --save slippy-grid

web browser ES5

<script src="https://unpkg.com/bbox-dateline/docs/bbox-dateline.min.js"></script>

Usage

var dateline = require('bbox-dateline')
dateline.bbox([190, 100, -200, -120])
//= [-170, -80, 160, 60]

API

Table of Contents

bbox

Modifies a BBox to fit within the bounds of the International Date Line.

Parameters

  • bbox (BBox | FeatureCollection | Feature<any>) BBox [west, south, east, north] or GeoJSON Feature

Examples

dateline.bbox([190, 100, -200, -120])
//= [-170, -80, 160, 60]

Returns BBox valid BBox extent

center

Modifies a Center to fit within the bounds of the International Date Line.

Parameters

  • center ([number, number] | BBox | FeatureCollection | Feature<any>) Center [lng, lat], BBox [west, south, east, south] or GeoJSON Feature

Examples

dateline.center([190, 100])
//= [-170, -80]

Returns [number, number] valid center coordinate

latitude

Modifies a Latitude to fit within +/-90 degrees.

Parameters

Examples

dateline.latitude(100)
//= -80

Returns number modified latitude

longitude

Modifies a Longitude to fit within +/-180 degrees.

Parameters

  • lng number longitude to modify

Examples

dateline.longitude(190)
//= -170

Returns number modified longitude

Keywords

FAQs

Package last updated on 14 Mar 2017

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