1.2.1 • Published 7 years ago

bbox-dateline v1.2.1

Weekly downloads
16
License
MIT
Repository
-
Last release
7 years ago

BBox Date Line

Build Status npm version MIT licensed Coverage Status

Standard - JavaScript Style Guide

Modifies a BBox to fit within 180° longitude & 90° latitude.

Install

$ yarn add bbox-dateline

Usage

const 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

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

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

1.2.1

7 years ago

1.2.0

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago