unify generation of map in picture.main.php