Re: OMPoint / Layer

From: Donald Dietrick <dietrick@bbn.com>
Date: Wed Jan 16 2002 - 17:51:47 EST

Hi David,

The layer receives a Projection object in the projectionChanged()
method, inside the ProjectionEvent. You can save a reference to the
last projection received in that methods, and then in your
MapMouseMethods you can call:

LatLonPoint llp = projection.inverse(event.getX(), event.getY());

to get the coordinates for a screen point.

- Don

On Wednesday, January 16, 2002, at 03:05 PM, Marklund David wrote:

> Hi all,
> I have a perhaps easy question.
> I can catch mouse clicks in a layer I have implemented.
> With event.getX(), event.getY() I can get the screen position.
> How do I translate x-y screen coordinates to lat/long ?
>
>
> /David
>
> --
> [To unsubscribe to this list send an email to "majdart@bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Donald Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Jan 16 17:51:55 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT