Hi Edgar,

Yes, that looks good.  I had started going through your code but was
having a bit of trouble following it :)

The other thing I should mention, that I forgot before, is that it's a
good idea to use import org.geotools.geometry.jts.ReferencedEnvelope
rather than com.vividsolutions.jts.geom.Envelope.  If you just change
the import statement and the declaration of your envelope class
variable you'll find that the rest of your code still works and the
RenderedUtilities.worldToScreenTransform method will be the
non-deprecated version.

All the best
Michael


2008/9/10 Edgar Alan Calvillo Moreno <[EMAIL PROTECTED]>:
> hi Again
>
> finally i can get the real coordinates, i was wrong in my code, i send u the
> correct code...
>
> envelope = mapPane.getMapArea();
>                                                 worldToScreen =
> RendererUtilities.worldToScreenTransform(envelope, new
> Rectangle(mapPane.getWidth(), mapPane.getHeight()));
>                                                 screenToWorld =
> worldToScreen.createInverse();
>                                                 Point2D p = new
> Point2D.Double(e.getX(), e.getY());
>                                                 screenToWorld.transform(p,
> p);
>                                                 System.out.println(p);
>                                                 mapX= p.getX();
>                                                 mapY=p.getY();
>
>
>
>
> "Sabes que eres brillante, pero querrĂ¡s comprender lo que has hecho dentro
> de dos semanas"
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to