[udig-devel] Default Styles
Jesse Eichar
jeichar at refractions.net
Wed Jul 5 11:28:42 PDT 2006
If you don't mind depending on net.refractions.udig.style.sld you can
use the following snippet to put an SLD on the style blackboard:
layer.getStyleBlackboard().put(SLDContent.ID, mySLD);
I think the object has to be a SLD object. Another thing you could
do is get the default style using:
layer.getStyleBlackboard().get(SLDContent.ID)
and modify that. However if you do that you will have to tell the
layer to update.
Jesse
On 5-Jul-06, at 11:17 AM, Ethan M. Giordano wrote:
> Jesse,
>
> Thanks for that tip, this is going to work perfectly for what I
> need to
> accomplish.
>
> My next issue then is how to create a "style" object and where to
> put it
> on the StyleBlackboard. For these default styles I want to use the
> default renderer for WFS data but just specify the colors/fills/
> opacity
> etc.
>
> I've spent some time going through the uDig source and geotools api
> but
> am coming up short of the answer.
>
> ~Ethan
>
>> -----Original Message-----
>> From: udig-devel-bounces at lists.refractions.net [mailto:udig-devel-
>> bounces at lists.refractions.net] On Behalf Of Jesse Eichar
>> Sent: Wednesday, July 05, 2006 12:42 PM
>> To: User-friendly Desktop Internet GIS
>> Subject: Re: [udig-devel] Default Styles
>>
>> Hi,
>>
>> One way you can accomplish this is to extend the mapInterceptor
>> extension point. It allows an interceptor to be defined that will
>> run each time a layer is added to a map (it also provides
>> interception points at map creation and opening). The layer factory
>> is what is used to create layers. You can also write your own
>> implementation for that, this is much more work though.
>>
>> Jesse
>>
>> On 5-Jul-06, at 8:35 AM, Ethan M. Giordano wrote:
>>
>>> Where do the default styles get created for new layers? I'd like to
> be
>>> able to programmatically assign a default style to a given WFS
> layer.
>>>
>>> ~Ethan Giordano
>>> ________________________
>>> Software Developer
>>> Quantum Leap Innovations
>>> Newark, DE USA
>>> _______________________________________________
>>> User-friendly Desktop Internet GIS (uDig)
>>> http://udig.refractions.net
>>> http://lists.refractions.net/mailman/listinfo/udig-devel
>>
>> _______________________________________________
>> User-friendly Desktop Internet GIS (uDig)
>> http://udig.refractions.net
>> http://lists.refractions.net/mailman/listinfo/udig-devel
> _______________________________________________
> 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