

def _gettilefromset(self, tilesets, x, y, z, ext, timeout=None):
    for tileset in tilesets:
        if (tileset['order'] == z):
            url = ((((((tileset['href'] + '/') + str(x)) + '/') + str(y)) + '.') + ext)
            u = openURL(url, '', username=self.username, password=self.password, timeout=(timeout or self.timeout))
            return u
    else:
        raise ValueError(('cannot find zoomlevel %i for TileMap' % z))

dataset/ETHPy150Open geopython/OWSLib/owslib/tms.py TileMapService._gettilefromset/original