OpenHistoricalMap / issues

File your issues here, regardless of repo until we get all our repos squared away; we don't want to miss anything.
Creative Commons Zero v1.0 Universal
17 stars 1 forks source link

Upgrade styles to expressions #775

Open 1ec5 opened 2 weeks ago

1ec5 commented 2 weeks ago

The Historic, Railway, Woodblock, and Japanese Scroll styles are all currently using the filter, function, and token syntaxes, which were deprecated in 2017 in favor of expressions. Expressions are required for many newer GL JS features that we’ll need to implement features such as language fallbacks and bilingual labels for #481. Expressions will also help us consolidate style layers, which will allow the tiler to consolidate the tileset’s layers as well, improving performance across the board.

A stylesheet can contain a mix of functions and expressions, but it’s a lot cleaner and less error-prone to migrate everything over to expressions at once. It looks like Maputnik has rudimentary, nonvisual support for editing expressions and converting functions to expressions: maplibre/maputnik#620 maplibre/maputnik#622. If we need a more visual expression editor, Fresco is one alternative. It uses Mapbox GL JS under the hood rather than MapLibre GL JS, though it would be possible to avoid incompatibilities by testing before deployment.

erictheise commented 2 weeks ago

I've got a fair amount of experience coding/converting style expressions manually so keep me in mind as a resource on this issue.