Hello Balli, You don't say what version of GeoTools you are using but I'm guessing it is 2.7.something.
There has been some discussion of related problems in the last few days. The short story is that the map layer table widget is not working properly with the new MapContent and Layer classes introduced in the render module recently. I think the problems have mostly been fixed in the development version of GeoTools (8-SNAPSHOT) and once some more tweaking and testing has been done the fixes can be back-ported to the 2.7 branch. Please see this thread in the list archive for more info: http://osgeo-org.1803224.n2.nabble.com/Re-MapLayerTable-problems-tc6574334.html Hope this helps, Michael On 13 July 2011 18:52, ballibum <[email protected]> wrote: > Hello list, > i´am using the following code, to represent a map. > > public static void main(String[] args) throws Exception { > > File file = new File("C:/Shapes/Beispiel/raster.shp"); > FileDataStore store = FileDataStoreFinder.getDataStore(file); > SimpleFeatureSource featureSource = store.getFeatureSource(); > > > MapContext map = new DefaultMapContext(); > map.setTitle("Quickstart"); > map.addLayer(featureSource, null); > > > JMapFrame show = new JMapFrame(map); > show.setBounds(100, 100, 735, 610); > show.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); > show.enableStatusBar(true); > show.enableLayerTable(true); > show.setVisible(true); > } > > When i´m using this code, i can see a layer in the layer table, i don´t know > my misstake? can someone help me?or give me a example code? > > Thanks a lot > balli > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/layertable-doesn-t-show-any-layer-tp6578260p6578260.html > Sent from the geotools-gt2-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
