Adding x, y, layer, and level if necessary.