wiki:NamedStylesProposal

Version 1 (modified by sderle, 15 years ago) ( diff )

--

Proposal to implement Named Styles in MapServer

Mapfile Extensions

  • Enable STYLE blocks at the top MAP level
    • Add a NAME directive to the STYLE block
    • Top-level STYLE blocks must be named
MAP   
  .
  .
  .
  • Provide a "named style" declaration in the LAYER block in the form of LAYER "name" (in addition to the existing LAYER ... END syntax)
    • The LAYER object gets instantiated with a copy of the named style from the top level
    • Referencing a non-existent STYLE by name throws an exception
  • Add an INHERITS "style" directive to the STYLE block
    • Block styles that inherit from a named style are instantied as a copy of the named style before other declarations in the STYLE block are applied

MapServer StyleObj Extensions

  • Add a "name" property
  • Add a "global" property
  • Add a "cloneStyle" function to mapfile.c

MapScript Extensions

  • ...
Note: See TracWiki for help on using the wiki.