openmaptiles icon indicating copy to clipboard operation
openmaptiles copied to clipboard

Dynamic style generation

Open nyurik opened this issue 4 years ago • 1 comments

I would like to start a discussion on how we can do style modifications based on the layer data. There are multiple discussions on how to change the layer structure and provide optional layers (#1178), so I think it would make sense to have a way to dynamically alter the styles based on the layer choices.

There are many styles for the layers we already have, so we need to figure out how to organize it properly.

One way would be to move all styles into OMT repository, and break them up based on layers. This will ensure that the style version is always matched up the underlying data, and will allow each layer to contribute to the style independently. Some unknowns include feature ordering - how to decide which features of which layer go on top.

/styles
  # non-layer-specific style data
  osm-bright.yaml
  positron.yaml
/layers
  /airport
    /icons   # could be shared between different styles, or can have a style-specific directory if needed
      airfield_11.svg
    # layer-specific portions for the well known styles
    osm-bright.yaml
    positron.yaml

nyurik avatar Sep 18 '21 19:09 nyurik

The description is not really about "dynamic style generation", it's more about having changes to the schema and changes to the styles unified in a single repository. I think that's a great idea.

I would actually go one step further and also include the www.openmaptiles.com website repository in the main openmaptiles repo also. If I change the functionality in the schema, the web-facing documentation should updated in the same PR, not deferred to a separate repo/PR process.

ZeLonewolf avatar Sep 18 '21 23:09 ZeLonewolf