simplify code
This commit is contained in:
parent
07b1117a20
commit
4467b5f5af
1 changed files with 1 additions and 5 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue