Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Point symbolizer questions

The following page has some links and examples:
- http://udig.refractions.net/confluence/display/EN/Style+Layer+Descriptor

The examples may be in xml format but you can sort that into java code.

Jody

On 08/09/2009, at 6:52 PM, Rui Alves wrote:

Hi,

Thank you for your answers.
Can you give me an example (code snippet) on how to use an external graphic.

Thank you and regards,

Rui Alves

On Tue, Sep 8, 2009 at 02:43, Jody Garnett <jody.garnett@xxxxxxxxx> wrote:
Some comments inline...


On 08/09/2009, at 10:50 AM, Rui Alves wrote:

Hi,

I am using uDig 1.1.1 and I need to represent programaticaly a point on a layer as an image.
I can represent it as a Circle for example with the code bellow.

Question 1)
Is this the correct way to do it?

That seems fine; there are a couple utility methods to help such as the class "SLDs".


Question 2)
At the end I have 3 lines of code that I use to assign the style to the layer. Which one should I use? I try several combinations and all of them seems to work!
 sld.addFeatureTypeStyle(fts[0]);
 sld.setFeatureTypeStyles(fts);
 actLayer.getStyleBlackboard().put(SLDContent.ID, pointStyle);

You need to put a style object on the blackboard.


Question 3)

How should I change the could if I want to use an image like a JPG or an ICON to represent the point instead one of the pre-defined symbols?

use an external graphic rather then a mark.

Best of luck,
Jody

_______________________________________________
&#39;ll try ask the user more about that, but wondered if anyone has seen s=
omething like this before, and had any ideas on how to debug it? I often de=
bug uDIG code, but have not (yet) gone into Geotools.<br>
<br>Regards, Craig<br>

--0016369fa383f889e50473691065--


Back to the top