diff --git a/web/images/blank.png b/web/images/blank.png new file mode 100644 index 00000000..e0d10928 Binary files /dev/null and b/web/images/blank.png differ diff --git a/web/js/flatmap.js b/web/js/flatmap.js index ad2c8a9a..58e27b33 100644 --- a/web/js/flatmap.js +++ b/web/js/flatmap.js @@ -10,7 +10,8 @@ var FlatProjection = DynmapProjection.extend({ var FlatMapType = DynmapTileLayer.extend({ options: { minZoom: 0, - maxZoom: 4 + maxZoom: 4, + errorTileUrl: 'images/blank.png' }, initialize: function(options) { options.maxzoomout = options.mapzoomout || options.world.extrazoomout; diff --git a/web/js/hdmap.js b/web/js/hdmap.js index 2aa5add3..af905ebf 100644 --- a/web/js/hdmap.js +++ b/web/js/hdmap.js @@ -14,7 +14,8 @@ var HDMapType = DynmapTileLayer.extend({ projection: undefined, options: { minZoom: 0, - maxZoom: 0 + maxZoom: 0, + errorTileUrl: 'images/blank.png' }, initialize: function(options) { options.maxZoom = options.mapzoomin + options.mapzoomout; diff --git a/web/js/kzedmaps.js b/web/js/kzedmaps.js index f5364f53..c971696a 100644 --- a/web/js/kzedmaps.js +++ b/web/js/kzedmaps.js @@ -16,7 +16,8 @@ var KzedProjection = DynmapProjection.extend({ var KzedMapType = DynmapTileLayer.extend({ options: { minZoom: 0, - maxZoom: 4 + maxZoom: 4, + errorTileUrl: 'images/blank.png' }, initialize: function(options) { options.mapzoomout = options.mapzoomout || options.world.extrazoomout; diff --git a/web/js/map.js b/web/js/map.js index f426cb67..0fda5afc 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -599,18 +599,19 @@ DynMap.prototype = { var me = this; var col = "#000000"; if(me.serverday) { - if(me.maptype.backgroundday) - col = me.maptype.backgroundday; - else if(me.maptype.background) - col = me.maptype.background; + if(me.maptype.options.backgroundday) + col = me.maptype.options.backgroundday; + else if(me.maptype.options.background) + col = me.maptype.options.background; } else { - if(me.maptype.backgroundnight) - col = me.maptype.backgroundnight; - else if(me.maptype.background) - col = me.maptype.background; + if(me.maptype.options.backgroundnight) + col = me.maptype.options.backgroundnight; + else if(me.maptype.options.background) + col = me.maptype.options.background; } $('.map').css('background', col); + $('.leaflet-tile').css('background', col); }, getParameterByName: function(name) { name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");