public TiledMap(MapVersion version, MapOrientation orientation,
			int width, int height, int tilewidth, int tileheight, 
			Map<String, String> properties,
			Map<Integer, TilesetRef> tilesets,
			List<Layer> layers) {
		if (width < 0 || height < 0) throw new IllegalArgumentException(
				"width and height have to be positive");
		if (tilewidth < 0 || tileheight < 0) throw new IllegalArgumentException(
				"tilewidth and tileheight have to be positive");
		this.version     = version;
		this.orientation = orientation;
		this.width       = width;
		this.height      = height;
		this.tilewidth   = tilewidth;
		this.tileheight  = tileheight;
		this.properties  = ImmutableProperties.copyOf(properties);
		this.tilesets    = ImmutableMap.copyOf(tilesets);
		this.layers      = ImmutableList.copyOf(layers);
	}