Changed layergroup xml encorer to allow nesting layergroups
This commit is contained in:
parent
bd6bab3ddb
commit
3dc8745757
@ -61,9 +61,11 @@ public class GSLayerGroupEncoder extends PropertyXMLEncoder {
|
||||
}
|
||||
|
||||
public void addLayer(String layer, String styleName) {
|
||||
initPublishables("layers");
|
||||
initPublishables("publishables");
|
||||
Element e = elem("published", elem("name", layer));
|
||||
e.setAttribute("type", "layer");
|
||||
|
||||
publishablesElem.addContent(elem("layer", elem("name", layer)));
|
||||
publishablesElem.addContent(e);
|
||||
|
||||
Element style = new Element("style");
|
||||
stylesElem.addContent(style);
|
||||
@ -72,6 +74,17 @@ public class GSLayerGroupEncoder extends PropertyXMLEncoder {
|
||||
}
|
||||
}
|
||||
|
||||
public void addLayerGroup(String layer) {
|
||||
initPublishables("publishables");
|
||||
Element e = elem("published", elem("name", layer));
|
||||
e.setAttribute("type", "layerGroup");
|
||||
|
||||
publishablesElem.addContent(e);
|
||||
|
||||
Element style = new Element("style");
|
||||
stylesElem.addContent(style);
|
||||
}
|
||||
|
||||
public void setBounds(String crs, double minx, double maxx, double miny, double maxy) {
|
||||
boundsElem = elem("bounds",
|
||||
elem("minx", Double.toString(minx)),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user