{"name":"pmtiles","version":"1.1.0","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@1.1.0","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"357651ac7f938b63eac73a9b970f7f6727649846","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-1.1.0.tgz","fileCount":8,"integrity":"sha512-7uFwsIot36AaE6uZbT4WXfXbnG1EB6sOP06ccRAPy4nNNHe13CPXgq83UiwWkgUr0FLhA+aMqt7MULTL2WEGhw==","signatures":[{"sig":"MEQCIEc+G/Q1AAhKvjEA61tfsVxeXpF8GUDKf7vN66SkIrX8AiB5rb9KGNpHfL1CDSFadL3IMC3fIr/248NsHClKftWJ8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":87307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixmLZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr2SA/+OjGG75Rc0icbAL8FcaBNmvLn31oH3ygnAtTKF08p44iAicwl\r\nSo2rREaVk1Hkjg97n8MWT29J61KXL5kcNgF/BGjJIYLqOiE4RMKBvil5YhQU\r\nGQh2aQ1CriEukMrI3cvxFMCAewK9zPdkhjTxbkqQtH5Lq2JWQo+BHyWhXYfG\r\nYj3TnAONwI/UcwQyLB9B3jB4rtmrOJezHfpbqcg3BwZj6qm8ULwwMN5DwwrH\r\nJyRFmRYWvEl7ZFK1hfjINF9+5KcV4w8XlIvkGSMKkSHolwo9YuCSDr6fDkVU\r\nwXQ0QyuydUwCpru0Aw7UWQlV5CwMC2FD+fOaR2v9gtR5aDkpKyUWhu8YO6jY\r\nQxixd8BCtOmBk8U+isVckH5UZ5kusP+rLW8LfQSOk3Mzv7i+AMIVNR1Z6wlN\r\na/5aQ04LU9OGYq581wUtUJS+JdzDA8g6VVgCqCKuYuJD5ZU6OBSTTKlQ6A33\r\nmdaR1cO8LjDGyM4VYY3yPbgHCAXd6aBk5WkI4+DHbOknhHHHk2FToqfxbhUt\r\nNyEgknCz0URVFM50lq4H/aj5QKFe5csAhEPG/PZCdpBLotpkodpwPEopGdtT\r\nBiJTrkNRF4sS5u2y+yQrPSl9izYxF7c3CdEI2Ct7OWB+ws++lO/AjVqcYALY\r\n+gs9Kdyw4Nd1ovGTjCnqlMvSP6EGcFumCGU=\r\n=19nX\r\n-----END PGP SIGNATURE-----\r\n","size":14101,"noattachment":false,"key":"/pmtiles/-/pmtiles-1.1.0.tgz"},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","source":"index.ts","gitHead":"3811ff9b1b2860f7c1660d7c90a4d53c68060acb","scripts":{"tsc":"tsc --noEmit --watch","test":"node -r esbuild-runner/register 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_1.1.0_1657168601497_0.9410540262444922","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":1657168601638,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1657168601638,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}