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

vector-tile

Package Overview
Dependencies
Maintainers
31
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vector-tile - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

test/fixtures/118.vector.pbf

4

CHANGELOG.md
## vector-tile-js changelog
### 1.1.2 (2015-03-05)
- Fixed decoding of negative values in feature properties
### 1.1.1 (2015-02-25)

@@ -4,0 +8,0 @@

9

lib/vectortile.js

@@ -13,3 +13,3 @@ 'use strict';

if (tag === 3) {
var layer = readLayer(pbf);
var layer = new VectorTileLayer(pbf, pbf.readVarint() + pbf.pos);
if (layer.length) layers[layer.name] = layer;

@@ -19,8 +19,1 @@ }

function readLayer(pbf) {
var bytes = pbf.readVarint(),
end = pbf.pos + bytes,
layer = new VectorTileLayer(pbf, end);
pbf.pos = end;
return layer;
}

@@ -30,4 +30,3 @@ 'use strict';

function readTag(pbf, feature) {
var bytes = pbf.readVarint(),
end = pbf.pos + bytes;
var end = pbf.readVarint() + pbf.pos;

@@ -47,4 +46,3 @@ while (pbf.pos < end) {

var bytes = pbf.readVarint(),
end = pbf.pos + bytes,
var end = pbf.readVarint() + pbf.pos,
cmd = 1,

@@ -94,5 +92,3 @@ length = 0,

var bytes = pbf.readVarint(),
end = pbf.pos + bytes,
var end = pbf.readVarint() + pbf.pos,
cmd = 1,

@@ -99,0 +95,0 @@ length = 0,

@@ -36,4 +36,3 @@ 'use strict';

var value = null,
bytes = pbf.readVarint(),
end = pbf.pos + bytes;
end = pbf.readVarint() + pbf.pos;

@@ -46,5 +45,6 @@ while (pbf.pos < end) {

tag === 3 ? pbf.readDouble() :
tag === 4 || tag === 5 ? pbf.readVarint() :
tag === 4 ? pbf.readVarint64() :
tag === 5 ? pbf.readVarint() :
tag === 6 ? pbf.readSVarint() :
tag === 7 ? Boolean(pbf.readVarint()) : null;
tag === 7 ? pbf.readBoolean() : null;
}

@@ -60,5 +60,5 @@

this._pbf.pos = this._features[i];
var end = this._pbf.readVarint() + this._pbf.pos;
return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values);
};

@@ -5,3 +5,3 @@ {

"repository": "https://github.com/mapbox/vector-tile-js.git",
"version": "1.1.1",
"version": "1.1.2",
"license": "BSD",

@@ -14,8 +14,8 @@ "main": "index.js",

"benchmark": "^1.0.0",
"coveralls": "~2.10.0",
"istanbul": "~0.2.11",
"jshint": "^2.5.1",
"coveralls": "~2.11.2",
"istanbul": "~0.3.6",
"mapnik": "^3.1.6",
"pbf": "^1.1.3",
"tape": "~2.13.3"
"jshint": "^2.6.3",
"pbf": "^1.3.2",
"tape": "~3.5.0"
},

@@ -22,0 +22,0 @@ "jshintConfig": {

@@ -10,3 +10,3 @@ # vector-tile-js

```js
var VectorTile = require('vector-tile');
var VectorTile = require('vector-tile').VectorTile;
var Protobuf = require('pbf');

@@ -13,0 +13,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