HI,
I can't put the TextSymbolizer up. The streets are ok. Using gt2-2.4 m2
Thank you for any help.
the source
public void criarMapa(){
CoordinateReferenceSystem crs = DefaultGeographicCRS.WGS84;
context = new DefaultMapContext(crs);
try {
context.addLayer(data.getFeatureSource(name),testeEstiloTexto(name));
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
telaMapa.getJPanelMapa().setContext(context);
renderer = new StreamingRenderer();
renderer.setContext(context);
telaMapa.getJPanelMapa().setRenderer(renderer);
telaMapa.getJPanelMapa().setMapArea(context.getAreaOfInterest());
telaMapa.getJPanelMapa().setMudouMapa(true);
telaMapa.getJPanelMapa().repaint();
}
private Style testeEstiloTexto(String string) {
// TODO Auto-generated method stub
StyleBuilder sb = new StyleBuilder();
PolygonSymbolizer ls2 = sb.createPolygonSymbolizer(Color.BLACK, 1);
org.geotools.styling.Font font = sb.createFont(new Font(Arial,
Font.BOLD, 30));
TextSymbolizer tsArch = sb.createTextSymbolizer(Color.RED, font,name);
tsArch.setHalo(sb.createHalo(Color.WHITE, 1, 2));
Rule archRule = sb.createRule(new Symbolizer[] {tsArch, ls2});
Style archStyle = sb.createStyle();
archStyle.addFeatureTypeStyle(sb.createFeatureTypeStyle(string,
archRule));
return archStyle;
}
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users