Hello,
I am seeing a similar problem with my geotools application.  I create a map
display with several layers created from shapefiles and additional "direct
layers" for a scalebar, title, and legend.  The styles of two of the
shapefile layers are updated based on user action.  For example, the user
can specify a city name which causes the program to update the styles of the
city polygon feature and point features that fall inside the city polygon.

As shown in the attached two screen shots  image1
<http://s8.postimg.org/nrf8kh68l/image1.png>   and  image2
<http://s10.postimg.org/tv7gncnop/image2.png>  , some of the shapefile
layers were not rendered properly.

The problem manifests itself somewhat randomly.  I've tried updating the
styles in a background thread as shown here but that did not solve the
issue.

// this snippit is called with the GUI app's main execution thread

                Task mapUpdater = new Task() {

                        @Override
                        protected Object call() throws Exception {
// these three methods call setStyle on a layer
                                handler.updateSelectedPoi(setPoi);
                                handler.updateSelectedZipCodes(setZip);
                                handler.updateSelectedRegions(setRegion);
                                return new Boolean(true);
                        }
                };
                
                Thread th = new Thread(mapUpdater);
        th.setDaemon(true);
        th.start();

I am using geotools 10.3, JDK8 and javafx 2.2.  The geotools map pane is an
embedded Swing Object.  I have reproduced the problem in a Swing environment
as well.

Any suggestions are greatly appreciated,
Hal



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Problems-to-rendering-the-map-using-JMapPane-tp5020512p5099050.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to