Ticket #548 (closed enhancement: fixed)
processTemplate
| Reported by: | sgillies@… | Owned by: | sgillies@… |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | MapScript | Version: | 4.1 |
| Severity: | minor | Keywords: | |
| Cc: | tmelhuish@… |
Description
MapScript should support multiple class styles, this requires methods to get
styles from the array in the parent classObj, and a method to add new styles
to the array.
Currently, the way this is done for layerObj and classObj instances is
like so:
new_classobj = mapscript.classObj(layerobj)
The "parent" node is passed to the class constructor as the single argument.
I really disagree with this usage and think that for the styleObj it should
instead be:
new_style = mapscript.styleObj() # created without a parent
classobj.appendStyle(new_style) # explicitly add it to the parent
If the styleObj constructor takes _any_ argument at all, it should be a
map file fragment like
new_style = mapscript.styleObj('STYLE\nCOLOR 0 0 0\nEND')
This is just my opinion, and breaks from the old way, but could lead to
better classes in the future. I'd like to get some feedback before I
start.
Change History
Note: See
TracTickets for help on using
tickets.
