Changes between Version 2 and Version 3 of NamedStylesProposal
- Timestamp:
- Mar 10, 2009, 7:29:23 AM (15 years ago)
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 {{{ 6 MAP 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 31 END 32 }}} 2 33 3 34 == Mapfile Extensions == … … 14 45 * 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 15 46 16 == Proposed Map File Syntax Example ==17 18 {{{19 MAP20 STYLE21 NAME "some_style"22 ...23 END24 ...25 LAYER26 NAME "uses_a_style"27 CLASS28 STYLE "some_style"29 ...30 END31 END32 LAYER33 NAME "extends_a_style"34 CLASS35 STYLE36 EXTENDS "some_style"37 ...38 END39 END40 END41 END42 }}}43 44 45 47 == MapServer `StyleObj` Extensions == 46 48 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 49 52 * 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 50 55 51 56 == MapScript Extensions == 52 57 53 * ... 58 * ...?