I used code from http://svn.openstreetmap.org/applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Demo.java to get a map up and running for my swing application.
I added a few MapMarkerDot to indicate some points in my map and used how can i get the mouse click position from my JMapViewer world map to identify whether a point has been selected but how can I actually show that a particular MapMarkerDot has been selected? I want to add some kind of border similar to http://bikes.oobrien.com/london/#zoom=14&lon=-0.1155&lat=51.4992 but so far I have not seen successful.
Any suggestions/ references are well appreciated. Thanks!
The
MapMarkerDot
parent implementation ofpaint()
inMapMarkerCircle
ignores theStroke
specified inStyle
, but you can extendMapMarkerCircle
to use a largerradius
and render anything at all. In the example below, the Update button listener shows how to alter a custom marker's background color dynamically.