From b480b7a4d0d939739c9c1e36e00fbb8802c8f216 Mon Sep 17 00:00:00 2001 From: orbiter Date: Mon, 9 Aug 2010 00:13:32 +0000 Subject: [PATCH] fix for bug in last commit git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7027 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/yacy/graphics/OSMTile.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/de/anomic/yacy/graphics/OSMTile.java b/source/de/anomic/yacy/graphics/OSMTile.java index 121955742..0fc316103 100644 --- a/source/de/anomic/yacy/graphics/OSMTile.java +++ b/source/de/anomic/yacy/graphics/OSMTile.java @@ -31,7 +31,6 @@ import java.io.IOException; import java.net.MalformedURLException; import java.util.ArrayList; import java.util.List; -import java.util.Random; import javax.imageio.ImageIO; @@ -130,7 +129,6 @@ public class OSMTile { } } - public static final Random r = new Random(System.currentTimeMillis()); // to select tile server public static class tileCoordinates { int xtile, ytile, zoom; @@ -151,7 +149,7 @@ public class OSMTile { public String url(int retry) { // see http://wiki.openstreetmap.org/wiki/Public_Domain_Map int hash = (xtile + 7 * ytile + 13 * zoom + retry) % 4; - String host = (hash == 3) ? "tile.openstreetmap.org" : ((char) ((int)'a' + r.nextInt(3))) + ".tile.openstreetmap.org"; + String host = (hash == 3) ? "tile.openstreetmap.org" : ((char) ((int)'a' + hash)) + ".tile.openstreetmap.org"; String url = "http://" + host + "/" + zoom + "/" + xtile + "/" + ytile + ".png"; //System.out.println("OSM URL = " + url); return url;