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 1.4.0 to 1.4.1

23

index.js

@@ -20,3 +20,4 @@ "use strict";

* @example
* parse([10, 15, 8], 'osm')
* import * as slippyTile from 'slippy-tile'
* slippyTile.parse([10, 15, 8], slippyTile.osm.standard.url)
* //='https://c.tile.openstreetmap.org/8/10/15.png'

@@ -45,16 +46,2 @@ */

exports.parse = parse;
// /**
// * Downloads Tile
// *
// * @param {Tile} tile Tile [x, y, zoom]
// * @param {string} scheme Tile scheme URL or pre-loaded source unique key
// * @returns {Promise<Buffer>} tile buffer
// * @example
// * const url = slippyTile.url([10, 15, 8], 'osm')
// * //='https://c.tile.openstreetmap.org/8/10/15.png'
// */
// export async function download(tile: Tile, scheme: string): Promise<Buffer> {
// return rp.get(url(tile, scheme), { encoding : 'binary' })
// .then(data => new Buffer(data, 'binary'))
// }
/**

@@ -66,3 +53,4 @@ * Replaces {switch:a,b,c} with a random sample.

* @example
* parseSwitch('http://tile-{switch:a,b,c}.openstreetmap.fr/hot/{zoom}/{x}/{y}.png')
* import * as slippyTile from 'slippy-tile'
* slippyTile.parseSwitch('http://tile-{switch:a,b,c}.openstreetmap.fr/hot/{zoom}/{x}/{y}.png')
* //='http://tile-b.openstreetmap.fr/hot/{zoom}/{x}/{y}.png'

@@ -92,3 +80,4 @@ */

* @example
* sample(['a', 'b', 'c'])
* import * as slippyTile from 'slippy-tile'
* slippyTile.sample(['a', 'b', 'c'])
* //='b'

@@ -95,0 +84,0 @@ */

@@ -40,3 +40,4 @@ import * as mercator from 'global-mercator'

* @example
* parse([10, 15, 8], 'osm')
* import * as slippyTile from 'slippy-tile'
* slippyTile.parse([10, 15, 8], slippyTile.osm.standard.url)
* //='https://c.tile.openstreetmap.org/8/10/15.png'

@@ -59,17 +60,2 @@ */

// /**
// * Downloads Tile
// *
// * @param {Tile} tile Tile [x, y, zoom]
// * @param {string} scheme Tile scheme URL or pre-loaded source unique key
// * @returns {Promise<Buffer>} tile buffer
// * @example
// * const url = slippyTile.url([10, 15, 8], 'osm')
// * //='https://c.tile.openstreetmap.org/8/10/15.png'
// */
// export async function download(tile: Tile, scheme: string): Promise<Buffer> {
// return rp.get(url(tile, scheme), { encoding : 'binary' })
// .then(data => new Buffer(data, 'binary'))
// }
/**

@@ -81,3 +67,4 @@ * Replaces {switch:a,b,c} with a random sample.

* @example
* parseSwitch('http://tile-{switch:a,b,c}.openstreetmap.fr/hot/{zoom}/{x}/{y}.png')
* import * as slippyTile from 'slippy-tile'
* slippyTile.parseSwitch('http://tile-{switch:a,b,c}.openstreetmap.fr/hot/{zoom}/{x}/{y}.png')
* //='http://tile-b.openstreetmap.fr/hot/{zoom}/{x}/{y}.png'

@@ -107,3 +94,4 @@ */

* @example
* sample(['a', 'b', 'c'])
* import * as slippyTile from 'slippy-tile'
* slippyTile.sample(['a', 'b', 'c'])
* //='b'

@@ -110,0 +98,0 @@ */

{
"name": "slippy-tile",
"version": "1.4.0",
"version": "1.4.1",
"description": "Helps convert Slippy Map url tile schemas",

@@ -5,0 +5,0 @@ "main": "index.js",

"use strict";
exports.strava = {
exports.both = {
name: 'Strava Cycling & Running',

@@ -4,0 +4,0 @@ categories: [

import { Provider } from '../index'
export const strava: Provider = {
export const both: Provider = {
name: 'Strava Cycling & Running',

@@ -5,0 +5,0 @@ categories: [

@@ -31,18 +31,18 @@ # [Slippy Tile](https://www.npmjs.com/package/slippy-tile)

|-------------------------------|---------------------|
| OSM (Default) | osm
| OSM Cycle Map | osm-cycle
| OSM Humanitarian | osm-hot
| OSM Transport | osm-transport
| OSM Wikimedia | osm-wikimedia
| OSM Lyrk | osm-lyrk
| Bing Imagery | bing-imagery
| Strava Cycling & Running | strava
| National Geographic World Map | natgeo
| ESRI Imagery | esri-imagery
| ESRI Ocean Basemap | esri-ocean
| ESRI USA Topo Maps | esri-usa-topo
| ESRI World Street Map | esri-street
| ESRI World Topographic Map | esri-topo
| DigitalGlobe Imagery | digitalgloble-imagery
| DigitalGlobe Hybrid | digitalgloble-hybrid
| OpenStreetMap Standard | osm.standard
| OpenStreetMap Cycle Map | osm.cycle
| OpenStreetMap Humanitarian | osm.hot
| OpenStreetMap Transport | osm.transport
| OpenStreetMap Wikimedia | osm.wikimedia
| OpenStreetMap Lyrk | osm.lyrk
| Bing Imagery | bing.imagery
| Strava Cycling & Running | strava.both
| National Geographic World Map | esri.natgeo
| ESRI Imagery | esri.imagery
| ESRI Ocean Basemap | esri.ocean
| ESRI USA Topo Maps | esri.usatopo
| ESRI World Street Map | esri.street
| ESRI World Topographic Map | esri.topo
| DigitalGlobe Imagery | digitalgloble.imagery
| DigitalGlobe Hybrid | digitalgloble.hybrid

@@ -56,3 +56,3 @@

const scheme = 'https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png'
const url = slippyTile([10, 15, 8], scheme)
const url = slippyTile.parse([10, 15, 8], scheme)
//= https://b.tile.openstreetmap.org/8/10/15.png

@@ -85,3 +85,4 @@ ```

```javascript
parse([10, 15, 8], 'osm')
import * as slippyTile from 'slippy-tile'
slippyTile.parse([10, 15, 8], slippyTile.osm.standard.url)
//='https://c.tile.openstreetmap.org/8/10/15.png'

@@ -103,3 +104,4 @@ ```

```javascript
parseSwitch('http://tile-{switch:a,b,c}.openstreetmap.fr/hot/{zoom}/{x}/{y}.png')
import * as slippyTile from 'slippy-tile'
slippyTile.parseSwitch('http://tile-{switch:a,b,c}.openstreetmap.fr/hot/{zoom}/{x}/{y}.png')
//='http://tile-b.openstreetmap.fr/hot/{zoom}/{x}/{y}.png'

@@ -121,3 +123,4 @@ ```

```javascript
sample(['a', 'b', 'c'])
import * as slippyTile from 'slippy-tile'
slippyTile.sample(['a', 'b', 'c'])
//='b'

@@ -124,0 +127,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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