Moved Map() to an angular service.