It is the version 10.2.4.
package Jeden;
import java.awt.EventQueue;
import javax.swing.JFrame;
import java.awt.BorderLayout;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import com.esri.runtime.ArcGISRuntime;
import com.esri.map.ArcGISTiledMapServiceLayer;
import com.esri.map.JMap;
public class Aplikacja {
private JFrame window;
private JMap map;
public Aplikacja() {
window = new JFrame();
window.setSize(800, 600);
window.setLocationRelativeTo(null); // center on screen
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.getContentPane().setLayout(new BorderLayout(0, 0));
// dispose map just before application window is closed.
window.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent windowEvent) {
super.windowClosing(windowEvent);
map.dispose();
}
});
JMap map = new JMap();
ArcGISTiledMapServiceLayer tiledLayer = new ArcGISTiledMapServiceLayer(
"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
map.getLayers().add(tiledLayer);
// Add the JMap to the JFrame's content pane
window.getContentPane().add(map);
}
/**
* Starting point of this application.
* @param args
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
Aplikacja application = new Aplikacja();
application.window.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
}