Re: [OpenMap Users] MapMouseListner doubt?????

From: Adrian Lumsden <Adrian.Lumsden@sss.co.nz>
Date: Tue Dec 09 2003 - 03:21:07 EST

Hello Harpreet,

OpenMap mouse events can go to Layers and MapMouseModes.

I'd take a look at the classes in the OMGraphics package and try to do
what you want with those if you can.

If you really have to use your JPanel to build the display you want you
could always build the JPanel, then getGraphics() from it and then use
that to make an image which you can then make into an OMRaster or
OMScalingRaster. You are going to have to think about scaling the image to
fit on the map and worry about the projection scale too.

It's always possible to draw on top of the map but then you have to figure
to put where to draw your JPanel, get its graphic context anyway and then
track somehow where it went. Oh - you'll probably have to override its
paint() method too.

The OMGraphics know where they are on the map so you can go between mouse
events and latlong. They make life easier, at least for fairly simple
graphical objects.

all the best,

Adrian

_____________________________________________

Dr. Adrian Lumsden
Product Specialist
Scientific Software and Systems Limited

Tel: +64 4 917-6680 (direct)
        +64 4 917-6670 (reception)
Fax: +64 4 917-6671
E-mail: Adrian.Lumsden@spamhole.sss.co.nz

Visit us on the Web at: http://www.sss.co.nz
_____________________________________________

This e-mail passed SSS's content security scan.
It is covered by the confidentiality clauses at
http://www.sss.co.nz/content_and_confidentiality

Harpreet <harpreet@logiceastern.com>
Sent by: owner-openmap-users@bbn.com
09/12/03 18:11

 
        To: openmap-users@bbn.com
        cc:
        Subject: [OpenMap Users] MapMouseListner doubt?????

hi don

is it possible to use the MapMouseListener on a JPanel or it's only for a
Layer

wut iam doing is iam adding certain small panels on the openmap layer
(created by myself) and iam applying MouseListener on those panels

i tried to use the MapMouseListener on those panels but none of the events
are caught

pls clear the doubt
thanxx
Hapreet

--
[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 Tue Dec 9 03:22:02 2003

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