{"name":"@mapbox/vector-tile","description":"Parses vector tiles","repository":{"type":"git","url":"git+https://github.com/mapbox/vector-tile-js.git"},"version":"1.3.0","license":"BSD-3-Clause","main":"index.js","dependencies":{"@mapbox/point-geometry":"~0.1.0"},"devDependencies":{"benchmark":"^1.0.0","coveralls":"~2.11.2","istanbul":"~0.3.6","mapnik":"^3.6.0","jshint":"^2.6.3","pbf":"^1.3.2","tape":"~3.5.0","eslint":"~1.00.0","eslint-config-unstyled":"^1.1.0"},"jshintConfig":{"trailing":true,"undef":true,"unused":true,"indent":4,"node":true},"scripts":{"test":"eslint lib index.js && jshint lib && tape test/parse.test.js","cov":"istanbul cover ./node_modules/.bin/tape test/parse.test.js && coveralls < ./coverage/lcov.info"},"gitHead":"e49aff8a973e7c98fe287cb15e3d3bd15c7b31b0","bugs":{"url":"https://github.com/mapbox/vector-tile-js/issues"},"homepage":"https://github.com/mapbox/vector-tile-js#readme","_id":"@mapbox/vector-tile@1.3.0","_shasum":"c495f972525befccefcd838f45ffa37ef3b70fe8","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.2","_npmUser":{"name":"flippmoke","email":"flippmoke@gmail.com"},"dist":{"shasum":"c495f972525befccefcd838f45ffa37ef3b70fe8","tarball":"http://registry-npm.ywwl.com/@mapbox/vector-tile/download/@mapbox/vector-tile-1.3.0.tgz","integrity":"sha512-DnQ2vLJ/VK988N4baifVBmRjLUCa9UOVJElT1+PHrdL+XNfgCQIG9m50iskyxT30HgNle+8egKY57g3h4xyNxQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfwP+xOmj9XQVybeYAGwEFupBJAoQ/l0vElqRtISjxxwIgL1t6cjS2YZjOnoG0q41pl0VkMv0lWjDjTCCAgG65prQ="}],"size":122908,"noattachment":false,"key":"/@mapbox/vector-tile/-/@mapbox/vector-tile-1.3.0.tgz"},"maintainers":[{"name":"aaronlidman","email":"aaronlidman@gmail.com"},{"name":"aarthykc","email":"aarthy@mapbox.com"},{"name":"ajashton","email":"aj@mapbox.com"},{"name":"ajithranka","email":"ajith@mapbox.com"},{"name":"aliceykuo","email":"alice@mapbox.com"},{"name":"alinapaz","email":"alinapaz@gmail.com"},{"name":"allierowan","email":"aileen.s.rowan@gmail.com"},{"name":"alulsh","email":"ulsh@mapbox.com"},{"name":"amishas157","email":"amisha@mapbox.com"},{"name":"amyleew","email":"amyleewalton@gmail.com"},{"name":"anandthakker","email":"vestibule@anandthakker.net"},{"name":"andygol","email":"andrey@mapbox.com"},{"name":"ansis","email":"ansis.brammanis@gmail.com"},{"name":"aparlato","email":"alex.parlato@mapbox.com"},{"name":"apendleton","email":"andrew@mapbox.com"},{"name":"arunasank","email":"aruna@mapbox.com"},{"name":"batpad","email":"sanjay@mapbox.com"},{"name":"benjamintd","email":"benjamin@mapbox.com"},{"name":"bhousel","email":"bryan@mapbox.com"},{"name":"bkowshik","email":"bhargav.kowshik@gmail.com"},{"name":"boblannon","email":"blannon@gmail.com"},{"name":"brendanmcfarland","email":"brendan@mapbox.com"},{"name":"bsrinivasa","email":"bharata+npm@mapbox.com"},{"name":"bsudekum","email":"bobby@mapbox.com"},{"name":"calfarome","email":"cesar@mapbox.com"},{"name":"camillacaros","email":"camilla@mapbox.com"},{"name":"captainbarbosa","email":"nadia.barbosa@mapbox.com"},{"name":"chaupow","email":"hello@chau-nguyen.de"},{"name":"chetangowda","email":"chethan@mapbox.com"},{"name":"chrisloer","email":"chris.loer@mapbox.com"},{"name":"colleenmcginnis","email":"colleen.mcginnis@mapbox.com"},{"name":"danieljh","email":"daniel+npm@trvx.org"},{"name":"dannykath","email":"danny@mapbox.com"},{"name":"danpat","email":"danpat@danpat.net"},{"name":"danswick","email":"dan@mapbox.com"},{"name":"dasulit","email":"dana.sulit@mapbox.com"},{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},{"name":"deniskoronchik","email":"denis.koronchik@gmail.com"},{"name":"dnomadb","email":"damon@mapbox.com"},{"name":"drboyer","email":"devin.boyer@mapbox.com"},{"name":"dthompson","email":"dthompson@gmail.com"},{"name":"emilymcafee","email":"emily@mapbox.com"},{"name":"emilymdubois","email":"dubois@mapbox.com"},{"name":"enf","email":"fischer@mapbox.com"},{"name":"fa7c0n","email":"gokul.ganesan@mapbox.com"},{"name":"flippmoke","email":"flippmoke@gmail.com"},{"name":"freenerd","email":"spam@freenerd.de"},{"name":"geohacker","email":"sajjadkm@gmail.com"},{"name":"ghoshkaj","email":"ghoshkaj@gmail.com"},{"name":"gretacb","email":"carol@mapbox.com"},{"name":"ian29","email":"ian.villeda@gmail.com"},{"name":"ianshward","email":"ian@mapbox.com"},{"name":"ilyasaf","email":"safonov.ilya@gmail.com"},{"name":"ingalls","email":"nicholas.ingalls@gmail.com"},{"name":"isiyu","email":"siyu.song@gmail.com"},{"name":"jacquestardie","email":"hi@jacquestardie.org"},{"name":"jfirebaugh","email":"john.firebaugh@gmail.com"},{"name":"jothirnadh","email":"jothirnadh@mapbox.com"},{"name":"jrpruit1","email":"jake@jakepruitt.com"},{"name":"k-mahoney","email":"kara.e.mahoney@gmail.com"},{"name":"kaibot3000","email":"kai@mapbox.com"},{"name":"kaidalgleish","email":"kai@mapbox.com"},{"name":"karenzshea","email":"karen@mapbox.com"},{"name":"karitotp","email":"karito@mapbox.com"},{"name":"katydecorah","email":"decorah@mapbox.com"},{"name":"kepta","email":"0o3ko0@gmail.com"},{"name":"kkaefer","email":"mail@kkaefer.com"},{"name":"kronick","email":"sam.kronick@mapbox.com"},{"name":"l-r","email":"laurier@mapbox.com"},{"name":"laurier","email":"l@pwd.io"},{"name":"lbud","email":"lauren@mapbox.com"},{"name":"lily-chai","email":"lily@mapbox.com"},{"name":"lndsay","email":"lindsay@mapbox.com"},{"name":"lucaswoj","email":"lucas@lucaswoj.com"},{"name":"lukasmartinelli","email":"me@lukasmartinelli.ch"},{"name":"lxbarth","email":"alex@mapbox.com"},{"name":"lyzidiamond","email":"lyzi@mapbox.com"},{"name":"maning","email":"emmanuel.sambale@gmail.com"},{"name":"manoharuss","email":"manohar@mapbox.com"},{"name":"mapbox-admin","email":"accounts@mapbox.com"},{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapsam","email":"sam@mapbox.com"},{"name":"mateov","email":"matt@mapbox.com"},{"name":"mattficke","email":"matt@mattficke.com"},{"name":"mayaqgao","email":"mayaqgao@gmail.com"},{"name":"mcwhittemore","email":"mcwhittemore@gmail.com"},{"name":"miccolis","email":"jeff@miccolis.net"},{"name":"miles-dev","email":"miles.sackler@mapbox.com"},{"name":"mokob","email":"moritz@mapbox.com"},{"name":"mollymerp","email":"mollylloyd@gmail.com"},{"name":"morganherlocker","email":"morgan.herlocker@gmail.com"},{"name":"mourner","email":"agafonkin@gmail.com"},{"name":"msirenko","email":"max@mapbox.com"},{"name":"nammala","email":"krishna@mapbox.com"},{"name":"natslaughter","email":"nat@mapbox.com"},{"name":"nickcordella","email":"nick.cordella@mapbox.com"},{"name":"nickidlugash","email":"nicki@mapbox.com"},{"name":"nikhilprabhakar","email":"nikinfour@gmail.com"},{"name":"oini","email":"oindrila.gupta92@gmail.com"},{"name":"oliikit","email":"olivia.brundage@mapbox.com"},{"name":"oxidase","email":"michael.krasnyk@gmail.com"},{"name":"patjouk","email":"lucie.daeye@mapbox.com"},{"name":"pdgoodman","email":"paul@mapbox.com"},{"name":"perrygeo","email":"perrygeo@gmail.colm"},{"name":"peterqliu","email":"peterqliu@gmail.com"},{"name":"planemad","email":"arun.planemad@gmail.com"},{"name":"pratikyadav","email":"pratik@mapbox.com"},{"name":"rasagy","email":"rasagy@mapbox.com"},{"name":"rclark","email":"ryan.clark.j@gmail.com"},{"name":"richrico","email":"richman@mapbox.com"},{"name":"ridixcr","email":"pavel@mapbox.com"},{"name":"rub21","email":"ruben@mapbox.com"},{"name":"rumc","email":"r.ragupathy85@gmail.com"},{"name":"ryan-baumann","email":"rsbaumann@gmail.com"},{"name":"saikia.abhishek","email":"abhishek@mapbox.com"},{"name":"samanbb","email":"saman@mapbox.com"},{"name":"samely","email":"eliane@mapbox.com"},{"name":"sarahkleins","email":"sarah.kleinman@mapbox.com"},{"name":"sbma44","email":"tlee@mapbox.com"},{"name":"scothis","email":"scothis@gmail.com"},{"name":"sgillies","email":"sean@mapbox.com"},{"name":"springmeyer","email":"dane@mapbox.com"},{"name":"srividyacb","email":"srividyabharadwaj26@gmail.com"},{"name":"tcql","email":"tim.channell@gmail.com"},{"name":"themarex","email":"patrick@mapbox.com"},{"name":"tony-cj","email":"tony.chen@mapbox.com"},{"name":"tristen","email":"tristen.brown@gmail.com"},{"name":"upendrayadav","email":"upendra@mapbox.com"},{"name":"uvollmer","email":"ugo.vollmer@mapbox.com"},{"name":"vincents","email":"vincent.sarago@mapbox.com"},{"name":"virginiayung","email":"virginia@mapbox.com"},{"name":"willwhite","email":"will@mapbox.com"},{"name":"xrwang","email":"xiaowei@mapbox.com"},{"name":"yhahn","email":"young@mapbox.com"},{"name":"yunjieli","email":"yunjie.li@mapbox.com"},{"name":"zmully","email":"mully@mapbox.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/vector-tile-1.3.0.tgz_1492806682349_0.3445038564968854"},"directories":{},"readme":"# vector-tile\n\n[![build status](https://secure.travis-ci.org/mapbox/vector-tile-js.svg)](http://travis-ci.org/mapbox/vector-tile-js) [![Coverage Status](https://coveralls.io/repos/mapbox/vector-tile-js/badge.svg)](https://coveralls.io/r/mapbox/vector-tile-js)\n\nThis library reads [Mapbox Vector Tiles](https://github.com/mapbox/vector-tile-spec) and allows access to the layers and features.\n\n## Example\n\n```js\nvar VectorTile = require('@mapbox/vector-tile').VectorTile;\nvar Protobuf = require('pbf');\n\nvar tile = new VectorTile(new Protobuf(data));\n\n// Contains a map of all layers\ntile.layers;\n\nvar landuse = tile.layers.landuse;\n\n// Amount of features in this layer\nlanduse.length;\n\n// Returns the first feature\nlanduse.feature(0);\n```\n\nVector tiles contained in [serialtiles-spec](https://github.com/mapbox/serialtiles-spec)\nare gzip-encoded, so a complete example of parsing them with the native\nzlib module would be:\n\n```js\nvar VectorTile = require('vector-tile').VectorTile;\nvar Protobuf = require('pbf');\nvar zlib = require('zlib');\n\nzlib.gunzip(data, function(err, buffer) {\n    var tile = new VectorTile(new Protobuf(buffer));\n});\n```\n\n## Depends\n\n - Node.js v0.10.x or v0.8.x\n\n\n## Install\n\nTo install:\n\n    npm install @mapbox/vector-tile\n\n\n## API Reference\n\n\n### VectorTile\n\nAn object that parses vector tile data and makes it readable.\n\n#### Constructor\n\n- **new VectorTile(protobuf[, end])** &mdash;\n  parses the vector tile data contained in the given [Protobuf](https://github.com/mapbox/pbf) object,\n  saving resulting layers in the created object as a `layers` property. Optionally accepts end index.\n\n#### Properties\n\n- **layers** (Object) &mdash; an object containing parsed layers in the form of `{<name>: <layer>, ...}`,\nwhere each layer is a `VectorTileLayer` object.\n\n\n### VectorTileLayer\n\nAn object that contains the data for a single vector tile layer.\n\n#### Properties\n\n- **version** (`Number`, default: `1`)\n- **name** (`String) `&mdash; layer name\n- **extent** (`Number`, default: `4096`) &mdash; tile extent size\n- **length** (`Number`) &mdash; number of features in the layer\n\n#### Methods\n\n- **feature(i)** &mdash; get a feature (`VectorTileFeature`) by the given index from the layer.\n\n\n### VectorTileFeature\n\nAn object that contains the data for a single feature.\n\n#### Properties\n\n- **type** (`Number`) &mdash; type of the feature (also see `VectorTileFeature.types`)\n- **extent** (`Number`) &mdash; feature extent size\n- **id** (`Number`) &mdash; feature identifier, if present\n- **properties** (`Object`) &mdash; object literal with feature properties\n\n#### Methods\n\n- **loadGeometry()** &mdash; parses feature geometry and returns an array of\n  [Point](https://github.com/mapbox/point-geometry) arrays (with each point having `x` and `y` properties)\n- **bbox()** &mdash; calculates and returns the bounding box of the feature in the form `[x1, y1, x2, y2]`\n- **toGeoJSON(x, y, z)** &mdash; returns a GeoJSON representation of the feature. (`x`, `y`, and `z` refer to the containing tile's index.)\n","publish_time":1492806683134,"_cnpm_publish_time":1492806683134,"dist-tags":{"latest":"3.0.0"}}