Pre-warm map resources to make subsequent loads faster
This commit is contained in:
parent
c5e52c7845
commit
77da43f2bc
@ -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) {
|
||||||
|
@ -27,10 +27,10 @@ var SETTINGS = {
|
|||||||
bgcolor: "#EDF5F3"
|
bgcolor: "#EDF5F3"
|
||||||
},
|
},
|
||||||
satellite: {
|
satellite: {
|
||||||
url: "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token={mapboxpublictoken}",
|
url: "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token={mapboxpublictoken}",
|
||||||
json: "mapbox://styles/mapbox/satellite-streets-v11",
|
json: "mapbox://styles/mapbox/satellite-streets-v11",
|
||||||
name: "Satellite",
|
name: "Satellite",
|
||||||
bgcolor: "#EDF5F3"
|
bgcolor: "#EDF5F3"
|
||||||
},
|
},
|
||||||
fiord: {
|
fiord: {
|
||||||
url: "https://maps.netsyms.net/styles/fiord-color/{z}/{x}/{y}.png",
|
url: "https://maps.netsyms.net/styles/fiord-color/{z}/{x}/{y}.png",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user