summaryrefslogtreecommitdiffstats
path: root/gui/MapViewer.java
diff options
context:
space:
mode:
Diffstat (limited to 'gui/MapViewer.java')
-rw-r--r--gui/MapViewer.java54
1 files changed, 54 insertions, 0 deletions
diff --git a/gui/MapViewer.java b/gui/MapViewer.java
new file mode 100644
index 0000000..3292fdf
--- /dev/null
+++ b/gui/MapViewer.java
@@ -0,0 +1,54 @@
+package gui;
+
+@SuppressWarnings("serial")
+public class MapViewer extends javax.swing.JFrame {
+
+ private org.jdesktop.swingx.JXMapKit jXMapKit1;
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+ new MapViewer().setVisible(true);
+
+ }
+ });
+
+ }
+
+ public MapViewer() {
+ initComponents();
+ }
+
+ private void initComponents() {
+ // TileFactoryInfo test = new TileFactoryInfo(1, 14, 3, 50, true, true,
+ // "http://tile.openstreetmap.org/", "x", "y", "zoom");
+ /*
+ * TileFactoryInfo info = new TileFactoryInfo(0, // min level 8, // max
+ * allowed level 9, // max level 256, // tile size true, true, // x/y
+ * orientation is normal "http://wesmilepretty.com/gmap2/", // base url
+ * "x", "y", "z" // url args for x, y and z ) { public String
+ * getTileUrl(int x, int y, int zoom) { // int wow_zoom = 9 - zoom;
+ * String url = this.baseURL; // if (y >= Math.pow(2, wow_zoom - 1)) {
+ * // url = "http://int2e.com/gmapoutland2/"; // } return url + "zoom" +
+ * zoom + "maps/" + x + "_" + y + "_" + zoom + ".jpg"; } };
+ */
+
+ jXMapKit1 = new org.jdesktop.swingx.JXMapKit();
+ setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+ jXMapKit1
+ .setDefaultProvider(org.jdesktop.swingx.JXMapKit.DefaultProviders.OpenStreetMaps);
+ // jXMapKit1.setDefaultProvider(test);
+ // jXMapKit1.setTileFactory(new TileFactory(info));
+
+ getContentPane().add(jXMapKit1);
+ pack();
+
+ }
+
+}