{"name":"pmtiles","version":"2.1.0","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@2.1.0","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"898df72a588244aa1524dbbb94acc89b4d291d60","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-2.1.0.tgz","fileCount":12,"integrity":"sha512-Ai/nLADcyGz8bnYs2xnAq/hpD0Hm2PDjWXV/tMCn3+/GRksXJa96ad4FPiKaWTFHNd763npglwPV8RA/zi+Hrg==","signatures":[{"sig":"MEUCIASy2rINPSXhNea+jAowfpu8MciTWjwLWxuHQdfAE9hrAiEAgstRr0qvMvckOV7Dm9a4gGZfEVR29OmQik9fnVfIw/0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":152487,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSDi4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKSg/+Ocq7LpKWlPu12jc98S4MtsQUhkfM4AYsf48SfINS1SpMoGBY\r\nvVGbWpo2g9ziI3uQWsO0KXObwR0hc9wu8aeBp6wwm5ZXYcdt3AgYPWjHHiTe\r\n3fK8osSYJsmQiZ/xl5xNEpGGCBKBM/SpNJUqmrIdn1rSn5czmsr8soxPQHqZ\r\nFZTcM5ys73gaqAA+Rw78aRhnKgg6IHgRUtUTwPj0iTjATuFy3P/DE2hNZVZF\r\n2XR2/EawZxkdi2eyiQ8yvgE74xa3B8WtWKf3yyUyc1IU9RYQ/XfzimSzlxxw\r\n7pWBpZZ/qqMTrIKM3Al+InHPX0IYD5egbtHf8zeANR3g9Q0ww04MtyAggocC\r\nNSFSbZBo4z14o+vfLxy+0Gcmvi4yOKca+i6vgWSK1aPhoPSYsWOPFmCGeysf\r\n3zn2pht71wtmbtqIJ29MmT17uV7bHiAjH/FBC+w1uhi9SV0zh97+PiogBq6d\r\nqOigrikdsa4FluSqZGa7aqKbyQ91aHx1aIv8TRCJuB7Euw88/xnzXnTTJOgM\r\nI63SMh+QcahJiv998lWNfGJhja9iLrUkHx1sMUnesGjPPL0MNqUZuTi3XU+P\r\nLIOMi++OnDcssQ0b3aomZt2LFpy4EBoEh9HCRf0KAwT3sYyQGbg3AfN1hgID\r\nQyT4moBmiRMRuqt6dOjRa5EfbgNTy1F6CIQ=\r\n=08Yk\r\n-----END PGP SIGNATURE-----\r\n","size":32614,"noattachment":false,"key":"/pmtiles/-/pmtiles-2.1.0.tgz"},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","source":"index.ts","gitHead":"1933aeddd694033834dd08067c9501338006aa3a","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.1.0_1665677496305_0.3189200866605575","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":1665677496499,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1665677496499,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}