tileblaster 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tileblaster.js +7 -5
- package/package.json +1 -1
package/lib/tileblaster.js
CHANGED
|
@@ -556,10 +556,13 @@ tileblaster.prototype.versatile = function(tileurl, mapid, z, x, y, fn) {
|
|
|
556
556
|
if (!self.maps[mapid].c) self.maps[mapid].c = versatiles(tileurl, { tms: !!self.maps[mapid].tms });
|
|
557
557
|
self.maps[mapid].c.getTile(z,x,y, function(err, buf){
|
|
558
558
|
if (err) return fn(err);
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
559
|
+
self.maps[mapid].c.decompress(self.maps[mapid].c.header.tile_precompression, buf, function(err, buf){
|
|
560
|
+
if (err) return fn(err);
|
|
561
|
+
var strm = new stream.PassThrough;
|
|
562
|
+
strm.write(buf);
|
|
563
|
+
strm.end();
|
|
564
|
+
return fn(null, strm);
|
|
565
|
+
});
|
|
563
566
|
});
|
|
564
567
|
return self;
|
|
565
568
|
};
|
|
@@ -740,7 +743,6 @@ tileblaster.prototype._tileurl = function(mapid, z, x, y, r, e){
|
|
|
740
743
|
|
|
741
744
|
// transform parameters to filename
|
|
742
745
|
tileblaster.prototype._tilefile = function(mapid, z, x, y, r, e){
|
|
743
|
-
var self = this;
|
|
744
746
|
return (mapid+"/"+z.toFixed(0)+"/"+x.toFixed(0)+"/"+y.toFixed(0)+((!!r)?r:"")+"."+((e) ? e : ""));
|
|
745
747
|
};
|
|
746
748
|
|