Added the procedures for map2d.