generalize the shifting in map::shift

That function now uses tripoints.