This commit is contained in:
Federico Guizzardi 2016-12-07 04:20:09 +00:00 committed by GitHub
commit 0e66f433e7
2 changed files with 21 additions and 3 deletions

View File

@ -136,7 +136,12 @@ public class RESTResource {
RESTBoundingBox bbox = this.getLatLonBoundingBox();
return bbox.getCRS();
}
public String getSrs(){
return rootElem.getChildText("srs");
}
public double getMinX() {
return this.getLatLonBoundingBox().getMinX();
}

View File

@ -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)),