global-mercator
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -1,2 +0,1 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
@@ -3,0 +2,0 @@ "editor.tabSize": 2, |
[![Build Status](https://travis-ci.org/DenisCarriere/global-mercator.svg?branch=master)](https://travis-ci.org/DenisCarriere/global-mercator) | ||
[![Coverage Status](https://coveralls.io/repos/github/DenisCarriere/global-mercator/badge.svg?branch=master)](https://coveralls.io/github/DenisCarriere/global-mercator?branch=master) | ||
[![npm version](https://badge.fury.io/js/global-mercator.svg)](https://badge.fury.io/js/global-mercator) | ||
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/DenisCarriere/global-mercator/master/LICENSE) | ||
# Global Mercator (ES6 Module) | ||
# Global Mercator | ||
@@ -11,3 +12,3 @@ A set of tools geospatial tools to help with TMS, Google (XYZ) Tiles. | ||
Works well using [`tilebelt`](https://github.com/mapbox/tilebelt). | ||
Another great simplistic tile library is [`tilebelt`](https://github.com/mapbox/tilebelt). | ||
@@ -27,4 +28,4 @@ ## Install | ||
console.log(mercator.tileToBBox(tile)) | ||
console.log(mercator.tileToGoogle(tile)) | ||
mercator.tileToBBox(tile) | ||
// [ -165.937, -82.853, -164.531, -82.676 ] | ||
``` | ||
@@ -59,13 +60,1 @@ | ||
| gridCount | Counts the total amount of tiles from a given BBox | ||
## Tests | ||
```bash | ||
$ npm test | ||
``` | ||
## Documentation | ||
```bash | ||
$ npm run docs | ||
``` |
@@ -545,2 +545,6 @@ "use strict"; | ||
} | ||
const maxCount = Math.pow(2, zoom); | ||
if (tx >= maxCount || ty >= maxCount) { | ||
throw new Error('Illegal parameters for tile'); | ||
} | ||
return tile; | ||
@@ -547,0 +551,0 @@ } |
@@ -569,2 +569,6 @@ export const tileSize = 256 | ||
} | ||
const maxCount = Math.pow(2, zoom) | ||
if (tx >= maxCount || ty >= maxCount) { | ||
throw new Error('Illegal parameters for tile') | ||
} | ||
return tile | ||
@@ -571,0 +575,0 @@ } |
{ | ||
"name": "global-mercator", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "Tools to help with TMS, Quadkey & Google (XYZ) Tiles", | ||
@@ -9,3 +9,3 @@ "main": "index.js", | ||
"test": "tsc && nyc ava && npm run lint", | ||
"docs": "tsc && cat HEADER.md > README.md && documentation build index.js -c documentation.yml -f md >> README.md", | ||
"docs": "tsc && cat HEADER.md > README.md && documentation build index.js -c documentation.yml -f md --shallow >> README.md && cat CHANGELOG.md >> README.md", | ||
"lint": "tsc && tslint index.ts test.ts && documentation lint index.js" | ||
@@ -31,3 +31,2 @@ }, | ||
"nyc": "^8.3.0", | ||
"ts-node": "^1.3.0", | ||
"tslint": "^3.15.1", | ||
@@ -34,0 +33,0 @@ "typescript": "^2.0.3" |
[![Build Status](https://travis-ci.org/DenisCarriere/global-mercator.svg?branch=master)](https://travis-ci.org/DenisCarriere/global-mercator) | ||
[![Coverage Status](https://coveralls.io/repos/github/DenisCarriere/global-mercator/badge.svg?branch=master)](https://coveralls.io/github/DenisCarriere/global-mercator?branch=master) | ||
[![npm version](https://badge.fury.io/js/global-mercator.svg)](https://badge.fury.io/js/global-mercator) | ||
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/DenisCarriere/global-mercator/master/LICENSE) | ||
# Global Mercator (ES6 Module) | ||
# Global Mercator | ||
@@ -11,3 +12,3 @@ A set of tools geospatial tools to help with TMS, Google (XYZ) Tiles. | ||
Works well using [`tilebelt`](https://github.com/mapbox/tilebelt). | ||
Another great simplistic tile library is [`tilebelt`](https://github.com/mapbox/tilebelt). | ||
@@ -27,4 +28,4 @@ ## Install | ||
console.log(mercator.tileToBBox(tile)) | ||
console.log(mercator.tileToGoogle(tile)) | ||
mercator.tileToBBox(tile) | ||
// [ -165.937, -82.853, -164.531, -82.676 ] | ||
``` | ||
@@ -59,14 +60,2 @@ | ||
| gridCount | Counts the total amount of tiles from a given BBox | ||
## Tests | ||
```bash | ||
$ npm test | ||
``` | ||
## Documentation | ||
```bash | ||
$ npm run docs | ||
``` | ||
<!-- Generated by documentation.js. Update this documentation by updating the source code. --> | ||
@@ -672,1 +661,20 @@ | ||
Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>** range | ||
# Changelog | ||
## 1.2.0 - 2016-10-13 | ||
Added new features: | ||
- `grid` - Creates an Iterator of Tiles from a given BBox | ||
- `gridBulk` - Creates a bulk Iterator of Tiles from a given BBox | ||
- `gridLevels` - Creates a grid level pattern of arrays | ||
- `gridCount` - Counts the total amount of tiles from a given BBox | ||
## 1.1.0 - 2016-10-03 | ||
- Remove Default export | ||
- Modules compiles only to ES6 | ||
## 1.0.0 - 2016-10-01 | ||
First Stable release was created |
@@ -12,5 +12,6 @@ { | ||
"no-console": [false], | ||
"interface-name": [false] | ||
"interface-name": [false], | ||
"no-var-requires": false | ||
}, | ||
"rulesDirectory": [ ] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
142983
6
1706
676