Implemented toMap method of View classes