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.
@@ -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
- var strm = new stream.PassThrough;
560
- strm.write(buf);
561
- strm.end();
562
- return fn(null, strm);
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tileblaster",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "pretty fast optimizing & compressing tile caching proxy",
5
5
  "main": "lib/tileblaster.js",
6
6
  "bin": {