diff --git a/88-tar1090.conf b/88-tar1090.conf index e09b48f..9d7b78f 100644 --- a/88-tar1090.conf +++ b/88-tar1090.conf @@ -11,6 +11,7 @@ alias.url += ( "/INSTANCE/globe_history/" => "/var/globe_history/", "/INSTANCE/aircraft_sil/" => "/usr/local/share/tar1090/aircraft_sil/", "/INSTANCE/osm_tiles_offline/" => "/usr/local/share/osm_tiles_offline/", + "/INSTANCE/openfreemap_offline/" => "/usr/local/share/openfreemap_offline/mnt/", "/INSTANCE/" => "HTMLPATH/" ) @@ -112,6 +113,11 @@ $HTTP["url"] =~ "^/INSTANCE/libs/.*$" { "Cache-Control" => "public, max-age=1209600", ) } +$HTTP["url"] =~ "^/INSTANCE/openfreemap_offline/tiles" { + setenv.add-response-header += ( + "Content-Encoding" => "gzip", + ) +} $HTTP["url"] =~ "^/INSTANCE/style.css$" { setenv.add-response-header += ( "Cache-Control" => "public, max-age=1209600", diff --git a/html/layers.js b/html/layers.js index 1a9027a..bd8e1f5 100644 --- a/html/layers.js +++ b/html/layers.js @@ -108,8 +108,8 @@ function createBaseLayers() { onVisible: (layer) => { if (!layer.get('styleApplied')) { // ol-mapbox-style plugin packed in with ol ... (kinda ugly) - ol.mapboxStyle.applyStyle(layer, "./openfreemap_tiles_offline/liberty"); - ol.mapboxStyle.applyBackground(layer, "./openfreemap_tiles_offline/liberty"); + ol.mapboxStyle.applyStyle(layer, "./openfreemap_offline/liberty"); + ol.mapboxStyle.applyBackground(layer, "./openfreemap_offline/liberty"); layer.set('styleApplied', true); } }, diff --git a/nginx.conf b/nginx.conf index 496181d..670895a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -39,6 +39,13 @@ location /INSTANCE/osm_tiles_offline/ { alias /usr/local/share/osm_tiles_offline/; } +location /INSTANCE/openfreemap_offline/ { + alias /usr/local/share/openfreemap_offline/mnt/; + location /INSTANCE/openfreemap_offline/tiles/ { + add_header Content-Encoding "gzip"; + } +} + location /INSTANCE/globe_history/ { alias /var/globe_history/; gzip on;