if (atlasFile == null) {
throw new GdxRuntimeException("Couldn't load atlas");
}
TextureAtlas atlas = new TextureAtlas(atlasFile);
atlases.put(atlasFile.path(), atlas);
AtlasResolver.DirectAtlasResolver atlasResolver = new AtlasResolver.DirectAtlasResolver(atlases);
TiledMap map = loadMap(root, tmxFile, atlasResolver, parameter);
map.setOwnedResources(atlases.values().toArray());
setTextureFilters(parameter.textureMinFilter, parameter.textureMagFilter);