Function for exporting map