diff --git a/apps/gipy/ChangeLog b/apps/gipy/ChangeLog index 648fd1d15..70bba17e8 100644 --- a/apps/gipy/ChangeLog +++ b/apps/gipy/ChangeLog @@ -123,4 +123,5 @@ * Removed sharp turns auto-detection * Interface: centered svg preview + display file sizes * Interface: disable/enable waypoints detection and elevation - * Touching the screen when sleeping will wake up but not change screen \ No newline at end of file + * Touching the screen when sleeping will wake up but not change screen + * Removing footways (if bicycles not allowed) to reduce resource usage \ No newline at end of file diff --git a/apps/gipy/app.js b/apps/gipy/app.js index 6b6591570..8cc197bc3 100644 --- a/apps/gipy/app.js +++ b/apps/gipy/app.js @@ -407,10 +407,11 @@ class Map { fetch_points(tile_x, tile_y, scaled_side) { let tile_num = tile_x + tile_y * this.grid_size[0]; - for (let i = 0; i < this.points_cache.length; i++) { - if (this.points_cache[i][0] == tile_num) { - return this.points_cache[i][1]; - } + let existing_entry = this.points_cache.find(c => { + c[0] == tile_num + }); + if (existing_entry !== undefined) { + return existing_entry[1]; } if (this.points_cache.length > 40) { this.points_cache.shift(); diff --git a/apps/gipy/pkg/gps.js b/apps/gipy/pkg/gps.js index 7175c6801..539e4c952 100644 --- a/apps/gipy/pkg/gps.js +++ b/apps/gipy/pkg/gps.js @@ -449,9 +449,6 @@ async function load(module, imports) { function getImports() { const imports = {}; imports.wbg = {}; - imports.wbg.__wbg_log_d04343b58be82b0f = function(arg0, arg1) { - console.log(getStringFromWasm0(arg0, arg1)); - }; imports.wbg.__wbindgen_string_get = function(arg0, arg1) { const obj = getObject(arg1); const ret = typeof(obj) === 'string' ? obj : undefined; @@ -460,6 +457,9 @@ function getImports() { getInt32Memory0()[arg0 / 4 + 1] = len0; getInt32Memory0()[arg0 / 4 + 0] = ptr0; }; + imports.wbg.__wbg_log_d04343b58be82b0f = function(arg0, arg1) { + console.log(getStringFromWasm0(arg0, arg1)); + }; imports.wbg.__wbindgen_object_drop_ref = function(arg0) { takeObject(arg0); }; @@ -694,8 +694,8 @@ function getImports() { const ret = wasm.memory; return addHeapObject(ret); }; - imports.wbg.__wbindgen_closure_wrapper2299 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 265, __wbg_adapter_24); + imports.wbg.__wbindgen_closure_wrapper2297 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 264, __wbg_adapter_24); return addHeapObject(ret); }; diff --git a/apps/gipy/pkg/gps_bg.wasm b/apps/gipy/pkg/gps_bg.wasm index 175d4ec39..1a6412aa9 100644 Binary files a/apps/gipy/pkg/gps_bg.wasm and b/apps/gipy/pkg/gps_bg.wasm differ