fixed map to work with a viewport camera