forked from MapComplete/MapComplete
Extract codegrid to seperate module, heatup the codegrid caches
This commit is contained in:
parent
7c52ace770
commit
4db1997ed6
3 changed files with 28 additions and 6 deletions
18
Logic/Web/CodeGrid.ts
Normal file
18
Logic/Web/CodeGrid.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import codegrid from "codegrid-js";
|
||||
|
||||
export default class CodeGrid {
|
||||
public static readonly grid = CodeGrid.InitGrid();
|
||||
|
||||
private static InitGrid(): any {
|
||||
const grid = codegrid.CodeGrid("./tiles/");
|
||||
|
||||
// Heat up the caches
|
||||
grid.getCode(50.2, 3.2, (error, code) => {
|
||||
});
|
||||
grid.getCode(52.5072, 13.4248, (error, code) => {
|
||||
});
|
||||
grid.getCode(40.4781, -3.7034, () => {
|
||||
});
|
||||
return grid;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue