int mapHeight = root.getIntAttribute("height", 0);
int tileWidth = root.getIntAttribute("tilewidth", 0);
int tileHeight = root.getIntAttribute("tileheight", 0);
String mapBackgroundColor = root.getAttribute("backgroundcolor", null);
MapProperties mapProperties = map.getProperties();
if (mapOrientation != null) {
mapProperties.put("orientation", mapOrientation);
}
mapProperties.put("width", mapWidth);
mapProperties.put("height", mapHeight);
mapProperties.put("tilewidth", tileWidth);
mapProperties.put("tileheight", tileHeight);
if (mapBackgroundColor != null) {
mapProperties.put("backgroundcolor", mapBackgroundColor);
}
mapTileWidth = tileWidth;
mapTileHeight = tileHeight;
mapWidthInPixels = mapWidth * tileWidth;
mapHeightInPixels = mapHeight * tileHeight;