{"name":"pmtiles","version":"2.2.0","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@2.2.0","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"56dc84bfe2f813ce4ea12dcbfae94d59b0166860","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-2.2.0.tgz","fileCount":12,"integrity":"sha512-zcUNQz+ZYRhD2Q/7EWFj4G7UNc0LQ9H593B/ABbwqBAo7tFWG1rp2NPnHNWhUK79X+MzQDNzY+tSxKdND2WGYw==","signatures":[{"sig":"MEUCIQCIPuZn+9uAmB70louYUUk4GNJp3FPG8SkQpqftaX7d4QIgPjDz4ZAJIZKR6XyhELPu/F4/7LSgOwOMoLAG5D5Baos=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":153034,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjTVa6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpuCxAAk3gtp8ryFsFMyp2rxF+kUKK2kEpKhy4uKv8dxKQzej9gN9Mu\r\nhwNrTVgfMFHEESz0eCJEzWMv1tvaJFS/Zd3+ZdLyYLrhDsZEiasQNJKUoAbA\r\nxVlSwu8dQtHgRY95lMYDOKeRuxx4okmDaB+2AbWGd5Fy8yOws6a9X7whAlXe\r\n0+yI5YchsTu6yFxysLq2vLnXcoIwgazR8EyWgB9pj98oPUm3x9mWFPVeTe7g\r\n37QvGgk78ZDVxA7IbN4PfCIHRDLuAEytoLz8y+UJs9iogq5C7M6NxJUacNnD\r\nvzN1QIvfnQq/CBMi4zlUD6ph5xxRSmJPCKxNaxnCtv0GbTiBsWtW7daQVUXa\r\nnuIa99aVL7l4+qUUgNoQSZOR4BN3FoirbrZchpWl0Zg0s4Kq0Mt4kKLZtHsq\r\nIcV1GwSgnzFNRu4Tt9G//MOzYJjtdqheiK3r8uZ00t1hk/zdI27jHa8iJwoF\r\nRy8olvQyT7xB351vLAJMKMts+X1V9+K2HweUMUJsxmnzgTyxuLxILP3+6sY0\r\nIKy8/GZ5Ad7/fw4N3Ws+y37uFfCI5MOCQyrRLsi3Grpz9AYvZEQEGIJaEXXS\r\n1vdDk7XLgcZxPQ4/LcJkulwnY22pbKoY19135L64C61Tt2AIC1FOljYpKixZ\r\nddCWX86QeQ5Rz0vv6gaX6WIKtXu9qHaAwNI=\r\n=RG7R\r\n-----END PGP SIGNATURE-----\r\n","size":32701,"noattachment":false,"key":"/pmtiles/-/pmtiles-2.2.0.tgz"},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","source":"index.ts","gitHead":"9000d6d1ba22537a1e7935ff2fd08227545a5955","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.2.0_1666012857863_0.8705070987684327","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":1666012858098,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1666012858098,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}