{"name":"pmtiles","version":"2.7.2","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@2.7.2","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"2f420a1110498a834f47829930162f540a959b12","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-2.7.2.tgz","fileCount":12,"integrity":"sha512-YRdfLlvN5z94F5/e3cnEFE0TymKx6egi0vDx6NJF83rYGNLV6Lr2PsdpWkSo3oVl4e6LVj8RvaWLfpT874QH+Q==","signatures":[{"sig":"MEUCIQCyoCZUEO3JuK6mX1xL1gNTTVjY8fjUHZVVqYZzyg1lCgIgLmFtksttqFQPNxCdi1ceV1fvRbVmWQHUZLGo/zABfh8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":166979,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNR9WACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGtw/9FMLpAp+WmGLO7uslFC7B1hqmlIGKDjNiQ0rEV1p4UUQs1BDC\r\n1xXbI7WAmBzXtMZZdZYmT+9gQ7Vh3ozbfU49dk1FaPNksNxQtWrHwmQuLjnW\r\n22wX7mLt2JLJ1bkZLGm4LqSOZeZJuq42DTFqTEX7lr+9oigBLcvsZYNcz1eC\r\nLoKJ+dGQr2/zt8EmlIWGL0P0Q9DhpqcZRO3V53G64ZdBobfSvcnI9Ma4dm8o\r\nbHxzq1GRmHgvCaiC0rycAIpFakCttLcPeC4qWKvESATil0Nr7es5CVi7Ps5g\r\ncxKJ0tAWptH/EVK9+6yAvk/DLvO1uyTdrKiGcT6gon7cKTgEbwKV8LTk5b1i\r\ng76Ya5mndxBgkpgjR7OCSbRhOmWsff2XDyWBMo4rjRK5y5i2yMWwzTpYjsBS\r\n07wN/WLiR0INvIi/+wmLepbOCZLOivsaYv/WVmzUfREZ3BZu/10PVVFTVHk5\r\nnmYzreRIqnf88deiR4fswswiULrd33zYrybILWhM2vPWy/OkHBujJ50wPvYO\r\nQ6MpTa0/wtjnBSNkJrDI2AHc63yiCUx54IRHGl2ykYhWFI6Zpa8WeCVgBG/l\r\n6tmmg7ArAGnn+kiqvJkTWe3ssrWdMn233dOqTFtanLfH8H8W2zlOmoTOkKbI\r\n6WbkbF7PoRJQrzmKLAWPPVR3aK9G1Fwvruk=\r\n=rHn0\r\n-----END PGP SIGNATURE-----\r\n","size":36496,"noattachment":false,"key":"/pmtiles/-/pmtiles-2.7.2.tgz"},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","source":"index.ts","gitHead":"21cb8b32bd8f200507eef71f068bcca2a6c0904f","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 test/*.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","prettier-check":"prettier --check *.ts test/*.ts"},"_npmUser":{"name":"bdon","email":"bdon@bdon.org"},"_npmVersion":"9.5.0","description":"PMTiles archive decoder for browsers","directories":{},"_nodeVersion":"18.15.0","dependencies":{"fflate":"^0.7.3"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.15.11","prettier":"^2.8.4","typescript":"^4.5.5","@types/node":"^18.11.9","esbuild-runner":"^2.2.1"},"_npmOperationalInternal":{"tmp":"tmp/pmtiles_2.7.2_1681203029847_0.593417982771578","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":1681203030049,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1681203030049,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}