Hello Arnauld, > i have understood what you have told me. But you haven't understood my > anxiety.
I think I have :-) > I will take a example. > When i want to draw a LineString to this coordinate: > Coordinate coord1 = new Coordinate(10.1623439,36.8545816) > Coordinate coord2 = new Coordinate(10.1703396,36.8531219); > ;( 10.1623439 is the latitude of a node in my file .xml and 36.854581 is the > longitude.) > The JMAPFRAME don't display this LineString > But when i do this: > Coordinate coord1 = new Coordinate(1131270.8550,4418856.9693); > Coordinate coord2 = new Coordinate(1131439.2747,4418792.6636); > the line is display with the JMapFrame. I don't know what is the unit > of 1131270.8550,4418856.96 and > how can i do to have all the coordinate geographic in my file .xml to this > format. How are you initializing the MapContext that you pass to JMapFrame ? >From the above, you have set the coordinate reference system (CRS) of the MapContext to be something other than geographic (lat-lon). Please note, if you do not set a CRS for your MapContext directly, it will be set automatically to that of the first layer that you add that has a non-null CRS. It appears that your MapContext is working with some projected coordinate system (UTM for instance) with units in metres. It will still display your features created with lat-lon coordinates by automatically reprojecting them to the CRS of the MapContext. Please have a look at this example app which will help you to understand the mechanisms... http://docs.geotools.org/stable/userguide/examples/crslab.html Michael ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
