simplify code

This commit is contained in:
Jindrich Makovicka 2011-06-06 19:28:42 +02:00
parent 07b1117a20
commit 4467b5f5af

View file

@ -420,11 +420,7 @@ public class TileSourceManager {
@Override @Override
public String getUrlToLoad(int x, int y, int zoom) { public String getUrlToLoad(int x, int y, int zoom) {
try { try {
bshInterpreter.set("x", x); return (String) bshInterpreter.eval(String.format("getTileUrl(%d,%d,%d);", zoom, x, y));
bshInterpreter.set("y", y);
bshInterpreter.set("z", zoom);
bshInterpreter.eval("url = getTileUrl(z, x, y);");
return (String) bshInterpreter.get("url");
} catch (bsh.EvalError e) { } catch (bsh.EvalError e) {
return null; return null;
} }