Ignore:
Timestamp:
2007-11-22T16:09:11+01:00 (17 years ago)
Author:
hakan
Message:

Ask a Preferences holder for tile URLs

Location:
applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapLayer.java

    r5685 r5689  
    186186            {
    187187                int key = (y << 19) + x;
     188
    188189                SlippyMapTile tile = tileStorage.get(12).get(key);
     190
     191                if (tile == null)
     192                    tileStorage.get(12).put(key,
     193                            tile = new SlippyMapTile(x, y, 12));
     194
    189195                if (tile.getImage() == null)
    190196                    tile.loadImage();
     
    466472    public void preferenceChanged(String key, String newValue)
    467473    {
    468         if (key.startsWith(Constants.PREFERENCE_PREFIX))
     474        if (key.startsWith(SlippyMapPreferences.PREFERENCE_PREFIX))
    469475        {
    470476            System.err.println(this + ".preferenceChanged('" + key + "', '"
  • applications/editors/josm/plugins/slippymap/src/org/openstreetmap/josm/plugins/slippymap/SlippyMapTile.java

    r5675 r5689  
    4141        try
    4242        {
    43             tileImage = Toolkit.getDefaultToolkit().createImage(
    44                     new URL("http://tah.openstreetmap.org/Tiles/tile/" + z
    45                             + "/" + x + "/" + y + ".png"));
     43            URL imageURL = new URL(SlippyMapPreferences.getMapUrl() + "/" + z
     44                    + "/" + x + "/" + y + ".png");
     45
     46            tileImage = Toolkit.getDefaultToolkit().createImage(imageURL);
    4647        }
    4748        catch (MalformedURLException mfu)
Note: See TracChangeset for help on using the changeset viewer.