After adding a layer, a JMapPane.setReset(true); JMapPane.repaint();
must follow, to make it visible. Furthermore I use JMapPane.setMapArea(.) instead of MapContext.setAreaOfInterest(.). Good luck... Martin > -----Ursprüngliche Nachricht----- > Von: "dziadgba dziadgba" <[EMAIL PROTECTED]> > Gesendet: 11.04.07 00:45:24 > An: [email protected] > Betreff: [Geotools-gt2-users] geotools visualization hy to everybody, > a few years ago I used geotools to calculate and visualize itineraries for > bikers using shape files containing road information. > > No I would like to provide an interface for the placement of antennas in the > territory, but it seems that everything changed in geotools. I did the > following to visualize a shapefile but nothing is visualized and no error > message occurs. Shapefile includes streams. Maybe someone more expert can > have a look on it? > > > thanks > dyiadgba > > loadShapefileIntoCatalog(SHAPEFILENAME); > ... > StyleBuilder sb = new StyleBuilder(); > LineSymbolizer lsStream = sb.createLineSymbolizer(Color.BLUE, 6); > Style streamsStyle = sb.createStyle > (lsStream); > ... > Panel mapGUI = new Panel(); > jmp = new JMapPane(); > jmp.setBackground(Color.white); > > renderer = new StreamingRenderer(); > > context = new DefaultMapContext(DefaultGeographicCRS.WGS84); > context.setAreaOfInterest(demoBase.envlp_NoEdges2); > > jmp.setRenderer(renderer); > jmp.setContext(context); > > FeatureSource shpFS = getAShapefileFeatureSourceFromCatalog(); > MapLayer m1 = new DefaultMapLayer(shpFS,streamsstyle); > > demoGUI.context.addLayer(0,m1); > > > ----------------------------------------------------------------- > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > ----------------------------------------------------------------- > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > -- mfg Martin --------------------- ICQ: 272860433 mailto:[EMAIL PROTECTED] http://www.mojays.de --------------------- _______________________________________________________________ SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
