Hi jody,
 
 
I have tried using normal graphics objects in this example and have also tried 
with icon.paintIcon() method. The problem i am facing is that the image is 
drawn on the screen and then it disappears after a second. It doesn't stay 
there.
 
Actually, i have derived another class from JMapPane and over-riden 
mouse-clicked() and paintComponent() methods to display an icon when i click on 
the JMapPane, hence extending functionality of the example. To do this I 
have used the code snippets from JMapPane.java.
 
Also, I am using countries.shp and countries.sld as maps.
 
I will be really thankful, if you or someone can help me in this regard.
 
 
Regards,
 
Farrukh.
 
 
 
 

--- On Sat, 7/26/08, Jody Garnett <[EMAIL PROTECTED]> wrote:

From: Jody Garnett <[EMAIL PROTECTED]>
Subject: Re: [Geotools-gt2-users] Displaying icon on map in JMapPane example
To: [EMAIL PROTECTED]
Cc: [email protected]
Date: Saturday, July 26, 2008, 1:45 AM

Have a look inside JMapPane; it really just uses the graphics2d api to 
draw a map onto your component. You can draw an icon onto the component 
yourself - Icon has a draw method that takes an x and y coordinate.
Jody


      
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to