I've added:

try {       mapPane.getRenderer().setCoordinateSystem(GeographicCoordinateSystem.WGS84);

} catch (TransformException e) {

            e.printStackTrace();

}

And it works !

 

-----Message d'origine-----
De : Virginie BERRE
Envoyé : jeudi 15 septembre 2005 13:50
À : Martin Desruisseaux; Virginie BERRE
Cc : [email protected]
Objet : RE: TR: [Geotools-gt2-users] Problem with RenderedMapScale

 

I don't use shapefile... only layer resulting from a WMS request. So if someone could tell me how to tell the mapPane the right CRS...

Thanks.

 

-----Message d'origine-----

De : Martin Desruisseaux [mailto:[EMAIL PROTECTED]

Envoyé : jeudi 15 septembre 2005 12:35

À : Virginie BERRE

Cc : [email protected]

Objet : Re: TR: [Geotools-gt2-users] Problem with RenderedMapScale

 

Virginie BERRE a écrit :

> How to initialise de CRS associated with my mapPane ??

 

It should be provided with yours data (from a .prj file if you are

reading shapefile I think). I don't know how to force a data store to

use a specific CRS if none is provided with the data.

 

Setting a CRS in MapPane just set the "view" CRS (i.e. geometries are

automatically projected from the "real data" CRS to the "view" CRS at

rendering time), so setting the MapPane's CRS will probably not help.

 

Looks if there is a .prj file with yours data. If none, you may try to

force yours DataStore to use DefaultGeographicCRS.WGS84 (but I don't

know how to force that).

 

      Martin.

Reply via email to