martin/tests/expected/configured
Yuri Astrakhan a5c5505713
Add dynamic sprites support (#715)
Dynamically create image sprites for MapLibre rendering, given a
directory with images.

### TODO
* [x] Work with @flother to merge these PRs
  * [x] https://github.com/flother/spreet/pull/59  (must have)
  * [x] https://github.com/flother/spreet/pull/57
  * [x] https://github.com/flother/spreet/pull/56
* [ ] https://github.com/flother/spreet/pull/62 (not required but nice
to have, can upgrade later without any code changes)
* [x] Add docs to the book
* [x] Add CLI param, e.g. `--sprite <dir_path>`
* [x] Don't output `.sprites` in auto-genned config when not in use

### API
Per [MapLibre sprites
API](https://maplibre.org/maplibre-style-spec/sprite/), we need to
support the following:
* `/sprite/<sprite_id>.json` metadata about the sprite file - all coming
from a single directory
* `/sprite/<sprite_id>.png` all images combined into a single PNG
* `/sprite/<sprite_id>@2x.json` same but for high DPI devices
* `/sprite/<sprite_id>@2x.png`

Multiple sprite_id values can be combined into one sprite with the same
pattern as for tile joining:
`/sprite/<sprite_id1>,<sprite_id2>,...,<sprite_idN>[.json|.png|@2x.json|@2x.png]`.
No ID renaming is done, so identical names will override one another.

### Configuration
[Config file](https://maplibre.org/martin/config-file.html) and possibly
CLI should have a simple option to serve sprites. The configuration may
look similar to how mbtiles and pmtiles are configured:

```yaml
# Publish sprite images
sprites:
  paths:
    # scan this whole dir, matching all image files, and publishing it as "my_images" sprite source
    - /path/to/my_images
  sources:
    # named source matching source name to a directory
    my_sprites: /path/to/some_dir
```

Implement #705
2023-06-16 08:19:47 -04:00
..
catalog_cfg.json PG TileJSON changes, add vector_layers (#584) 2023-02-22 16:25:48 +00:00
cmp_0_0_0.pbf [breaking] Use table name as the layer ID for PG tables (#598) 2023-03-13 07:41:25 -04:00
cmp_0_0_0.pbf.txt [breaking] Use table name as the layer ID for PG tables (#598) 2023-03-13 07:41:25 -04:00
fnc2_0_0_0.pbf Fix legacy DB, add CI tests (#547) 2023-01-01 05:03:21 +00:00
fnc2_0_0_0.pbf.txt Fix legacy DB, add CI tests (#547) 2023-01-01 05:03:21 +00:00
fnc_0_0_0.pbf Fix legacy DB, add CI tests (#547) 2023-01-01 05:03:21 +00:00
fnc_0_0_0.pbf.txt Fix legacy DB, add CI tests (#547) 2023-01-01 05:03:21 +00:00
pmt_0_0_0.png Add .pmtiles file support (#517) 2023-01-08 14:19:11 -05:00
pmt_0_0_0.png.txt Add .pmtiles file support (#517) 2023-01-08 14:19:11 -05:00
spr_cmp_2x.json Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_cmp_2x.png Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_cmp_2x.png.txt Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_cmp.json Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_cmp.png Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_cmp.png.txt Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_mysrc_2x.json Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_mysrc_2x.png Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_mysrc_2x.png.txt Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_mysrc.json Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_mysrc.png Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_mysrc.png.txt Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_src1_2x.json Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_src1_2x.png Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_src1_2x.png.txt Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_src1.json Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_src1.png Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
spr_src1.png.txt Add dynamic sprites support (#715) 2023-06-16 08:19:47 -04:00
tbl_0_0_0.pbf [breaking] Use table name as the layer ID for PG tables (#598) 2023-03-13 07:41:25 -04:00
tbl_0_0_0.pbf.txt [breaking] Use table name as the layer ID for PG tables (#598) 2023-03-13 07:41:25 -04:00