Hi Geoservites!

I'm doing a project converting ESRI ArcIMS maps to modern
PostGIS/GeoServer/OpenLayers.

I want to add hundreds of autogenerated CSS styles to GeoServer, but the
API seems not to refuse uploading any style that isn't an SLD. I've got the
CSS extension installed and the documentation[1] seems to imply it should
work.

Creating the style works fine:

> curl -u admin:geoserver -XPOST -H 'Content-type: text/xml' -d
> '<style><name>roads_style</name><filename>roads.css</filename></style>'
> http://localhost:8080/geoserver/rest/styles
>

Uploading the CSS file does not:

> curl -u admin:geoserver -XPUT -H 'Content-type: text/css' -d @roads.css
> http://localhost:8080/geoserver/rest/styles/roads_style

> Could not determine format. Try setting the Content-type header.


I've concluded that text/css isn't supported by the API. Which sucks. Does
anyone know otherwise? I'd like to try and patch this if it can be patched.
For now I'm going to convert CSS-SLD before uploading.

Cheers,
Michael

[1] "Other extensions (such as css) add support for additional formats."
http://docs.geoserver.org/stable/en/user/rest/api/styles.html
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to