Using AGSMapContentsTree to simplify code.