Updated map viewer code