{"name":"pmtiles","version":"3.0.1","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@3.0.1","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"4b4156c8a36b02c6e614a14ee230a1d32b921dd0","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-3.0.1.tgz","fileCount":11,"integrity":"sha512-lCMK0jFTaPgXYoKbzda+WIdVN3ZrJyMI5bfcR5LPq3jQHgYonkxK8g0FePsUdvvpFeT2lV5Ci9haJzwk0N7Z+g==","signatures":[{"sig":"MEYCIQCETKjFNs76cdNVb5epwiv5rrzTTgWwmsSsS2e9WHzyowIhAMcSEA5KiJI3LyAy9pkwh9Lha3ee0DenUqohvpcwFXRW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":128132,"size":30151,"noattachment":false,"key":"/pmtiles/-/pmtiles-3.0.1.tgz"},"type":"module","types":"./dist/index.d.ts","source":"index.ts","exports":"./dist/index.mjs","gitHead":"529f4ac05c46e122268b6f3a296c6229022420c1","scripts":{"tsc":"tsc --noEmit --watch","test":"tsx test/index.test.ts","biome":"biome check adapters.ts index.ts v2.ts test --apply","build":"npm run build-iife && npm run build-esm && npm run build-tsc","build-esm":"esbuild index.ts --outfile=dist/index.js --target=es6 --bundle --format=esm","build-tsc":"tsc --declaration --emitDeclarationOnly --outdir dist","build-iife":"esbuild index.ts --outfile=dist/pmtiles.js --target=es6 --global-name=pmtiles --bundle --format=iife","biome-check":"biome check adapters.ts index.ts v2.ts test"},"_npmUser":{"name":"bdon","email":"bdon@bdon.org"},"_npmVersion":"9.5.0","description":"PMTiles archive decoder for browsers","directories":{},"_nodeVersion":"18.15.0","dependencies":{"fflate":"^0.8.0","@types/leaflet":"^1.9.8"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.1.5","tsx":"^4.7.0","esbuild":"^0.20.0","typedoc":"^0.25.7","typescript":"^4.5.5","@types/node":"^18.11.9","@biomejs/biome":"^1.5.3"},"_npmOperationalInternal":{"tmp":"tmp/pmtiles_3.0.1_1706972531983_0.9691396544213455","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":1706972532140,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1706972532140,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}