{"name":"pmtiles","version":"4.2.0","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@4.2.0","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"1eb8d29f495a7ef9a09df5a58dd6bb4dd6158d30","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-4.2.0.tgz","fileCount":4,"integrity":"sha512-y6Rz1y0Fw5VGMS6TLrIfK7L+O9BHweWnumLMFtRv8ekODD0fBXeSPKVfpI5TujeePRQIyfA3Gnx2EfX2jjlzLQ==","signatures":[{"sig":"MEYCIQDqaqIg16S7h5FIi2QQNERMJAqLi0rITYH3pNoxzZ3jAgIhAKtq8+g4XEUBMuGD/JrhzcDt/NfAb+LICF9CtsFXt2FY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39900,"size":11375,"noattachment":false,"key":"/pmtiles/-/pmtiles-4.2.0.tgz"},"main":"dist/cjs/index.cjs","type":"module","types":"dist/esm/index.d.ts","module":"dist/esm/index.js","source":"index.ts","exports":{".":{"import":{"types":"./dist/esm/index.d.ts","default":"./dist/esm/index.js"},"require":{"types":"./dist/cjs/index.d.cts","default":"./dist/cjs/index.cjs"}},"./package.json":"./package.json"},"gitHead":"701c5cb17040acfe6378249dde922760548eb10c","scripts":{"tsc":"tsc --noEmit --watch","test":"tsx test/index.test.ts","biome":"biome check src test --apply","build":"tsup","biome-check":"biome check src test"},"_npmUser":{"name":"bdon","email":"bdon@bdon.org"},"_npmVersion":"10.8.1","description":"PMTiles archive decoder for browsers","directories":{},"_nodeVersion":"20.16.0","dependencies":{"fflate":"^0.8.2"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.5.0","tsx":"^4.7.0","tsup":"^8.3.5","esbuild":"^0.24.0","typedoc":"^0.25.7","typescript":"^5.0.0","@types/node":"^20.0.0","@biomejs/biome":"^1.5.3","@types/leaflet":"^1.9.8"},"_npmOperationalInternal":{"tmp":"tmp/pmtiles_4.2.0_1736839109526_0.3313976894903665","host":"s3://npm-registry-packages-npm-production"},"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":1736839111321,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1736839111321,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}