|
From: Nicolas P. <nic...@us...> - 2005-04-23 05:27:28
|
Update of /cvsroot/hipgmap/gmap/com/trileet/gmap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12644/com/trileet/gmap Modified Files: GMap.java ImageCache.java Tile.java Log Message: Dump danger's WAP proxy until they fix it. This makes GMap way slower as trileet has to do the translation. (and it appears HTTPConnection requests are much slower than usual right now) Not going to update on skdr as I'm hoping this is a temporary problem. Long term maybe we want to detect this and switch over within GMap, or at least provide it as a hidden option or somesuch. Index: Tile.java =================================================================== RCS file: /cvsroot/hipgmap/gmap/com/trileet/gmap/Tile.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Tile.java 10 Apr 2005 20:45:33 -0000 1.8 --- Tile.java 23 Apr 2005 05:27:19 -0000 1.9 *************** *** 89,94 **** public static String makeURL(int x, int y, int zoom) { ! return "http://mt.google.com/mt?v=.1&x=" + x + "&y=" + y + "&zoom=" ! + zoom; } --- 89,97 ---- public static String makeURL(int x, int y, int zoom) { ! return "http://hipster.trileet.com/tmpimg/img.php?nocache=true&url=" + ! URLEncoder.encode("http://mt.google.com/mt?v=.1&x=" + x + "&y=" + y + "&zoom=" + zoom); ! // no direct request till Danger fixes their gateway ! // return "http://mt.google.com/mt?v=.1&x=" + x + "&y=" + y + "&zoom=" ! // + zoom; } Index: ImageCache.java =================================================================== RCS file: /cvsroot/hipgmap/gmap/com/trileet/gmap/ImageCache.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ImageCache.java 20 Apr 2005 14:14:19 -0000 1.15 --- ImageCache.java 23 Apr 2005 05:27:19 -0000 1.16 *************** *** 377,383 **** } ! // we expire after 8 seconds public boolean isExpired() { ! return System.currentTimeMillis() - requested > 8000; } --- 377,384 ---- } ! // we expire after 20 seconds, trileet is slow public boolean isExpired() { ! // change this back to 8 seconds when we can use the Danger proxies again ! return System.currentTimeMillis() - requested > 20000; } Index: GMap.java =================================================================== RCS file: /cvsroot/hipgmap/gmap/com/trileet/gmap/GMap.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** GMap.java 23 Apr 2005 02:20:02 -0000 1.29 --- GMap.java 23 Apr 2005 05:27:19 -0000 1.30 *************** *** 249,254 **** if (request != null){ ! request.listener.handleResponse(request.url, transaction); ! s_listeners.remove(new Integer(id)); } } --- 249,254 ---- if (request != null){ ! request.listener.handleResponse(request.url, transaction); ! s_listeners.remove(new Integer(id)); } } *************** *** 267,271 **** System.out.println("REQUESTING: " + url); ! HTTPConnection.get(url, null, (short) 0, ++s_transactionId, !kh); s_listeners.put(new Integer(s_transactionId), new Request(url, listener)); return s_transactionId; --- 267,272 ---- System.out.println("REQUESTING: " + url); ! //HTTPConnection.get(url, null, (short) 0, ++s_transactionId, !kh); ! HTTPConnection.get(url, null, (short) 0, ++s_transactionId, false); s_listeners.put(new Integer(s_transactionId), new Request(url, listener)); return s_transactionId; |