Moved the Map Init JS function into a service