Re: [OpenMap Users] Getting at current projection in OMGraphicHandlerPlugIn?

From: Don Dietrick <dietrick_at_bbn.com>
Date: Thu, 9 Nov 2006 13:18:15 -0500

Hi Bas,

It's actually a little easier than that. The MouseEvent is actually
a MapMouseEvent, and if you cast it to a MapMouseEvent you'll find it
has a getLatLon() method.

The other thing you can do from a plugin is call getComponent(),
which returns the layer (PlugInLayer), and you can call getProjection
() on the layer.

Hope this helps,

Don


On Nov 9, 2006, at 12:55 PM, Bas Schulte wrote:

> Hi,
>
> I'm new at using openmap and I love it! Got an experimental
> navigation app running in a couple of hours which is quite awesome.
>
> Tons of questions arise though, hope you can bear with me... I
> wrote a plugin that displays my chart (jpg/png etc.) just fine at
> the right spot now I'd like to be able to get at lat/lon in my
> mouseClicked method. I know I can use the current projection's
> 'inverse' method to give me that information based on x/y from the
> event but for the life of it I can't find how to get at that bit of
> info.
>
> I worked around it by keeping the Projection that's being fed to
> getRectangle in my plugin which seems to work but there must be a
> proper way to get at that info? I'm trying to get the architecture
> in my head but it's quite complicated after hacking around for a
> day ;)
>
> What's the proper way to get at the current projection in my
> overriden mouseClicked method?
>
> Thanks,
>
> Bas.
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Nov 09 2006 - 13:19:36 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:07 EDT