{"name":"pmtiles","version":"2.6.0","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@2.6.0","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"d32cf76d4ac23ded3bb6edd89de00b8c67586ee5","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-2.6.0.tgz","fileCount":12,"integrity":"sha512-9e3+cNjUhdGvrlRiYqpqtGLxi74Tj7fgqJKqzXAMf4N/bQfriJsokAA1rVedpNCNXU4H4TGaowNBFhG38ycDSw==","signatures":[{"sig":"MEYCIQD0LrVjx4zxQD6BuJepRpQHBOYG/MAVCB0tMT2ZDT8CTAIhAMPkF4TqcZkLTZD7KpoLQUii9muWyLm5uRIUpzVCdMBP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162059,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjXVHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmps3A//ZFaWmJmVzkd06WgUTRBOoCkm11UnK0kkIyzEusvdPKClcM/B\r\n9KbJ294bVFCj0PXMD9xj3iNIdCQDhkGjLaOZVEoEWaZzKg11RkhsshxYptjs\r\nfJ2Oq/DaaveUU+GPyez2fj1sJKmbPKmNErPtLk8ddYZCyMYa8ZYC/4tceW3w\r\nB7yTIgJ8KVQGEmwEZBSIbUPRJu3dvY5cEgcQ6wma5eDRhlPSbweQwLKmCkKi\r\nxT3AaOHhD5yJ4Vcal9NCSiLi6oU9gXuS+1XXJkzBwOEYW8uPy8Y28KEZ6JWH\r\nQckqa/RUe3ByGgS6Sw4SjvaQOFoBcvDrPekhD3EM8UuxBaXJcCR+YQnJDl8z\r\nCLmWn15/GQDZstEEajT2bBtCwa6dbJsj2jaed8ZMggfZg2no1RyjNsf88clK\r\n9TP30KIedtObdk8qqfkKNy1yMIAN3xC9kryI+Mt3rBe8z3+cN8Y8AD3Lznrx\r\nUXd0fYIvkiH+bfEPv+oclVm1TEAoP/SXLO1hhk/gXOFcx6uvs5ZJvfBglCTj\r\nRoO67WfOnzPuAa9i7ONgevhZgOszqRLHEf0KZWkyVnvloEtJC40QDoiF1ecI\r\nZjiiIEwdALdSim4IxZG2mAI4xHedlKvQF+PZXhWGseKXLoKAhevLRqSp2c4W\r\nSkFWbxXQbNYG0kKqSegzaiRg21Rqzkp40uw=\r\n=NfUS\r\n-----END PGP SIGNATURE-----\r\n","size":35668,"noattachment":false,"key":"/pmtiles/-/pmtiles-2.6.0.tgz"},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","source":"index.ts","gitHead":"9d3958388c824feb29c05173a7b150d6f4071e5e","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":"9.1.2","description":"PMTiles archive decoder for browsers","directories":{},"_nodeVersion":"18.12.1","dependencies":{"fflate":"^0.7.3"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.15.11","typescript":"^4.5.5","@types/node":"^18.11.9","esbuild-runner":"^2.2.1"},"_npmOperationalInternal":{"tmp":"tmp/pmtiles_2.6.0_1670214983222_0.5753537561186151","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":1670214983394,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1670214983394,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}