Terrapin-Rocket-Team / Ground-Station

A Node.js/Electron ground station user interface to display and log APRS messages recieved over Serial
0 stars 0 forks source link

Cached tiles fail to load when using the executable #4

Closed erodarob closed 11 months ago

erodarob commented 1 year ago

Description:

Cached tiles are placed in a directory not available to the frontend when the app is run through the executable. This prevents cached tiles from loading, while tiles loaded from the tile provider still work.

Tasks:

Notes:

It may also be possible to fix this bug by changing the file paths from "./src/cachedtiles" to "src/cachedtiles". The relevant lines of code include line 240-341 in main.js

erodarob commented 1 year ago

Figured out the root cause of the issue was that some file paths were using "/" or "./" instead of "dirname" so they were placing files in the wrong spot. This fixed the tile loading issue and I went through and made all the other file paths consistent using "./" for files that should be placed in the same directory as the executable and "dirname" with path.join for files that should be placed relative to main.js.