def get_tiles(map_layer, bbox, n_workers=N_DOWNLOAD_WORKERS):
    """
    Download tiles.

    Args:
        map_source (MapSource):
        bbox (TileBB): Bounding box delimiting the map
        n_workers (int): number of threads to used for downloading.

    Returns:
        dict of file: Dictionary mapping coordinates to temporary files.

        Example::

            {
                (x, y) : <FileHandle>
            }

    """
    p = Pool(n_workers)
    tiles = {}
    for (x, y), tmp_file in p.imap_unordered(_download_tile_wrapper, zip(itertools.repeat(map_layer),
                                                                         itertools.repeat(bbox.zoom),
                                                                         *zip(*bboxiter(bbox)))):
        app.logger.info("Downloaded tile x={}, y={}, z={}".format(x, y, bbox.zoom))
        tiles[(x, y)] = tmp_file

    return tiles