show map and directions in the directions page and removed duplicate code