{"name":"pmtiles","version":"0.2.1","author":{"name":"Brandon Liu"},"license":"BSD-3-Clause","_id":"pmtiles@0.2.1","homepage":"https://github.com/protomaps/pmtiles","dist":{"shasum":"c47c71d87b8fe106a03d521389eee046e8ef1be0","tarball":"http://registry-npm.ywwl.com/pmtiles/download/pmtiles-0.2.1.tgz","fileCount":3,"integrity":"sha512-RJaXj1wuQoMn56osbBxtiRS1nHlYrwQg1+cuRTHguUgLJ3zc9B14p+3I3KnxPcoLEjlJOWmV5A/nwq7SEICCeA==","signatures":[{"sig":"MEUCIQDKjUMQM/W6hzBLVYzxKkdXqIxURLLRNGjNWxI80SU9zwIgUOlfADGSh0KMQZs6j+3FwWJAPGP088PBTPtq/TxfTnA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgl1SyCRA9TVsSAnZWagAAlGoP/jp2w7dH4jbO8KwXAAq9\nkTRdo3m5PjtS7C2Gb73K1KF5IXC7RzcluU6ouUHWJGRFB3PrChcmeX0eFO9d\nPMtsMatuDSjy8lBWc5PL9ehq/EpdlcXcuTgeaRbeRetO98gP0CkDCDyfnC5Z\ns7MVX+3MNZdoJl+0qqkxdoS6+wrzt4RfQq6IeqMlrHgWMZaPQ/EmuIacPo5J\nqtc5gsy5oh3xSLA8NUiRhESLVVKiXDYXYwdR+8yYJC8BefXu22jOJxCaSvgv\nHXRJwBGEeGsTiZUdbvqfIGCEP9Xul9CeTIPsE3AsFY8fF2q9x7eu2I986WjW\nO+CX0xkhlRhsmRQsvaoMNrdiVzq3EuQaFiOIYXxwGx8ycqruHONykUNHw+T4\nqM3p5lIax55SCmrIg51L4j7OoL3UCcd1+IMkcsds55QfNm5zb5mOpPCggdU/\njQ8JCmKfZwnbA87s1/2Hv5qkpMWSCJZBFAIGsGfCXTIfuH2jYWsSHaHfgJlv\n5vFD8XuC5upvxWoV8FLhe6ixKVZb+F4XN8RS1TzwaobfiOn/H6P3aZsTP50Y\nVgffTsvDnNFNXed7ng7PFrkKaW7y8/K2H15Bs3yb44lWu53p7NSWWTMpROnC\npmToayOTiBWZ04xTXHfwjH1WGU28rUzcn1LNUzIB2X59NxdMKndwMcAKStao\n72c7\r\n=zUZA\r\n-----END PGP SIGNATURE-----\r\n","size":3642,"noattachment":false,"key":"/pmtiles/-/pmtiles-0.2.1.tgz"},"main":"index","unpkg":"index.js","module":"index.mjs","scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"esbuild index.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.2.1_1620530353843_0.32655973957938844","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":1620530353997,"maintainers":[{"name":"bdon","email":"bdon@bdon.org"}],"_cnpm_publish_time":1620530353997,"dist-tags":{"beta":"3.0.0-alpha.2","latest":"4.5.0"}}