unvt / charites

It is an application to style vector tiles easily
https://unvt.github.io/charites/
MIT License
55 stars 13 forks source link

Refactor the sprite interface and documentation #146

Open keichan34 opened 1 year ago

keichan34 commented 1 year ago

Is your feature request related to a problem? Please describe.

Currently, the sprite interface is only available in charites build (#143 adds support for charites serve), and it is only available using command line options. Additionally, there is some special logic with the current sprite property and trying to parse its URL when building sprites -- my proposed solution would remove the need for that logic.

Describe the solution you'd like I propose a unified interface for specifying sprite build options in style.yml:

version: 8
metadata:
  "charites:sprites":
    directory: ./icons
    output: ./sprite
    pixel_ratios: [ 1, 2 ]

This is compatible with the Mapbox Style Specification, but probably should be stripped out when compiling the style.json file.

Additionally, a separate page should be added to the documentation regarding the facilities Charites provides for building spritesheets.

Describe alternatives you've considered

Additional context Documentation is currently lacking: see #115