Ignore:
Timestamp:
2007-11-21T16:54:38+01:00 (17 years ago)
Author:
hakan
Message:

Fetch map tiles from the official server

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/slippymap/slippymap/SlippyMapTile.java

    r4740 r5667  
    1414/**
    1515 * Class that contains information about one single slippy map tile.
    16  * 
     16 *
    1717 * @author Frederik Ramm <frederik@remote.org>
    1818 *
    1919 */
    20 public class SlippyMapTile 
     20public class SlippyMapTile
    2121{
    2222
    2323        private Image tileImage;
    24        
     24
    2525        int x;
    2626        int y;
     
    2828
    2929    private String metadata;
    30        
    31         public SlippyMapTile(int x, int y, int z) 
     30
     31        public SlippyMapTile(int x, int y, int z)
    3232        {
    3333                this.x = x;
     
    3535                this.z = z;
    3636        }
    37        
     37
    3838        public String getMetadata()
    3939        {
    4040                return metadata;
    4141        }
    42        
     42
    4343        public void loadImage()
    4444        {
    4545                try
    4646                {
    47                         // tileImage = new ImageIcon(new URL("http://dev.openstreetmap.org/~ojw/Tiles/tile.php/"+z+"/"+x+"/"+y+".png"));
    48                         //tileImage = Toolkit.getDefaultToolkit().createImage(new URL("http://openstreetmap.gryph.de/slippymap/tiles/"+z+"/"+x+"/"+y+".png"));
    49                         tileImage = Toolkit.getDefaultToolkit().createImage(new URL("http://dev.openstreetmap.org/~ojw/Tiles/tile.php/"+z+"/"+x+"/"+y+".png"));
    50 //                             
     47                        tileImage = Toolkit.getDefaultToolkit().createImage(new URL("http://tah.openstreetmap.org/Tiles/tile/"+z+"/"+x+"/"+y+".png"));
    5148                }
    5249                catch (MalformedURLException mfu)
    5350                {
    5451                        mfu.printStackTrace();
    55                 }               
     52                }
    5653        }
    5754
     
    6057                return tileImage;
    6158        }
    62        
     59
    6360        public void loadMetadata()
    6461        {
    65         try 
     62        try
    6663        {
    6764            URL dev = new URL("http://tah.openstreetmap.org/Tiles/info_short.php?x=" +
     
    9390        }
    9491    }
    95        
     92
    9693        public boolean equals(Object o)
    9794        {
     
    10097                return (this.x == other.x && this.y == other.y && this.z == other.z);
    10198        }
    102        
     99
    103100}
Note: See TracChangeset for help on using the changeset viewer.