Style: make fallback configurable in CLASS#7309
Conversation
|
thanks @PatrikSylve (ignore the "Check CRLF" action error, there is a known problem with its Docker image, I may disable this action shortly) |
|
Realized I had missed to commit maplexer.c. Will fix |
|
@PatrikSylve - just to understand further - this PR exposes a property |
Correct. The And the logic on how fallback class is applied is implemented in |
|
@PatrikSylve - thanks for the PR. It will need an accompanying documentation PR in https://github.com/MapServer/MapServer-documentation to the CLASS docs with the new keyword, and ideally https://mapserver.org/ogc/sld.html to get this merged. |
|
Unless there are any further comments or objections, I'll merge this in the next couple of days. Thanks @PatrikSylve! |
When applying a SLD style containing 'Else'-filter, the Else-class will be marked as 'fallback' in Mapserver to ensure this class is used if and only if no other class is applicable.
This MR enables the fallback property to be configured in the mapfile using:
This makes it possible to reproduce the SLD behavior using
FALLBACKtogether withRENDERMODE=ALL_MATCHING_CLASSES.I also updated the
writeClassmethod to writeFALLBACKand the rendermode directive to keep the SLD behavior intact when mapscript is used to produce mapfiles that have had SLD applied: