|
From: Jody G. <jod...@gm...> - 2011-02-11 23:33:22
|
Can you not just mark the layer as not visible? -- Jody Garnett On Saturday, 12 February 2011 at 6:54 AM, Richard Marshall wrote: > > Hi > > I am creating a simple map layer that I am using as a highlight layer. > Basically it contains a circular 'halo' (external graphic) feature that is > positioned over a circle point feature to emphasize the current point > feature. The layer is created when it is first needed and then cleared when > no longer required. As well as the highlight layer I also have a shapefile > layer and a layer to display the point features. When I clear the highlight > layer the map is redrawn as a tiny image in the top left corner and I see > the following warning in the console: > > Possible use of "Transverse_Mercator (Inverse transform)" projection outside > its valid area. > Latitude 597°15.2'N is out of range (±90°). > > This is code I'm using to clear the layer: > > FeatureSource<SimpleFeatureType, SimpleFeature> featureSource = > getFeatureSource(); > CollectionDataStore dataStore = > (CollectionDataStore)featureSource.getDataStore(); > FeatureCollection<SimpleFeatureType, SimpleFeature> featureCollection = > dataStore.getCollection(); > featureCollection.clear(); > > I'm using GeoTools v2.6.3 and a JMapPane. > > The workaround is to delete the layer and remove it from the map context > when it is not required and recreate it from scratch each time it is needed > but I was hoping to not have to do this. > > Any help or pointers would be gratefully appreciated. > > Richard > -- > View this message in context: http://osgeo-org.1803224.n2.nabble.com/Empty-map-layer-causes-map-rendering-issues-tp6017156p6017156.html > Sent from the geotools-gt2-users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > Geotools-gt2-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > |