{"name":"pmtiles","version":"2.0.0","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@2.0.0","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"061992ae5d701e26f26be811f93617754bb25d4e","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-2.0.0.tgz","fileCount":12,"integrity":"sha512-sgA2WFLNNe56K313n97YsKxQY7ZC62rGP5XCbIWnlRirrfL7Msg5usqK0I8cLayburbyiTvdCZ+eCK5+7m5GLA==","signatures":[{"sig":"MEUCIHEPOaU+sAgnCyruiRViXtdSlKZEm/Cv4dyPP6wS7/nhAiEA1C5S65SmSo0DydEX/7FpYpO5N1JIu6nrSZ8ApVyik8E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":149871,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjR3RhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoaGA/+Io09zCi16XSRESopQ0Vxolf8blvPXJSh7iXbzpW/8gXaPxRf\r\nmv3QN04uVYOHmeda5tb1+cbNgD9+UJsaWwZrJndEJSJRJ7DuPlAGbRwJT4H/\r\nRXGbGmy8CGHV+mKxj7mREYR5rFXvQjJNlfUx6bsvutdoJCwbLCA8oJkSZgGO\r\n6fvducZiRB9uqVYZdJQ4UXKA5LVSIrukvONj6jmBjAg/mdG+3Z/zN35B1RoO\r\nFg46a1E+3NFrZo/SGOUxXYTD3NSZYxarYTuTDCG2IEdZ+j3fyMbNUc8E89sn\r\nH8Jd0XxubAtt0z4DaGXn3YypOa1gbqGfMzwLlEKzRRgCu5OkM6y0GNjxGim8\r\nh2MSnBdHGV+fTCHoUrSrutZ32zWdz0ouJwP/7kBTNnvRWy2NJE5nE4HAOr4Z\r\nBC87PBZLDzmWxon74ZWpO9QKaDOzzM55gS6q/K5HFY19XxgbAtUam2zu5/eg\r\n2GE1V5Zg3dwnszMVsj9lsH8X6vK4GU4AFN7ZwMU39rKa/3rAgQBsvHWyE0lQ\r\nbNj+83RNcW6XNmJT530NuaJVpnRR2e5oa67417gy2MrwqO9gncAECRHCwtV6\r\n8TZr8GOuz8sPTw93l9La7dPQ+8WNmjwmtPC5z89lR9Qy6GCMxx10gP7yP+HB\r\nGVrdYk9S4Su+BDq4b9wBiH30E0uSowtVRQ8=\r\n=U5nn\r\n-----END PGP SIGNATURE-----\r\n","size":32109,"noattachment":false,"key":"/pmtiles/-/pmtiles-2.0.0.tgz"},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","source":"index.ts","gitHead":"cf20dcd0ce3ef9aeb883a84ed5a28d7f4d81a491","scripts":{"tsc":"tsc --noEmit --watch","test":"node -r esbuild-runner/register test/index.test.ts","build":"npm run build-iife && npm run build-esm && npm run build-cjs && npm run build-tsc","prettier":"prettier --write *.ts","build-cjs":"esbuild index.ts --outfile=dist/index.cjs --target=es6 --global-name=pmtiles --bundle --format=cjs","build-esm":"esbuild index.ts --outfile=dist/index.mjs --target=es6 --global-name=pmtiles --bundle --format=esm","build-tsc":"tsc --declaration --emitDeclarationOnly --outdir dist","build-iife":"esbuild index.ts --outfile=dist/index.js --target=es6 --global-name=pmtiles --bundle --format=iife"},"_npmUser":{"name":"bdon","email":"bdon@bdon.org"},"_npmVersion":"8.4.1","description":"PMTiles archive decoder for browsers","directories":{},"_nodeVersion":"16.14.0","dependencies":{"fflate":"^0.7.3"},"_hasShrinkwrap":false,"devDependencies":{"zora":"^5.0.2","esbuild":"^0.11.14","typescript":"^4.5.5","esbuild-runner":"^2.2.1"},"_npmOperationalInternal":{"tmp":"tmp/pmtiles_2.0.0_1665627220075_0.18755298942322596","host":"s3://npm-registry-packages"},"readme":"# PMTiles for Browsers + NodeJS\n\nSee the [JavaScript API docs](https://pmtiles.io/typedoc/)\n\nthe [PMTiles](https://www.npmjs.com/package/pmtiles) package can be included via script tag or ES6 module:\n\n```html\n <script src=\"https://unpkg.com/pmtiles@<VERSION>/dist/pmtiles.js\"></script>\n```\n\nAll the PMTiles exports are available under the global `pmtiles` variable e.g. `pmtiles.PMTiles`.\n\nAs an ES6 module: `npm add pmtiles`\n\n```js\nimport { PMTiles } from \"pmtiles\";\n```\n\n### Leaflet: Raster tileset\n\nExample of a raster PMTiles archive displayed in Leaflet:\n\n```js\nimport { PMTiles, leafletRasterLayer } from \"pmtiles\";\nconst p = new PMTiles('example.pmtiles')\nleafletRasterLayer(p,{attribution:'© <a href=\"https://openstreetmap.org\">OpenStreetMap</a>'}).addTo(map)\n````\n\n[Live example](https://pmtiles.io/examples/leaflet.html) | [Code](https://github.com/protomaps/PMTiles/blob/main/js/examples/leaflet.html)\n\n### Leaflet: Vector tileset\n\nSee [protomaps-leaflet](https://github.com/protomaps/protomaps-leaflet)\n\n## MapLibre GL JS\n\nExample of a PMTiles archive displayed in MapLibre GL JS:\n\n```js\nimport { Protocol } from \"pmtiles\";\nlet protocol = new Protocol();\nmaplibregl.addProtocol(\"pmtiles\",protocol.tile);\nvar style = {\n\"version\": 8,\n\"sources\": {\n    \"example_source\": {\n        \"type\": \"vector\",\n        \"url\": \"pmtiles://https://example.com/example.pmtiles\",\n        \"attribution\": '© <a href=\"https://openstreetmap.org\">OpenStreetMap</a>'\n    ...\n```\n\n[Live example](https://pmtiles.io/examples/maplibre.html) | [Code](https://github.com/protomaps/PMTiles/blob/main/js/examples/maplibre.html)\n\n# CORS\n\nSee the [Protomaps Docs on Cloud Storage](https://protomaps.com/docs/pmtiles/cloud-storage) for uploading and configuring CORS for Cloudflare R2, Amazon S3, Google Cloud Storage and more.\n","publish_time":1665627233833,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1665627233833,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}