server side code for map result