def get_tile(self, tile_coord, format=None): x, y, z = tile_coord url = '%s/%d/%d/%d.%s' % (self.url, z, x, y, format or self.format) if self.http_client: return self.http_client.open_image(url) else: return retrieve_image(url)
def get_tile(self, tile_coord, format=None): url = self.url_template.substitute(tile_coord, format, self.grid) if self.http_client: return self.http_client.open_image(url) else: return retrieve_image(url)