Hi, i am starting to work with gt-2.5-m2 and therefore doing some basic learning. Unfortunately i am stuck. What i am doing: I created three FeatureCollections, one for lines, one for points and one for areas. Than created styles for ech feature-type, and finally adding the styles to a mapcontext:
// point style StyleBuilder builder = new StyleBuilder(); Mark mark = builder.createMark("circle", Color.RED); Graphic g = builder.createGraphic(null,mark,null); PointSymbolizer s = builder.createPointSymbolizer( g ); Style pointStyle = builder.createStyle( s ); // line style LineSymbolizer lsy = builder.createLineSymbolizer( Color.BLACK, 1); Style lineStyle = builder.createStyle(lsy); // area style PolygonSymbolizer ps = builder.createPolygonSymbolizer( new Color( 200,100,100 ) ); Style areaStyle = builder.createStyle(ps); GraphicEnhancedMapContext map = new GraphicEnhancedMapContext(DefaultGeographicCRS.WGS84) ; map.addLayer( new DefaultMapLayer( points, pointStyle ) ); map.addLayer( 1, new DefaultMapLayer( lines, lineStyle ) ); map.addLayer( 2, new DefaultMapLayer( areas, areaStyle )); Rectangle outputArea = new Rectangle(width,height); // Paint Area Envelope mapArea = new Envelope( vp.getMinLon(), vp.getMaxLon(), vp.getMinLat(), vp.getMaxLat() ); GTRenderer renderer = new StreamingRenderer(); renderer.setContext(map); try { renderer.paint(g2, outputArea, mapArea ); } catch(Exception e ) { e.printStackTrace(); } If i am only adding one layer to the context, it works as expected, but if am adding two ore more layers, area-shapes get messed up, points on lines appear or lines are rearranged to area-borders. What am i doing wrong? Thanks for your help. Julian -- Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten Browser-Versionen downloaden: http://www.gmx.net/de/go/browser ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users