props.put("tilewidth", tilewidth);
props.put("tileheight", tileheight);
props.put("margin", margin);
props.put("spacing", spacing);
for (AtlasRegion region : atlas.findRegions(regionsName)) {
// handle unused tile ids
if (region != null) {
StaticTiledMapTile tile = new StaticTiledMapTile(region);
int tileid = firstgid + region.index;
tile.setId(tileid);