Styling and Marking in map layers

1 message Options
Embed this post
Permalink
deneth

Styling and Marking in map layers

Reply Threaded More More options
Print post
Permalink
dear all ;

 For the last few days i was working with geotools for dynamically generating maps. I successfully managed doing that. But im facing a simple problem. I want to color the points in a different color and paint the points in different mark. In painting the points in the relavant color i tried the following.

Style style;

        PointSymbolizer symbolizer = styleFactory.createPointSymbolizer();
        symbolizer.getGraphic().setSize(filterFactory.literal(2));
        SLD.setPointColour(symbolizer, Color.RED);
      
        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;


Actually used what was in an example. But this didnt work. Still Im getting the default colors for my points. In addition how can i add custom marks for points.

best regards
deneth

------------------------------------------------------------------------------

_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users