WriteMapOutput function

Write a 'mapXXXX.txt' file