Sorry, I meant GeoTools WMS client, not GeoServer.
I'll try your other suggestion though.
On 26 August 2010 15:20, David Winslow <[email protected]> wrote:
> Assuming that "the GeoServer WMS client" means the OpenLayers preview, you
> can still add a style parameter by hand-editing the URL. I understand that
> there are a number of situations where this is not a useful solution.
>
> I suppose you're already aware, but it should be possible to change the
> default style for the created layer "after the fact" by going into the web
> ui.
>
> Finally, for most resource types the REST API supports "partial" document
> updates, where elements omitted from the uploaded document will be
> unchanged. So you may be able to get away with a string template that just
> inserts the right style name and leaves everything else alone. There have
> been some bugs with this in the past though.
>
> --
> David Winslow
> OpenGeo - http://opengeo.org/
>
> ps: how are you automating this? there are geoserver rest config client
> libraries in Java, Python, Groovy, and PHP floating around that could
> probably make this easy on you.
>
>
> On Thu, Aug 26, 2010 at 10:07 AM, Jon Britton
> <[email protected]>wrote:
>
>> Hi David, thanks for the suggestions. Unfortunately I can't modify my
>> request, as I'm using the GeoServer WMS client, and an exception get's
>> thrown when I create the WebMapServer object.
>>
>> As for your second suggestion, I wouldn't really know how to do this and
>> don't really have time at the moment to really look into it. I'll probably
>> just deal with the XML myself for now.
>>
>> Thanks,
>>
>> Jon
>>
>>
>> On 26 August 2010 13:55, David Winslow <[email protected]> wrote:
>>
>>> Some alternatives:
>>>
>>> * Modify your client to request the "raster" style explicitly when making
>>> WMS requests
>>> * Submit a patch for RESTConfig to setup the style properly (it's already
>>> dealing with the configuration objects, so you can avoid having to parse XML
>>> this way)
>>> * Use .json instead of .xml; depending on the language this may be
>>> simpler to deal with.
>>>
>>> --
>>> David Winslow
>>> OpenGeo - http://opengeo.org/
>>>
>>> On Thu, Aug 26, 2010 at 8:31 AM, Jon Britton <[email protected]
>>> > wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm currently using the REST API to add a GeoTiff to GeoServer.
>>>> However, when I try and access it using WMS it doesn't work because it has
>>>> no default style. The only way I can think of is to GET the layers XML,
>>>> add
>>>> the default style then PUT the XML back. This would require some XML
>>>> parsing though, which I'd rather avoid if I can. Is there a simpler way of
>>>> doing this?
>>>>
>>>> Thanks,
>>>>
>>>> Jon
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
>>>> Be part of this innovative community and reach millions of netbook users
>>>> worldwide. Take advantage of special opportunities to increase revenue
>>>> and
>>>> speed time-to-market. Join now, and jumpstart your future.
>>>> http://p.sf.net/sfu/intel-atom-d2d
>>>> _______________________________________________
>>>> Geoserver-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>>
>>>>
>>>
>>
>
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users