I have a JMapViewer
as a panel on a JFrame
and a Button. If i press the Button, I want the JMapViewer
to show a scrolled map excerpt.
I've trying to set another display position by lat/lon but I dont know how to obtain the old mapcentered lat/lon values..?
My Button Actionlistener, which should show a slightly up moved map excerpt:
btn_PanUp.addActionListener(new ActionListener(){
@Override
public void actionPerformed(ActionEvent arg0) {
jmv.setDisplayPositionByLatLon(lat+0.01, lon, zoom)
jmv.invalidate();
}
});
But I don't know how to obtain the current lat/lon values of the map center. How do I obtain them?