{"name":"pmtiles","version":"1.0.4","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@1.0.4","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"43876cd2ef7f1d2d8f2a51485bf1b08395525010","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-1.0.4.tgz","fileCount":8,"integrity":"sha512-7ZV7NGSIkpyUIHAtjJ3ZKD55QMy9PNgF2YVsHkEjD/AN89U4FbagjdNC5omzw/E0huYxy99PsKyxu4EJ8NNU1w==","signatures":[{"sig":"MEUCIQD8iktDY53O+oHyJ+5PSwe1tVylqkMRPAvHh5fxDwpdYAIgOD7GsQHxz/ofbF9KaG7h5CHeh0WIkv/OgcM9IHDtFNo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":54757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJigzwdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRGBAAjKA8Zx3edonHJIRqiIc734QY+yfAxv8TRz8AlbRv8npYXp9Y\r\nl70+eURSOaYjgggiMrCdMJ1QQhIsc7LF/suCM16jEZ6NlMU8M32NyAqlzDCm\r\nHfqjpanXddMR8F2Y4t3UihktPTuUABbQJWsTsj3t+ldi0ooWUrg3LFw1IaP2\r\nE7F595pch0rdMh5EjHy1KhCznprvSj+c9Ub4zxySOCV1kEDGrfrskpBbpWOu\r\n29lXGd8zScVySUrgZMqeR8XvGOoSieGdKU4SKosCtm5fIWcLt9SGnKwRjyJB\r\n9wV4kaWQ4vkWIV5hvEbNevKQc9cgnIAc2e7sYr5rmmdjuGhGc/Fbhi7uSaVR\r\nCE5P0ixwvPbjpH8cVwxmM8ISZIg7/4DqUyZWgEuL5CC0H2/wS5S72sXfGzZr\r\nTiMsO2YC15JIwBdTKYv7SNpv+m+swDItR0ZJR72a7IcIXhCYBpZASdyEX0ov\r\nZH3LpBjpwrq6JV1viEi+FS4i34AaGUjyCGEh9su8s5rLXDMqxTJw44vFI8cI\r\n7HoVA5w3e5+h3EQ9IwHvwyeH6YEfVGqQl6qvo+f1Zg5ZQIdzcxGLjsvcIcoY\r\nAHL4fIayJmTZGEnTuOGbjveUfrJPFw8XkU37SPBDCNbl5p81EElDsBXyEBGo\r\n4Y2UOXW1BTEEVmVmsYz1TuEiqIr5Sqbn8kU=\r\n=kGG3\r\n-----END PGP SIGNATURE-----\r\n","size":7762,"noattachment":false,"key":"/pmtiles/-/pmtiles-1.0.4.tgz"},"main":"dist/index.cjs","types":"dist/index.d.ts","module":"dist/index.mjs","source":"index.ts","gitHead":"f31b8b2bca897ced8d071f295f60cdcc6b3d57e1","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 --format=cjs","build-esm":"esbuild index.ts --outfile=dist/index.mjs --target=es6 --global-name=pmtiles --format=esm","build-tsc":"tsc --declaration --emitDeclarationOnly --outdir dist","build-iife":"esbuild index.ts --outfile=dist/index.js --target=es6 --global-name=pmtiles --format=iife"},"_npmUser":{"name":"bdon","email":"bdon@bdon.org"},"_npmVersion":"8.4.1","description":"PMTiles archive decoder for browsers","directories":{},"_nodeVersion":"16.14.0","_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.0.4_1652767773704_0.4542413539988728","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":1652767773876,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1652767773876,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}