I want extract GPS coordinates using #jxmaps. For that purpose i have added two JPanel. One panel to hold few buttons and text Fields and in other Panel i want to add MapView. I have tried this
JPanel mypanel = new JPanel();//null;
JPanel mypanel2 = new JPanel();
mypanel.setLayout(new BorderLayout(200,100));
mypanel.setVisible(true);
mypanel.add(mapView, BorderLayout.CENTER);
JFrame frame = new JFrame("JxMaps - Hello, World!");
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.add(mypanel, BorderLayout.CENTER);
frame.add(mypanel2, BorderLayout.EAST);
frame.setSize(700, 500);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
But its not working. Can anyone please guide me how to do that?
Regards Aamir
Unfortunately, provided part of source code doesn't have information about mapView initialization.
I tried to run your sample and it is working correctly on my side. I initialized mapView in the following way:
Could you explain more detailed what error do you have?