-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade styles to expressions #775
Comments
I've got a fair amount of experience coding/converting style expressions manually so keep me in mind as a resource on this issue. |
Any update or progress on this ticket? I'm feeling like we're getting closer to some multilingual labels (#481). |
@erictheise could take a look at this commit OpenHistoricalMap/map-styles@2cfb70c and make any recommendations for next steps. |
Is there any sort of eta for this being completed, or how much progress has been made so far? |
Once this is complete, we’ll need to update all the time slider implementations to manipulate a filter based on an expression instead of a legacy function, as outlined in gramps-project/gramps-web#454 (comment). This would be a good opportunity to factor out a plugin for date filtering: #840. |
Looking at the last comment from @1ec5 , it seems possible that the bare minimum for adapting the timeslider would be an edit to a single line of code, though I would need to confirm that with @gregallensworth If true, that would be simpler/faster, if not as robust and useful, as the ask in #840 to make and publish a node module for date filtering. |
Updating this ticket - Last week, Tim wrapped up converting all functions to expressions |
at our carto meeting, @vknoppkewetzel indicated this work is complete & @1ec5 reminded us that this should break the timeslider, which uses the older filters. So, it seems like the completion of this ticket bumps up the priority of this fix: As well as the priority of these tickets supporting new features: In addition, we should identify other possible performance improvements enabled by the expressions upgrade:
etc. |
This work is not complete. As of OpenHistoricalMap/map-styles@1179bee, the style functions have been converted to expressions. However, every Additionally, as far as I can tell, no filter has been converted to use expressions yet. (It’s the conversion of filters that would need to be coordinated with a fix for #855.) Once all this work is complete, we can track combining style layers for better performance as a separate task. |
Thanks @1ec5 we will take a look at this and resolve those, thanks for catching |
MapLibre publishes a command line tool, |
🎉 |
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.
The text was updated successfully, but these errors were encountered: