To my knowledge the only way to set a style for a newly uploaded coverage is
to send a second HTTP request, something like:
PUT .../rest/layers/{layername}.xml
<layer>
<defaultStyle><name>{stylename}</name></defaultStyle>
<enabled>true</enabled>
</layer>
I didn't check the format for the XML document, try a GET request to see an
example.
--
David Winslow
OpenGeo - http://opengeo.org/
On Sun, Apr 24, 2011 at 9:50 PM, ahwangyuwei <[email protected]> wrote:
> Hello.
> I am adding a coverage store ,*meanwhile* add the coverage using
> curl http request.
> My program is like
> "curl",
> "-u", "foo:bar",
> "-v",
> "-XPUT",
> "-H", "Content-type:text/plain",
>
> "-d", "file:/usr/geoserver-1.7.6/data_dir/coverages/testrest/temp.tif",
>
> http://159.226.13.203:8080/geoserver/rest/workspaces/CAS/coveragestores/temp/external.geotiff?configure=first&coverageName=
> temp&defaultStyle=QinghaiLake_temperature"
>
> This seems to be appropriate,and the *coveragestore and coverage can be
> added at the same time.
> But the style can not Is normally set.
> Is the parameter(defaultStyle) wrong? should I use other parameter ,such
> as style ,DefaultStyle ?
> I also would like to ask what is the meaning of this parameter
> (configure), I see it can be set as first or all?
> Thanks for any advice.
> Wang
> CNIC ,CAS
>
> *
> 2011-04-25
>
>
> ------------------------------------------------------------------------------
> Fulfilling the Lean Software Promise
> Lean software platforms are now widely adopted and the benefits have been
> demonstrated beyond question. Learn why your peers are replacing JEE
> containers with lightweight application servers - and what you can gain
> from the move. http://p.sf.net/sfu/vmware-sfemails
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been
demonstrated beyond question. Learn why your peers are replacing JEE
containers with lightweight application servers - and what you can gain
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users