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
public String getUrlToLoad(int x, int y, int zoom) {
try {
bshInterpreter.set("x", x);
bshInterpreter.set("y", y);
bshInterpreter.set("z", zoom);
bshInterpreter.eval("url = getTileUrl(z, x, y);");
return (String) bshInterpreter.get("url");
return (String) bshInterpreter.eval(String.format("getTileUrl(%d,%d,%d);", zoom, x, y));
} catch (bsh.EvalError e) {
return null;
}