Hello Guy,
I'm replying to the labels question in your post (I'll reply to the
animated drawing bit separately after I've had a think about it).
> For another situation I tried this also but the result wasen't better:
>
> PolygonSymbolizer ps = sb.createPolygonSymbolizer(color1,
> color2, 2);
> FilterFactory ff =
> FilterFactoryFinder.createFilterFactory();
> Font font = FontImpl.createDefault(ff);
> TextSymbolizer ts = sb.createTextSymbolizer(Color.BLACK,
> font, "quartier");
> newStyle.addFeatureTypeStyle(sb.createFeatureTypeStyle(ps));
> MapLayer maplayer = new DefaultMapLayer(sourceM, newStyle);
>
> If there is something I'm doing wrong please just tell me. I need to have
> this project very soon but still stuck on 'basic' issues.
You are creating a TextSymbolizer but don't seem to be using it at
all, ie. you don't pass it into your feature type style along with the
PolygonSymbolizer.
Here is your example modified slightly...
PolygonSymbolizer ps = sb.createPolygonSymbolizer(color1, color2, 2);
Font font = sb.createFont("Serif", 10.0);
TextSymbolizer ts = sb.createTextSymbolizer(Color.BLACK, font,
"quartier");
Rule rule = sb.createRule(new Symbolizer[]{ps, ts});
String typeName = ...
FeatureTypeStyle fts = sb.createFeatureTypeStyle(typeName, rule);
Style newStyle = sb.createStyle();
newStyle.addFeatureTypeStyle(fts);
MapLayer maplayer = new DefaultMapLayer(sourceM, newStyle);
See if that gets better results for you.
Michael
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users