boundingbox
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -11,6 +11,6 @@ 'use strict' | ||
if (bounds === null || typeof bounds === 'undefined') { | ||
this.minlat = -180 | ||
this.minlon = -90 | ||
this.maxlat = +180 | ||
this.maxlon = +90 | ||
this.minlat = -90 | ||
this.minlon = -180 | ||
this.maxlat = +90 | ||
this.maxlon = +180 | ||
return | ||
@@ -17,0 +17,0 @@ } |
{ | ||
"name": "boundingbox", | ||
"description": "Implements bounding boxes with usual functions like intersects. Can convert from/to Leaflet bounds and GeoJSON.", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "BoundingBox.js", | ||
@@ -6,0 +6,0 @@ "directories": { |
@@ -40,3 +40,3 @@ # bounding-box | ||
var bbox = new BoundingBox({ minlat: 48.123, minlon: 16.23, maxlat: 49.012, maxlon: 16.367 }) | ||
var bbox2 = new BoundingBox({ lat: 48.5, lon: 16.5 }) | ||
var bbox2 = new BoundingBox({ lat: 48.5, lon: 16.267 }) | ||
console.log(bbox.intersects(bbox2)) // true | ||
@@ -43,0 +43,0 @@ ``` |
@@ -124,3 +124,3 @@ var assert = require('assert') | ||
assert.deepEqual( | ||
{"minlat":-180,"minlon":-90,"maxlat":180,"maxlon":90}, | ||
{"minlat":-90,"minlon":-180,"maxlat":90,"maxlon":180}, | ||
b | ||
@@ -127,0 +127,0 @@ ) |
51100