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

tilelive

Package Overview
Dependencies
Maintainers
0
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tilelive - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

16

API.md

@@ -88,6 +88,18 @@ ```javascript

```javascript
Tilesink.prototype.putInfo = function(info, callback) {
// Stores metadata into the tilesink. Info is a key-value hash with metadata.
// Implementations may decide to reject invalid keys.
function callback(err) {
// err is null when the metadata could be written successfully.
// err is an Error object otherwise.
}
};
```
```javascript
Tilesink.prototype.putTile = function(z, x, y, tile, callback) {
// Stores a tile into the data store. Parameters are in XYZ format.
// `tile` must be a Buffer containing the compressed image.
function callback(err) {

@@ -98,3 +110,3 @@ // err is null when the write request was received successfully.

}
// Implementations may decide to cache multiple tile requests and only

@@ -101,0 +113,0 @@ // commit them to the data store periodically to improve performance.

6

lib/tilelive.js

@@ -225,4 +225,4 @@ var tilelive = exports;

tilelive.copy = function(args, callback) {
if (typeof args.source.getTile !== 'function') throw new Error('source must be a tileargs.source');
if (typeof args.source.putTile !== 'function') throw new Error('sink must be a tileargs.sink');
if (typeof args.source.getTile !== 'function') throw new Error('source must implement the tilesource interface');
if (typeof args.sink.putTile !== 'function') throw new Error('sink must implement the tilesink interface');
if (!Array.isArray(args.bbox) || args.bbox.length !== 4) throw new Error('bbox must have four lat/long coordinates');

@@ -284,3 +284,3 @@ if (typeof args.minZoom !== 'number') throw new Error('minZoom must be a number');

var get = type === 'grid' ? 'getGrid' : 'getTile';
var put = type === 'grid' ? 'putGrid' : 'putGrid';
var put = type === 'grid' ? 'putGrid' : 'putTile';
args.source[get](z, x, y, function(err, data) {

@@ -287,0 +287,0 @@ if (err) {

{
"name" : "tilelive",
"version" : "4.0.0",
"version" : "4.0.1",
"main" : "./lib/tilelive.js",

@@ -42,3 +42,3 @@ "description" : "Frontend for various tile backends, mapnik and mbtiles",

"bin": {
"tilebatch": "./bin/tilebatch"
"tilelive": "./bin/tilelive"
},

@@ -45,0 +45,0 @@ "engines": {

@@ -99,2 +99,8 @@ var assert = require('assert');

if (err) throw err;
// Sort tilesets before deepEqual.
info.sort(function(a, b) {
return (a.basename || '0') < (b.basename || '0') ? -1 : 1;
});
assert.deepEqual(info, [{

@@ -126,3 +132,3 @@ name: 'MapQuest Open',

scheme: 'tms',
size: 561152
filesize: 561152
}, {

@@ -142,3 +148,3 @@ basename: 'plain_2.mbtiles',

scheme: 'tms',
size: 874496,
filesize: 874496,
}, {

@@ -158,3 +164,3 @@ basename: 'plain_4.mbtiles',

scheme: 'tms',
size: 684032
filesize: 684032
}]);

@@ -161,0 +167,0 @@ });

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