mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 13:15:30 +01:00
Fix background color support, provide blank tile to fix refresh junk
This commit is contained in:
parent
0bbcf6510e
commit
e08a2d4407
BIN
web/images/blank.png
Normal file
BIN
web/images/blank.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 167 B |
@ -10,7 +10,8 @@ var FlatProjection = DynmapProjection.extend({
|
|||||||
var FlatMapType = DynmapTileLayer.extend({
|
var FlatMapType = DynmapTileLayer.extend({
|
||||||
options: {
|
options: {
|
||||||
minZoom: 0,
|
minZoom: 0,
|
||||||
maxZoom: 4
|
maxZoom: 4,
|
||||||
|
errorTileUrl: 'images/blank.png'
|
||||||
},
|
},
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options.maxzoomout = options.mapzoomout || options.world.extrazoomout;
|
options.maxzoomout = options.mapzoomout || options.world.extrazoomout;
|
||||||
|
@ -14,7 +14,8 @@ var HDMapType = DynmapTileLayer.extend({
|
|||||||
projection: undefined,
|
projection: undefined,
|
||||||
options: {
|
options: {
|
||||||
minZoom: 0,
|
minZoom: 0,
|
||||||
maxZoom: 0
|
maxZoom: 0,
|
||||||
|
errorTileUrl: 'images/blank.png'
|
||||||
},
|
},
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options.maxZoom = options.mapzoomin + options.mapzoomout;
|
options.maxZoom = options.mapzoomin + options.mapzoomout;
|
||||||
|
@ -16,7 +16,8 @@ var KzedProjection = DynmapProjection.extend({
|
|||||||
var KzedMapType = DynmapTileLayer.extend({
|
var KzedMapType = DynmapTileLayer.extend({
|
||||||
options: {
|
options: {
|
||||||
minZoom: 0,
|
minZoom: 0,
|
||||||
maxZoom: 4
|
maxZoom: 4,
|
||||||
|
errorTileUrl: 'images/blank.png'
|
||||||
},
|
},
|
||||||
initialize: function(options) {
|
initialize: function(options) {
|
||||||
options.mapzoomout = options.mapzoomout || options.world.extrazoomout;
|
options.mapzoomout = options.mapzoomout || options.world.extrazoomout;
|
||||||
|
@ -599,18 +599,19 @@ DynMap.prototype = {
|
|||||||
var me = this;
|
var me = this;
|
||||||
var col = "#000000";
|
var col = "#000000";
|
||||||
if(me.serverday) {
|
if(me.serverday) {
|
||||||
if(me.maptype.backgroundday)
|
if(me.maptype.options.backgroundday)
|
||||||
col = me.maptype.backgroundday;
|
col = me.maptype.options.backgroundday;
|
||||||
else if(me.maptype.background)
|
else if(me.maptype.options.background)
|
||||||
col = me.maptype.background;
|
col = me.maptype.options.background;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(me.maptype.backgroundnight)
|
if(me.maptype.options.backgroundnight)
|
||||||
col = me.maptype.backgroundnight;
|
col = me.maptype.options.backgroundnight;
|
||||||
else if(me.maptype.background)
|
else if(me.maptype.options.background)
|
||||||
col = me.maptype.background;
|
col = me.maptype.options.background;
|
||||||
}
|
}
|
||||||
$('.map').css('background', col);
|
$('.map').css('background', col);
|
||||||
|
$('.leaflet-tile').css('background', col);
|
||||||
},
|
},
|
||||||
getParameterByName: function(name) {
|
getParameterByName: function(name) {
|
||||||
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
|
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
|
||||||
|
Loading…
Reference in New Issue
Block a user