Thank you Matt and apreciado! I think I'm getting the hang of it. Wish
my precipitation for Ethiopia looked better. But, that's not really a
software problem ;)
Thanks!
Greg
Greg Ederer wrote:
> Hi,
>
> I am new to GeoTools. I need to render point features in a JMapPane
> with each point represented by a dot with some adjacent text (the value
> of a feature attribute). I can render the dots using:
>
> private static Style createPointStyle()
> {
> Style style;
> PointSymbolizer symbolizer = styleFactory.createPointSymbolizer();
> symbolizer.getGraphic().setSize(filterFactory.literal(1));
> Rule rule = styleFactory.createRule();
> rule.setSymbolizers(new Symbolizer[]
> {
> symbolizer
> });
> FeatureTypeStyle fts = styleFactory.createFeatureTypeStyle();
> fts.setRules(new Rule[]
> {
> rule
> });
> style = styleFactory.createStyle();
> style.addFeatureTypeStyle(fts);
> return style;
> }
>
> or
>
> public Style createStyleFromScratch()
> {
>
> /* Point style from scratch */
> StyleBuilder builder = new StyleBuilder();
> Mark mark = builder.createMark("circle", Color.RED);
> Graphic g = builder.createGraphic(null, mark, null);
> Symbolizer s = builder.createPointSymbolizer(g);
>
> Style memStyle = builder.createStyle(s);
>
> return memStyle;
>
> }
>
> I've been experimenting with both TextMark and TextSymbolizer without
> success. Does anyone know how to do it?
>
> Thanks!
>
> Greg
>
>
--
| E R G O N O S I S
| Greg Ederer
| Lead Developer
| [EMAIL PROTECTED]
| 360.774.6848
|
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users