{"name":"pmtiles","version":"2.5.0","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@2.5.0","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"368d6fd040dc4789c44d1fffc290c09812167778","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-2.5.0.tgz","fileCount":12,"integrity":"sha512-jjboYPHPw9bcbcoGX9OCPiBxEU0ZoiUjNq5sgMhYsGgPobzlG+vJetZIm0qkZ3RTm0UwrEKizhAktovFh0W3lA==","signatures":[{"sig":"MEMCIHS6pqAvcXGpBjHh02A4xfZKzbmBkX5QhFTFk8HzVGvZAh8QUZ5gaFOUonIMfUiSoOeH2iZt7Wh3SgR2yTpgzWH2","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":157527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje2XvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo9QhAAiYdEY3YooiKbYxPM4bgTtbDNMUrKWCVOkWENFZRZIXq7qgy3\r\nZPkAe6+UE5STs4EFWrWN2Z2B50WTCTOdFuYsL+qvBGNNUEgBYidkTYiopm+t\r\njxfoqd4WmJ8qRtyEQ+jnjQUQqy76MfbcrYyyeLUld5EMb9dGPXf1c/vqi6DL\r\nOxxPR103s0nkGYL8WfagqKAuMfWDFiOnd02AHi0iywf5gZ7e9MeXWpZbS9XU\r\nt0BbsfmfppKdeCvXjkorbYz0jaadoHG2eBHHdjSaVCJFfqccwV5U2L10+1zV\r\nhf3D/P4LNauD698GI047AzrRXj+9Ne5BPVVfL5Tm0Zr5/jc5ru/Gq2uS/dHs\r\nv7Lkl8ylzjZy8LHd+g1llroyG49S4XIZ/H6kJAV4UUWW2QJGyyhu6n0nNSzq\r\n3+FPTomCZYmR/Td/X8YNyt8C+8rGUfW9icrviCl1z5oulOfVr4qPfb1k03Ts\r\n4uUI9SksKXFdjgAncMbIl59PJY7uNnFxmwpE0ktfbg4MyC2WkyQWTdz//7ye\r\nQcsXlWcLxQzyFam4seCuA/V1TaPIeQHoo9pqMgbJfo+GPPDHVTkOm0QKArwN\r\nyNB53NsRPWT+CoAe4RlXjn1vHcndzLXp3RQq1Fr1hlikvl6Zmssk6ULSi+L1\r\n47Bxy8xRfxgfgjQUWX7tI6xf0C3cdQF8y9Q=\r\n=ZmL/\r\n-----END PGP SIGNATURE-----\r\n","size":34421,"noattachment":false,"key":"/pmtiles/-/pmtiles-2.5.0.tgz"},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","source":"index.ts","gitHead":"82bad64bd3f7d72bfc2aee83a7c1dd186a493544","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":{"zora":"^5.0.2","esbuild":"^0.11.14","typescript":"^4.5.5","esbuild-runner":"^2.2.1"},"_npmOperationalInternal":{"tmp":"tmp/pmtiles_2.5.0_1669031406950_0.2703181485918307","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":1669031407201,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1669031407201,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}