saving the map payload to the database