Changes between Version 2 and Version 3 of NamedStylesProposal


Ignore:
Timestamp:
Mar 10, 2009, 7:29:23 AM (15 years ago)
Author:
sderle
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NamedStylesProposal

    v2 v3  
    1 = Proposal to implement Named Styles in MapServer =
     1= A proposal to implement named styles in MapServer =
     2
     3== Proposed Map File Syntax Example ==
     4
     5{{{
     6MAP
     7  STYLE
     8    NAME "some_style"
     9    ...
     10  END
     11  ...
     12  LAYER
     13    NAME "uses_a_style"
     14    CLASS
     15       # use a name instead of a block
     16       STYLE "some_style"
     17       ...
     18    END
     19  END
     20  LAYER
     21    NAME "extends_a_style"
     22    CLASS
     23      STYLE
     24        # inside a style block, pull in properties from another style
     25        # then make custom changes for this LAYER/CLASS
     26        EXTENDS "some_style"
     27        ...
     28      END
     29    END
     30  END
     31END
     32}}}
    233
    334== Mapfile Extensions ==
     
    1445   * 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
    1546
    16 == Proposed Map File Syntax Example ==
    17 
    18 {{{
    19 MAP
    20   STYLE
    21     NAME "some_style"
    22     ...
    23   END
    24   ...
    25   LAYER
    26     NAME "uses_a_style"
    27     CLASS
    28        STYLE "some_style"
    29        ...
    30     END
    31   END
    32   LAYER
    33     NAME "extends_a_style"
    34     CLASS
    35       STYLE
    36         EXTENDS "some_style"
    37         ...
    38       END
    39     END
    40   END
    41 END
    42 }}}
    43 
    44 
    4547== MapServer `StyleObj` Extensions ==
    4648
    47  * Add a "name" property
    48  * Add a "global" property
     49 * Add a "name" property to styleObj
     50 * Add a "shared" property to styleObj
     51   * Exporting a map file would emit all styleObjs with style.shared set to true at the top level
    4952 * Add a "cloneStyle" function to mapfile.c
     53   * This would be the programmatic interface for `EXTENDS`
     54   * cloneStyle would presumably copy a top-level style and set the new object's `shared` property to false
    5055
    5156== MapScript Extensions ==
    5257
    53  * ...
     58 * ...?