{"name":"pmtiles","version":"1.0.1","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@1.0.1","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"691e93d58fdd4b016b28ebdb7ea04ca73b87ca60","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-1.0.1.tgz","fileCount":6,"integrity":"sha512-GPWXhcwp1ScxamSavLjnrhPVjjsJ6M8yqrpH8NfOMRbW7mFMBbt9UH/0NtDfmBstkXq7OcCnITvi6zl6DH067A==","signatures":[{"sig":"MEYCIQDawFsQmjwq1EHtxzQjamn/FL8HOenlAVxkbHsgut4NlQIhANN6L1oYta7ejYxkR92/f90nGiA6ay0PN0pOL0Ljj5E/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":33481,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiEH6vACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgsQ/+O3fN01tUs8VO1K4Y3BiTtZcCtN/59X8H8HClviLBndE+ouDm\r\nEVyxaiKmN0rdTzvCR2xHELqxR/WpYL7rB7V+C5D4CVNVLRJcwuVcyQV2dBzh\r\nU1w+bOc4WXstej3Ju8CQ9MfFCL9rjDTDokaEPeULNNfP3hG4b68i0pWHC97d\r\n5uBUJjMRyxogUmxjKxRxWr1xMpqASOdkG5sleJpLX5mcl9crX6A2IKTxzSkC\r\nP0qQeWztQ6ad3oTPaDW/dxfK7ZA10l54L7cG5Ln2R1jkdQEAoaBhevDm8bEu\r\ngak0sbtCcWhlkEjPIfR1HtD6JwS0sxt0n6SLkcso0JJnk1CvDNIcMya8AV4K\r\nHWToeqRNlqXChxnq+L+qBUAe7cSAnK7EEjmuqrt7E3P+qqI/7x2eUnEd5Fyc\r\n9hAMFSmT+GYb8fmCKSFjzEPsxd5aFaUe58wInuZJmcu9ocNBcuRl1yILPVwq\r\nRsRVgar6E5RVG7Rir5TjZwMmx/j6WbqCV0xBUfHC5uXGiT2tI9LVVRnfPPGY\r\nNIx+qxpljQBXaQWz/VG9Tkwt7UQqXKuH/e+LlOep/utoAZF0XQBDhgxcwCuF\r\n/Qeg7cn6eZ2s96GMQDYmj/3iLmjjLIzgdbH4arhFFjZZW7VxCF0aWmnww79E\r\nmd14wxnjnYAUN6ZPQDdqvoINVUfGTndUoWY=\r\n=DYwd\r\n-----END PGP SIGNATURE-----\r\n","size":6514,"noattachment":false,"key":"/pmtiles/-/pmtiles-1.0.1.tgz"},"main":"dist/pmtiles.js","module":"dist/pmtiles.mjs","source":"index.ts","gitHead":"73a9d37a89803e8bcbc98f16cd7a283b211edf5f","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-tsc","prettier":"prettier --write *.ts","build-esm":"esbuild index.ts --outfile=dist/index.mjs --target=es6 --global-name=pmtiles --format=esm","build-tsc":"tsc --declaration --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.3.1","description":"PMTiles archive decoder for browsers","directories":{},"_nodeVersion":"16.13.2","_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.1_1645248175799_0.4796690726089221","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":1645248175955,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1645248175955,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}