Took for loop out of xhr callback and moved it into another function and put initRequest code into initMap to try and fix recursion issue