{"name":"pmtiles","version":"0.3.0","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@0.3.0","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"03292d6b1aa73545fe5c7c6710af2cf9489ecbb7","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-0.3.0.tgz","fileCount":3,"integrity":"sha512-hAp/uAH/AwsboqoxUMg8HzwJPBnWL4lG9DG69a8pP3V98dc0v2szFJ9+PzR+7xrA7xy80h+iSjhS7P2CHEO27w==","signatures":[{"sig":"MEUCIQDMOTKh7BzKBt7OMBfBw8dYpirTkKN4MumM4kdJHhssoQIgVdMRchTopsEDVZr5tKLk2QKYdENnHqmsvo87UKP6jcI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgzCuMCRA9TVsSAnZWagAAqdoP/2r/oNHJHA1wBwY/TJNY\nLIT+mrlAujH4l8vi4quu9QgLBEbcisXo0O0wM4rBm8gd+iKYdDzDljoDE3HU\nALvPGSw32Tk5uTxXE8lpVZa89ROZMxMTRXQUHi5cgWanapDRCMHRgiJNBMny\nH5WixXDc/XLN1+Unn+OrfGiEN6Tuoi4MB9sSvGHgykMO229TQvN0BHN1GdbG\nvtLW2buoLXNgX2DKQ4E3rlGl0Exe9GSMQfTMGq7mXVWKfk20hpm2+pKpmvn4\nZwp4PyQ1tzBTNhRROuXqJWnEgA/OqlyVTpDO6X7GEafw7vPUJvr3NjZPH9Mv\neDdT/duBbBA/pt0ZEEWn35kSU5AorREAt7KPglNn+djoMYBLvJ7ZUu9UFSLE\nesDw79khoTiN0Q6e21vxJues3xAJADufpkdbuxVwuQN4Alu92V53JR6Hy31i\nW/B/Y79Nk2ArwTNtfhEp6jP/Cm3SzmfpgGqakFSXXxNYU6jRIXItD8MJuQp6\nsQBlC6Cltd9IGWIy1tH7IJnCm7LXai79hVoz1BLYcOtxcQX3iC27yckFaKbd\nwaB6vJE04qkg5kf3GjhlfDIHVJAC+kD7MD51vPBr4aENFovOy6dLfaJrCXk2\n4G4q7p/sP34uLB/uJiKU9QMoymjVtSwW6P5wU3iklGW31N/id5zLNu5gF7Yp\nG4wJ\r\n=nS7q\r\n-----END PGP SIGNATURE-----\r\n","size":3742,"noattachment":false,"key":"/pmtiles/-/pmtiles-0.3.0.tgz"},"main":"index","unpkg":"index.js","module":"index.mjs","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"npm run build-iife && npm run build-esm","build-esm":"esbuild index.src.mjs --outfile=index.mjs --target=es6 --global-name=pmtiles --format=esm","build-iife":"esbuild index.src.mjs --outfile=index.js --target=es2015 --global-name=pmtiles --format=iife"},"_npmUser":{"name":"bdon","email":"bdon@bdon.org"},"jsdelivr":"index.js","_npmVersion":"6.14.8","description":"PMTiles archive decoder for browsers","directories":{},"_nodeVersion":"14.15.0","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.11.14"},"_npmOperationalInternal":{"tmp":"tmp/pmtiles_0.3.0_1623993227725_0.5156820038088965","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":1623993227842,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1623993227842,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}