map_2d: obj-compatible update

Made the argument order to the constructor optional, with default
value 3.