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