martin/mbtiles
Yuri Astrakhan 3dc54d7f9e
Implement tile caching (#1105)
Add a top level config parameter -- the size of cache memory (in MB) to
use for caching tiles and PMT directories, defaulting to 512, and 0 to
disable. This also removes the `pmtiles.dir_cache_size_mb` parameter (it
will be ignored, but will give a warning)

```
cache_size_mb: 512
```

The new cache will contain all tiles as provided by the source. So if
PostgreSQL returns a non-compressed tile, the cache will contain the
uncompressed variant, and will be compressed for each response. This
will be fixed in the later releases.

Note that fonts and sprites are not cached at this time, and are still a
TODO.
2023-12-30 22:48:23 -05:00
..
.sqlx Improve mbtiles update, update min/max zoom on martin-cp (#1096) 2023-12-24 17:30:45 +08:00
src Deprecate few things, lock and lints (#1111) 2023-12-30 12:47:23 -05:00
tests Improve mbtiles update, update min/max zoom on martin-cp (#1096) 2023-12-24 17:30:45 +08:00
.env Rename martin-mbtiles crate to mbtiles (#976) 2023-10-28 08:50:49 +00:00
Cargo.toml Implement tile caching (#1105) 2023-12-30 22:48:23 -05:00
README.md doc links 2023-12-25 01:49:39 -05:00

mbtiles

Book docs.rs docs GitHub crates.io version CI build

A library to help tile servers like Martin work with MBTiles files. When using as a lib, you may want to disable default features (i.e. the unused "cli" feature).

This crate also has a small utility that allows users to interact with the *.mbtiles files from the command line. See tools documentation for more information.

Development

Any changes to SQL commands require running of just prepare-sqlite. This will install cargo sqlx command if it is not already installed, and update the ./sqlx-data.json file.

License

Licensed under either of

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.