From: Victor <vic...@co...> - 2004-05-24 20:32:30
|
Hi Andrea, I'm using the j2d renderer. Thanks for your answer and no problem, man. Victor -----Mensagem original----- De: Andrea Aime [mailto:and...@al...]=20 Enviada em: segunda-feira, 24 de maio de 2004 16:34 Para: geo...@li... Cc: Victor Assunto: Re: [Geotools-gt2-users] Problems to draw MultiPoint geometry Alle 20:27, luned=EC 24 maggio 2004, Victor ha scritto: > Hi, > > I"ve little problems to draw a MultiPoint geometry, when I try to=20 > drawn a MultiPoint geometry in my shapefile my program shows only one=20 > Point geometry (in this case the last), Is there a problem in my=20 > source code? > > Mark redCircle =3D sb.createMark(StyleBuilder.MARK_CIRCLE, Color.RED,=20 > Color.BLACK, 0); Graphic graphPoint =3D sb.createGraphic(null,=20 > redCircle, null); > AttributeType geom =3D=20 > AttributeTypeFactory.newAttributeType("the_geom", > MultiPoint.class); > FeatureType ftRoad =3D FeatureTypeFactory.newFeatureType(new > AttributeType[] {geom}, "road"); > PointSymbolizer psPoint =3D sb.createPointSymbolizer(graphPoint); > Style stylePoint =3D sb.createStyle(psPoint); > > WKTReader wktReader =3D new WKTReader(); > MultiPoint geometry =3D (MultiPoint) wktReader.read("MULTIPOINT=20 > (-45.90500 -23.23700,-45.92500 -23.23700, -45.92500 -23.24700)"); > > Feature theRoad =3D ftRoad.create(new Object[] {geometry}, "myRoad"); > > FeatureCollection fc =3D DefaultFeatureCollections.newCollection(); > fc.add(theRoad); > MapLayer myLayer =3D new DefaultMapLayer(fc,stylePoint); MapContext = map=20 > =3D new DefaultMapContext(); map.addLayer(myLayer); No, it seems to me a bug in the code... by the way, which renderer are you using? Sorry for the late response, I'm a bit overloaded... Best regards Andrea Aime |