Add support for JPEG encoding option for HDMaps
This commit is contained in:
parent
49b38c10b7
commit
d008548306
11 changed files with 72 additions and 33 deletions
|
|
@ -260,7 +260,8 @@ var DynmapTileLayer = L.TileLayer.extend({
|
|||
zoom: this.zoomprefix(zoomoutlevel),
|
||||
zoomprefix: (zoomoutlevel==0)?"":(this.zoomprefix(zoomoutlevel)+"_"),
|
||||
x: x,
|
||||
y: y
|
||||
y: y,
|
||||
fmt: this.options['image-format'] || 'png'
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ var HDMapType = DynmapTileLayer.extend({
|
|||
// Y is inverted for HD-map.
|
||||
info.y = -info.y;
|
||||
info.scaledy = info.y >> 5;
|
||||
return namedReplace('{prefix}{nightday}/{scaledx}_{scaledy}/{zoom}{x}_{y}.png', info);
|
||||
return namedReplace('{prefix}{nightday}/{scaledx}_{scaledy}/{zoom}{x}_{y}.{fmt}', info);
|
||||
},
|
||||
zoomprefix: function(amount) {
|
||||
// amount == 0 -> ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue