Im trying to open a geotiff image on my JMapPane.
I used the GeoTiffReaderWriterTest( from trunk of geotools2.3) as a base =
for my code.
When i show it as an image icon it works fine. But when i add as a =
layer, it does not show the image ( the map is loaded but not shown ):
here is the code:
GeoTiffFormat format =3D new GeoTiffFormat();
GeoTiffReader geoReader =3D new GeoTiffReader( format, f, null );
GridCoverage2D gc =3D (GridCoverage2D) geoReader.read(null);
Style style =3D builder.createStyle( builder.createRasterSymbolizer() ); =
****When i used Poly simb, it shows only the border of the image.
mapPane.getContext().addLayer( gc , style );
Can someone help me. Thx Fred.
|