Hello,

I am trying to change the style associated with a Shapefile.
I created a new style using graphical interface and I entered it in the list
of styles.

The steps to add a new style in Geoserver, using graphics interface are:
- Select "Style";
- "Add new style";
- Insert name and its text;
- Press "Submit".

Now the new style is in the style list.

Then, if I join the style to my layer directly through interface of
Geoserver 2.02 I am able to visualize it.
In particular, the steps are:
- Select "Layers";
- Choose a layer and click on its name;
- Select "Publishing" and change "Default Style" to the new style.

If instead, I use the example in the documentation layer becomes "not
enabled" and then I can not see it.
Precisely, the example is this:
http://docs.geoserver.org/stable/en/user/extensions/rest/rest-config-examples-curl.html
(section Changing a feature type style)

and the command used is:

"curl -u admin:geoserver -XPUT -H 'Content-type: text/xml' -d
'<layer><defaultStyle><name>roads_style</name></defaultStyle></layer>'
http://localhost:9090/geoserver/rest/layers/acme:roads";

where: roads_style is created style; acme is the workspace and roads is the
layer name.

I think that it's an issue related to the update of the layer but currently
I don't know how I can resolve it.

I also have another question: in Geoserver 2.02 to change the style to layer
I must necessarily create layer first and then change its default style?
Precisely, I have to create the layer with this command:

curl -u admin:geoserver -XPOST -H 'Content-type: text/xml' \
  -d '<featureType><name>buildings</name></featureType>' \

http://localhost:8080/geoserver/rest/workspaces/acme/datastores/nyc/featuretypes

and the I change the style (with curl) as above.

Furthermore, I have the same problem with Raster; I can publish them but I
can not change them style.

Do you have any suggestions?

Thank you.

Babi

2010/8/18 Jody Garnett <[email protected]>

> You may wish to report a bug; it would help if you list the steps to show
> the problem with the default geoserver dataset (allowing a developer to
> confirm your actions). It also helps to keep to one question per email;
> there are a couple of good guides with respect to asking questions online.
>
> Cheers,
> Jody
>
> On 06/08/2010, at 7:14 PM, Barbara Cintoli wrote:
>
> Hello,
>
> I am trying to change the style associated with a Shapefile.
> I created a new style using graphical interface and I entered it in the
> list of styles.
>
> If I join the style to my layer directly through interface of Geoserver
> 2.02 I am able to visualize it.
> If instead, I use the example in the documentation layer becomes "not
> enabled" and then I can not see it.
>
> The command used is:
>
> "curl -u admin:geoserver -XPUT -H 'Content-type: text/xml' -d
> '<layer><defaultStyle><name>roads_style</name></defaultStyle></layer>'
> http://localhost:9090/geoserver/rest/layers/acme:roads<http://www.google.com/url?sa=D&q=http://localhost:9090/geoserver/rest/layers/acme:roads&usg=AFQjCNGU51B9i4ZGYgbdqcWwWF3xXUzuFg>"
>
>
> where: roads_style is created style; acme is the workspace and roads is the
> layer name.
>
> I think that it's an issue related to the update of the layer but currently
> I don't know how I can resolve it.
>
> I also have another question: in Geoserver 2.02 to change the style to
> layer I must necessarily create layer first and then change its default
> style?
>
> Furthermore, I have the same problem with Raster; I can publish them but I
> can not change them style.
>
> Do you have any suggestions?
>
> Thank you.
>
> Babi
>
>
>
>
> Devo utilizzare Rest per far comunicare la web application con
> Geoserver 2.02!
> Ho lo stesso problema con i Raster; riesco a fare l'upload ma non
> riesco a settargli lo style.
> Avete qualche suggerimento?
> Grazie
>
>
> --
> Barbara Cintoli
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by
>
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev_______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
>


-- 
Barbara Cintoli
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to