Changes between Version 1 and Version 2 of NamedStylesProposal
- Timestamp:
- Mar 10, 2009, 7:23:50 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NamedStylesProposal
v1 v2 7 7 * Top-level `STYLE` blocks ''must'' be named 8 8 9 {{{10 MAP11 .12 .13 .14 }}}15 16 9 * Provide a "named style" declaration in the `LAYER` block in the form of `LAYER "name"` (in addition to the existing `LAYER ... END` syntax) 17 10 * The `LAYER` object gets instantiated with a ''copy'' of the named style from the top level 18 11 * Referencing a non-existent `STYLE` by name throws an exception 19 12 20 * Add an ` INHERITS "style"` directive to the `STYLE` block13 * Add an `EXTENDS "style"` directive to the `STYLE` block 21 14 * 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 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 22 44 23 45 == MapServer `StyleObj` Extensions ==