Pre-warm map resources to make subsequent loads faster

This commit is contained in:
Skylar Ittner 2022-05-02 18:34:19 -06:00
parent c5e52c7845
commit 77da43f2bc
2 changed files with 7 additions and 4 deletions

View File

@ -10,6 +10,9 @@ var firstload = true;
function mapboxMap() { function mapboxMap() {
/* Pre-load workers and stuff, and enable re-using them even after map unloaded */
mapboxgl.prewarm();
var mapsource = "auto"; var mapsource = "auto";
if (getStorage("mapsource") == null) { if (getStorage("mapsource") == null) {