Or do I need to edit directly the XML config files, to change the defaultStyle of the Layer?
Michal Dne 08.04.2013 22:02, [email protected] napsal: > I am attaching the GeoServer log and my own log, where the ruests > and responses are recorded. My attention was caught by the following > lines: > > 2013-04-08 19:35:24,358 DEBUG [catalog.impl] - Warning, some code is > setting the LayerInfo name, but that will be ignored > 2013-04-08 19:35:24,358 DEBUG [geoserver.config] - Persisting layer > line_crs > 2013-04-08 19:35:24,359 DEBUG [geoserver.config] - Persisted > org.geoserver.catalog.impl.LayerInfoImpl to > /data/geoserver/data/workspaces/dragouni/line_crs/line_crs/layer.xml > 2013-04-08 19:35:24,359 DEBUG [gwc.layer] - Handling modify event for > LayerInfoImpl[line_crs, resource:FeatureTypeInfoImpl[line_crs]] > 2013-04-08 19:35:24,361 DEBUG [geoserver.config] - Persisted > sun.proxy.$Proxy506 to /data/geoserver/data/global.xml > 2013-04-08 19:35:24,361 INFO [catalog.rest] - PUT layer > dragouni:line_crs > > But I am not sure, what exactly that means. > > I am aware, that I am not allowed to change the name or resource of > the layer (in such a case I would expect status code 403), but should > it be possible to change the defualtStyle? > > Michal > > > > Dne 08.04.2013 18:48, [email protected] napsal: >> Dear all, >> >> I cannot change the default style of a layer using the REST API. >> >> I GET the Layer, change some values and PUT it back, get 200 OK. >> Other >> things are nicely changed, but the 'defaultStyle' is not. >> >> It goes like this: >> >> GET Layer: >> >> >> {"layer":{"name":"line_crs","type":"VECTOR","defaultStyle":{"name":"line","href":"http:\/\/erra.ccss.cz:8080\/geoserver\/rest\/styles\/line.json"},"resource":{"@class":"featureType","name":"line_crs","href":"http:\/\/erra.ccss.cz:8080\/geoserver\/rest\/workspaces\/dragouni\/datastores\/line_crs\/featuretypes\/line_crs.json"},"enabled":true,"attribution":{"logoWidth":0,"logoHeight":0}}} >> >> PUT Layer: >> >> {"layer": {"resource": {"href": >> >> "http://erra.ccss.cz:8080/geoserver/rest/workspaces/dragouni/datastores/line_crs/featuretypes/line_crs.json", >> >> "name": "line_crs", "@class": "featureType"}, "name": "line_crs", >> "enabled": "false", "defaultStyle": {"href": >> >> "http://erra.ccss.cz:8080/geoserver/rest/workspaces/dragouni/styles/line_crs.json", >> >> "name": "line_crs"}, "advertised": "false", "attribution": >> {"logoWidth": "11", "logoHeight": "12"}, "type": "VECTOR", >> "queryable": >> "false"}} >> >> response: 200 OK >> >> GET Layer: >> >> >> {"layer":{"name":"line_crs","type":"VECTOR","defaultStyle":{"name":"line","href":"http:\/\/erra.ccss.cz:8080\/geoserver\/rest\/styles\/line.json"},"resource":{"@class":"featureType","name":"line_crs","href":"http:\/\/erra.ccss.cz:8080\/geoserver\/rest\/workspaces\/dragouni\/datastores\/line_crs\/featuretypes\/line_crs.json"},"enabled":false,"advertised":false,"queryable":false,"attribution":{"logoWidth":11,"logoHeight":12}}} >> >> So enable, advertised, queryable, attribution logoWidth and >> logoHeight >> have changed, the default style has not. I have checked the provided >> style link in the browser, it works. I have assigned the style in >> the >> web interface a get the expected result: >> >> >> {"layer":{"name":"line_crs","type":"VECTOR","defaultStyle":{"name":"line_crs","href":"http:\/\/erra.ccss.cz:8080\/geoserver\/rest\/workspaces\/dragouni\/styles\/line_crs.json"},"resource":{"@class":"featureType","name":"line_crs","href":"http:\/\/erra.ccss.cz:8080\/geoserver\/rest\/workspaces\/dragouni\/datastores\/line_crs\/featuretypes\/line_crs.json"},"enabled":false,"advertised":false,"queryable":false,"attribution":{"logoWidth":11,"logoHeight":12}}} >> >> I am using GeoServer 2.3-RC1. Any suggestions are welcome. >> >> Thank you in advance, >> >> Michal >> >> >> >> >> ------------------------------------------------------------------------------ >> Minimize network downtime and maximize team effectiveness. >> Reduce network management and security costs.Learn how to hire >> the most talented Cisco Certified professionals. Visit the >> Employer Resources Portal >> http://www.cisco.com/web/learning/employer_resources/index.html >> _______________________________________________ >> Geoserver-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/geoserver-users ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
