Browse files

Backing out most uses of incompatible getTile signature introduced in f…

  • Loading branch information...
1 parent d8f3b1a commit 8067b72e54f20425a8f99bc9e7d7ebcc1c6f111b @migurski migurski committed May 26, 2013
View
4 TileStache/Goodies/Providers/Composite.py
@@ -314,15 +314,15 @@ def render(self, config, input_rgba, coord):
if self.layername:
layer = config.layers[self.layername]
- _, _, body = TileStache.getTile(layer, coord, 'png')
+ mime, body = TileStache.getTile(layer, coord, 'png')
layer_img = Image.open(StringIO(body)).convert('RGBA')
layer_rgba = _img2rgba(layer_img)
has_layer = True
if self.maskname:
layer = config.layers[self.maskname]
- _, _, body = TileStache.getTile(layer, coord, 'png')
+ mime, body = TileStache.getTile(layer, coord, 'png')
mask_img = Image.open(StringIO(body)).convert('L')
mask_chan = _img2arr(mask_img).astype(numpy.float32) / 255.
View
2 TileStache/Goodies/Providers/UtfGridComposite.py
@@ -66,7 +66,7 @@ def getTypeByExtension(self, extension):
def addLayer( self, layerDef, coord ):
- _, _, layer = TileStache.getTile(self.layer.config.layers[layerDef['src']], coord, 'JSON')[1]
+ mime, layer = TileStache.getTile(self.layer.config.layers[layerDef['src']], coord, 'JSON')[1]
# raise KnownUnknown(layer)
if layerDef['wrapper'] == None:
layer = json.loads(layer)
View
2 TileStache/Sandwich.py
@@ -276,7 +276,7 @@ def layer_bitmap(layer, coord):
"""
from . import getTile
- _, _, body = getTile(layer, coord, 'png')
+ mime, body = getTile(layer, coord, 'png')
image = Image.open(StringIO(body)).convert('RGBA')
return Blit.Bitmap(image)
View
2 scripts/tilestache-compose.py
@@ -46,7 +46,7 @@ def getTileUrls(self, coord):
""" Return tile URLs that start with file://, by first retrieving them.
"""
if self.threadsafe or self.lock.acquire():
- _, _, tile_data = TileStache.getTile(self.layer, coord, 'png', self.ignore_cached)
+ mime_type, tile_data = TileStache.getTile(self.layer, coord, 'png', self.ignore_cached)
handle, filename = mkstemp(prefix='tilestache-compose-', suffix='.png')
write(handle, tile_data)
View
2 scripts/tilestache-render.py
@@ -81,7 +81,7 @@
for coord in coords:
# render
- _, _, content = getTile(layer, coord, extension)
+ mimetype, content = getTile(layer, coord, extension)
# save
handle, filename = mkstemp(prefix='tile-', suffix='.'+extension)
View
3 scripts/tilestache-seed.py
@@ -328,8 +328,7 @@ def parseConfigfile(configpath):
print >> stderr, '%(offset)d of %(total)d...' % progress,
try:
- status_code, headers, content = getTile(layer, coord, extension, options.ignore_cached)
- mimetype = headers['Content-Type']
+ mimetype, content = getTile(layer, coord, extension, options.ignore_cached)
if mimetype and 'json' in mimetype and options.callback:
js_path = '%s/%d/%d/%d.js' % (layer.name(), coord.zoom, coord.column, coord.row)

0 comments on commit 8067b72

Please sign in to comment.