Change the projection of your map; you can do this with
map.setCoordinateReferenceSystem(); there is a slightly old workbook here:
- http://snapshots.dist.codehaus.org/geotools/workshop/GeometryCRSWorkbook.pdf
Jody
On 03/07/2010, at 5:40 PM, Ray Climer wrote:
>
> I opened the map with the following code. But I found the map looks flat.
>
> File shapeFile = new File("BOUNT_poly.shp");
> FileDataStore store;
> FeatureSource<SimpleFeatureType, SimpleFeature> shapefileSource;
> MapContext map = new DefaultMapContext();
> Color newColor = new Color(127,127,127);
> Style style = SLD.createPolygonStyle(Color.BLACK, newColor, 1.0F);
> try {
> store = FileDataStoreFinder.getDataStore(shapeFile);
> shapefileSource = store.getFeatureSource();
> map.addLayer(shapefileSource, style);
> //map.setAreaOfInterest(ReferencedEnvelope areaOfInterest);
> } catch (final IOException e) {
> e.printStackTrace();
> }
> // Create a map context and add our shapefile to it
> setMapContext(map);
> setRenderer(new StreamingRenderer());
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/How-to-adjust-the-map-graphic-aspect-ratio-tp5250480p5250480.html
> Sent from the geotools-gt2-users mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users