Hello,

What version of GeoTools are you using ?  Also your code snippet
doesn't show how you are creating your JMapFrame instance. Perhaps you
haven't passed it a renderer to do the drawing ?

Michael


On 6 July 2011 19:53, lexmc <[email protected]> wrote:
> this is my code:
> public class addMapLayer implements ActionListener{
>
>        static JMapFrame f;
>        static SimpleFeatureSource featureSource;
>
>        public addMapLayer(JMapFrame frame) throws IOException
>        {
>                f=frame;
>                File file = JFileDataStoreChooser.showOpenFile("shp", null);
>                if (file == null) {
>                        return;
>                }
>                FileDataStore store = FileDataStoreFinder.getDataStore(file);
>                featureSource = store.getFeatureSource();
>                CachingFeatureSource cache = new 
> CachingFeatureSource(featureSource);
>
>                MapContext map = new DefaultMapContext();
>                sel = new Selezione(f, featureSource);
>                Style style = sel.createDefaultStyle();
>                map.addLayer(cache, style);
>                f.setMapContext(map);
>        }
>
> --
> View this message in context: 
> http://osgeo-org.1803224.n2.nabble.com/Unable-to-repaint-maplayer-tp6553750p6553804.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to