@versatiles/container
Version:
A client library for reading VersaTiles containers
61 lines (45 loc) • 1.72 kB
Markdown
[](https://www.npmjs.com/package/@versatiles/container)
[](https://www.npmjs.com/package/@versatiles/container)
[](https://codecov.io/gh/versatiles-org/node-versatiles-container)
[](https://github.com/versatiles-org/node-versatiles-container/actions/workflows/ci.yml)
[](LICENSE)
A client library for [VersaTiles containers](https://github.com/versatiles-org/versatiles-spec).
# Install
`npm i @versatiles/container`
# Usage Example
```js
import { Container } from "@versatiles/container";
import fs from "fs";
const container = new Container("https://example.org/planet.versatiles");
const header = await container.getHeader();
const tile = await container.getTileUncompressed(z, x, y);
fs.writeFileSync("tile." + header.tileFormat, tile);
```
# API
You can find a complete documentation of the API at
<https://versatiles.org/node-versatiles-container/>
## Dependency Graph
<!--- This chapter is generated automatically --->
```mermaid
---
config:
layout: elk
---
flowchart TB
subgraph 0["src"]
1["index.ts"]
subgraph 2["lib"]
3["decompress.ts"]
4["reader_file.ts"]
5["reader_http.ts"]
6["interfaces.ts"]
end
end
1-->3
1-->4
1-->5
class 0,2 subgraphs;
classDef subgraphs fill-opacity:0.1, fill:#888, color:#888, stroke:#888;
```
# License
[Unlicense](./LICENSE)