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
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue