[udig-devel] Send SLDs to a WMS
Jesse Eichar
jeichar.w at gmail.com
Mon Apr 28 00:28:37 PDT 2008
We also welcome a patch uDig. Sounds like what you need are:
1. A new Style Configurator
2. A patch to the WMS Renderer
There is information about styling and style configurator here:
http://udig.refractions.net/confluence/display/DEV/05+Style
On fairly simple example of a style and style configurator is the
LocationStyleConfigurator and its associated LocationStyleContent
Jesse
On 25-Apr-08, at 7:38 PM, Jody Garnett wrote:
> Joe Dente wrote:
>> Thanks for the responses.
>>
>> I have SLDs that are available in a web folder, so I simply need to
>> hook
>> them in as a vender specific parameter for the GetMaps call. I was
>> looking for an easy insertion point for the "SLD=http..." vender
>> specific parameter. I was having trouble in that there did not
>> appear
>> to be any place to set vender specific parameters on the Layer,
>> StyleBlackboard, or WMSServiceImpl; nothing within my client code
>> could
>> effectively change the URL of the GetMap request that is created.
>>
> The style blackboard is open ended; you can ...
> 1. Store your SLD URL on the blackboard using your own
> ("external_sld" ? )
> 2. Create a StyleConfigurator allowing the user to choose one of the
> files in your web folder (literally show the webfolder in a browser
> widget and intercept the click)
> 3. Copy the BasicWMSRenderer and create a new one that is only used
> when the "external_sld" key is present ....
>> My solution right now is to supply my own renderer through the
>> net.refractions.udig.project.renderer extension point. Within the
>> renderer, the GetMapRequest is created. My renderer is identical to
>> BasicWMSRenderer2 except that I add in the SLD Vendor Specific
>> parameters on the GetMapRequest call after it is created.
>>
> Lol - so you are through the hard part.
>> While my solution works using only an extension so that I don't
>> need to
>> modify udig code, it is less than ideal. I would prefer if I could
>> add
>> these additional parameters to the StyleBlackboard or to the Layer
>> and
>> then these additional parameters would get added to the GetMapRequest
>> call when it is created by the renderer. Is there a better place to
>> insert additional parameters?
>>
> Adding your own parameters to the style blackboard and allowing
> customer renderers is the correct way. Your use case is *exactly*
> why the application is structured this way...
> Jody
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
More information about the udig-devel
mailing list