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

slippy-tile

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

slippy-tile - npm Package Compare versions

Comparing version 2.3.1 to 3.0.0

slippy-tile.js

4

CHANGELOG.md
# Changelog
## 3.0.0 - 2017-09-29
- Support ES Modules
## 2.3.0 - 2017-09-11

@@ -5,0 +9,0 @@

25

index.d.ts

@@ -1,12 +0,15 @@

type Tile = [number, number, number];
export type Tile = [number, number, number]
interface Options {
layer?: string
format?: string
version?: string
[key: string]: string
}
declare function slippyTile(tile: Tile, url: string, options?: Options): string;
declare namespace slippyTile { }
export = slippyTile
/**
* Substitutes the given tile information [x, y, z] to the URL tile scheme.
*/
export default function slippyTile(
tile: Tile,
url: string,
options?: {
layer?: string
format?: string
version?: string
[key: string]: string
}
): string;

@@ -1,15 +0,4 @@

const mercator = require('global-mercator')
const googleToBBox = mercator.googleToBBox
const googleToTile = mercator.googleToTile
const googleToQuadkey = mercator.googleToQuadkey
const bboxToMeters = mercator.bboxToMeters
import { googleToBBox, googleToTile, googleToQuadkey, bboxToMeters } from 'global-mercator'
/**
* @typedef {Object} Options
* @property {string} layer
* @property {string} version
* @property {string} [format='image/png']
*/
/**
* Substitutes the given tile information [x, y, z] to the URL tile scheme.

@@ -20,3 +9,6 @@ *

* @param {string} url URL Tile scheme or provider unique key
* @param {Options} options Additional options
* @param {Object} [options] Additional options
* @param {string} [options.layer] Layer
* @param {string} [options.version] Version
* @param {string} [format='image/png'] Image Format
* @returns {string} parsed URL

@@ -27,3 +19,3 @@ * @example

*/
module.exports = function (tile, url, options) {
export default function slippyTile (tile, url, options) {
options = options || {}

@@ -30,0 +22,0 @@ const format = options.format || 'image/png'

{
"name": "slippy-tile",
"version": "2.3.1",
"version": "3.0.0",
"description": "Helps convert Slippy Map url tile schemas",
"main": "index.js",
"main": "slippy-tile.js",
"module": "index.js",
"jsnext:main": "index.js",
"types": "index.d.ts",

@@ -10,7 +12,8 @@ "files": [

"index.js",
"docs"
"slippy-tile.js"
],
"scripts": {
"lint": "standard index.js",
"test": "tap test.js --coverage"
"pretest": "rollup -f cjs -o slippy-tile.js index.js",
"test": "node test.js",
"posttest": "standard index.js"
},

@@ -30,9 +33,9 @@ "author": "Denis Carriere <@DenisCarriere>",

"devDependencies": {
"standard": "^8.6.0",
"tap": "^10.7.2",
"tape": "^4.6.3"
"rollup": "*",
"standard": "*",
"tape": "*"
},
"dependencies": {
"global-mercator": "^2.8.4"
"global-mercator": "*"
}
}
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