{"name":"pmtiles","version":"2.6.1","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@2.6.1","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"71dfe7ca3aefabc12d09c001e4964d7f15289478","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-2.6.1.tgz","fileCount":12,"integrity":"sha512-LJrPdq5PcsqzldHdM+UoHizwBgurn4oI2ihafBrhHbBzxkdbWcboyVUH3WEFllKzpD/c3Io5/U9eBxW795ppRw==","signatures":[{"sig":"MEQCIEyKrmXNEg6OwdFxAON0eIcKPIvJP2wczYcSNJpQIEyjAiBPFnf4RLxaChRD3fvcOhjoGvCevgjT2o7n/geqRg+/wQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjlHPkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmreGhAAnsCdAreTo+s9hLNfVeaY0KffiXZuRFuyFvoMOOJR44+Fv5cw\r\nUCJ27c9xVii/kM0A+z4F7SV8eIAg9n4mtICsKxSHkPGRTbJUr4EI4MlTGrcl\r\n9AsUSFsRXCoxl+H6HELzGWNbfjUjY+o9qTfrEiFlIW0Iy3RC0lwdXPrWs9Fq\r\n4aLkFejBruswSpfK5m7fy5AZ8WUT3ZB4x27ZlQZLnUBVKpMTtTLObk/tYQIg\r\n4r9wxhSt4mGd1G8O7O1rt0/8LDpAE9tmMu3mHkHhhT9kwwcUvE72EDX5Ry+p\r\nlLgtogTHynXGFs+sOBpDmEusv2NciRBXpc6FmAUnXjxngYFmcqvU5J/47Cdt\r\nyZza4xHMBe1u84fhtOZEKo37g6ZBstwolDb/DYS8uqHgbvQPIgc31T4UXYZy\r\n88b8TTnLHsMe/tqgb+imx+yqSsRKLwm007SiMOfVbPdY9U2rherPG6eM056s\r\nuQLbiEQDi5y4qtTyl2+IcTh2ToHG1PxRcf9k1rm5/EhBLR/wScCukYx3c6JJ\r\nVOTddt4SZc5FzfxlfDka6vh7y/N043asy6gJH1eD5y/LEhP5K6omEjt+UOax\r\n+6DfE81h085/wX4HzZRAWk1O2AhUpr0oiPxOzmTk1X+PZJnHE7H4m1UFNk5T\r\nO7UJqST+ub/BflABnjj3rjwbM7H57bG9VAs=\r\n=cH4n\r\n-----END PGP SIGNATURE-----\r\n","size":35775,"noattachment":false,"key":"/pmtiles/-/pmtiles-2.6.1.tgz"},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","source":"index.ts","gitHead":"2b82640d8daabc27bab88e34d28f5764098720ca","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.1_1670673379798_0.6624562554779914","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":1670673379980,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1670673379980,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}