Opened 19 years ago
Closed 15 years ago
#1280 closed enhancement (fixed)
support for named styles
Reported by: | Owned by: | mapserverbugs | |
---|---|---|---|
Priority: | high | Milestone: | FUTURE |
Component: | WMS Server | Version: | 4.8 |
Severity: | minor | Keywords: | |
Cc: | sdlime, schuyler@… |
Description (last modified by )
Currently Mapserver does not support named styles. All styles defined in the MAP file are default styles in WMS terms, requested with &styles= (empty style name). If it would be possible to define styles in Mapserver (not attached to a layer), styles could be re-used for layers. There is already a bug for that (812). Using wms metadata somebody could advertize which named styles he would want to include per layer. I was also thinking if this might solve a problem I have been running into with Chameleon. When drawing a selection, Chameleon needs to request 2 images (2 GetMap requests which can't be combined), one image showing the original map, and one using an SLD to show the selection in red on top of the original map. If we had named styles, could this not be done in one single GetMap request instead of two, combining a NamedStyle and a UserStyle? Or is this not allowed by the SLD spec?
Change History (10)
comment:2 by , 19 years ago
Bart, The support of "default" style was added to accomodate the GetLegendGraphic (Bug 1001). It does not do any style selection on the server side, specifying stles=default is equivallent to syles= (empty style name). (It does not through an excpetion and that is all) Named styles are not supported because the mapserver architectuire does not provide yet the capability to define on a layer a set of classes that are mutually exclusive and where one set of classes can be picked for rendering. You mentionned Bug 812, and that could be a way to resolve this issue.
comment:4 by , 17 years ago
Old, old patch (5-2006) from Schuyler implementing named styles, which we just found when cleaning something up. Attaching patch here so it doesn't get lost. i think schuyler plans on doing some cleanup here, but at least it's here for the future regardless.
comment:5 by , 17 years ago
Cc: | added |
---|---|
Description: | modified (diff) |
comment:6 by , 17 years ago
Cc: | added |
---|---|
Version: | 4.4 → 4.8 |
The patch works slightly better if you run patch with -F3. The idea was to allow STYLE blocks at the top level of the map file, with NAME directives to assign names to them. Then, in the LAYER blocks, one would simply be able to say "STYLE stylename" instead of having a STYLE block. Additionally, I added the INHERITS directive, which imports the style definitions from a named style into the current STYLE block, making it possible to "subclass" named styles. Please let me know if this ticket needs any attention at all on my part to move forward. Thanks!
comment:7 by , 17 years ago
I think we're mixing two things:
1- The original ticket was about supporting OGC SLD styles
2- Schuyler's patch seems to be about supporting named styles in a MapServer mapfile.
OGC styles and MapServer styles share a common name but are different beasts. If I'm not mistaken, an OGC style would be closer to a MapServer class, so supporting named styles means something different in both cases.
I suggest that Schuyler's patch should get its own ticket
comment:9 by , 15 years ago
Could we close this ticket since it was implemented as specified in http://mapserver.org/development/rfc/ms-rfc-39.html#rfc39?
comment:10 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |