HI,

I can't put the TextSymbolizer up. The streets are ok.

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;
    }




 
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to