-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #210. This fills in details that are expected in the `package.json` to better represent the package on npm.
- Loading branch information
1 parent
243d4fa
commit 58e08bf
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# maplibre-tile-spec | ||
|
||
This package contains a JavaScript decoder for the experimental MapLibre Tile (MLT) vector tile format. | ||
|
||
## Install | ||
|
||
`npm install @maplibre/maplibre-tile-spec` | ||
|
||
## Quick Start | ||
|
||
To decode a tile, you will want to load `MltDecoder` and `TileSetMetadata`: | ||
|
||
```js | ||
import { MltDecoder, TileSetMetadata } from '@maplibre/maplibre-tile-spec'; | ||
|
||
const data = fs.readFileSync(tilePath); | ||
const metadata = fs.readFileSync(metadataPath); | ||
const tilesetMetadata = TileSetMetadata.fromBinary(metadata); | ||
const tile = MltDecoder.decodeMlTile(data, tilesetMetadata); | ||
``` | ||
|
||
## Contents | ||
|
||
### Code | ||
|
||
Code is in `src/`. | ||
|
||
### Tests | ||
|
||
Tests are in `test/unit/`. Run tests by running `npm run test`. | ||
|
||
### Benchmarks | ||
|
||
Benchmarks are in `bench/`. Run benchmarks by running `npm run bench`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters