{"name":"pmtiles","version":"0.5.0","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@0.5.0","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"45a343a4f8d91ee969f12c93fc5974e2c9c87bd8","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-0.5.0.tgz","fileCount":3,"integrity":"sha512-Rc3ziNUll6uYfmzVfDWH/OhM+TgIlwmqeOv1KDWz+cQuCAHPq1GRinoA6bS0kLNQwZdWqReDFIm+cwXf2iALyg==","signatures":[{"sig":"MEYCIQC0SHHiL+GMxtDyLgKpZCmuEhE28DY2M9Dig4k3LOwxwgIhAPbEyt9WQ71auQRSpBkkrt3N4MdaaGe4APup7AqkQf6d","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhy+YSCRA9TVsSAnZWagAAOl0P/3PdcJ+l2lZxqHs52gL2\nfqrriGTkw1SwPqZ3Sl3sH1YLUYs/yGHGFA6C7qQaCOa8DOuY/qexo9sxa81/\nBT8LQ/Emaz1VtrVYGxgTeJP8fk1FefOyKpvAE6H7YAywW/j6HYXBHn2KzPtf\nrCVg8yObiHgAH0Or3CegOe1k+QPIpsiZjaCa6S/rFO7T2fK0d4aMe6vx2oxC\nUcbGuXkX2lFxHWcdKekudzUgzezt3RrWZeyEbbjfDcP5JboYbQQ4dAronuXi\nt+QDdYMMMS5ZU4Cot55B9mhwpfnHJXu2cUeHqGOkPE92tQriC7U1ZimX2UHM\n04R4zVe1QhKFV+/AZkoehn/PZ84h2EABwTfLbfDV2hRG3qNZOypUML0YRUZC\nmN3VmLvAXzHJMc8j7Prykq4hRprAuA9sNTCxKarEQLiBNO8kyWT2s6lqdy+n\ndWkY27Ge9rG4Xn+Q3sNWjDGoC+Zo62ZYAWON3qn6JD5HDlgcr75C9obX6N4O\nvmPqOsLd3ufth7NVK28eLPvHUlnV62ICV0YfknHnKdxZqCv94Hggj2a1Oq/P\n9EghuDyti3f92SAQ8W+9yyLoebWKlrdnNHnTAPvwOrUBqzXAaNG2UBaN3izz\n4rSDE9igLaZ6p0PRPg6zKKkLjcrh7kYkOh3yPDJKBFjw4OwjVGX60gqUklL0\nCWXC\r\n=gylh\r\n-----END PGP SIGNATURE-----\r\n","size":3774,"noattachment":false,"key":"/pmtiles/-/pmtiles-0.5.0.tgz"},"main":"index","unpkg":"index.js","module":"index.mjs","gitHead":"4931f58d85377a0e614291af2a5888533eff7dd4","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":"7.24.2","description":"PMTiles archive decoder for browsers","directories":{},"_nodeVersion":"16.10.0","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.11.14"},"_npmOperationalInternal":{"tmp":"tmp/pmtiles_0.5.0_1640752658306_0.7178468120507651","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":1640752658424,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1640752658424,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}