     $scope.defaultFocus = () ->
       # TODO: refactor this to not use an API call but only scope variables if possible.
       if $routeParams.bioguide_id.length > 0
-        console.log $routeParams.bioguide_id
         ApiGet.congress "legislators?bioguide_id=#{$routeParams.bioguide_id}", (error, data) ->
           if not error
             if not data[0].district 

      $scope.state_district = {state: null, district: null}
      $scope.district_reps = []
      d3.select('#map_dialog').transition().duration(750).style("opacity", 1e-6)
      $scope.usMap.transition().duration(750).attr("transform", "translate(0,0)scale(1)").style "stroke-width", 1 + "px"

    $scope.showDistrictDialog = () ->
      $('#map_dialog').html($compile("<sub-view template='partials/district_reps'></sub-view>")($scope))

    $scope.warning = null
    $scope.state_district = {state: null, district: null}
    $scope.district_reps = []
    $scope.map_width = 0
    $scope.FIPS_to_state = {1:'AL', 2:'AK', 4:'AZ', 5:'AR', 6:'CA', 8:'CO', 9:'CT', 10:'DE', 11:'DC', 12:'FL', 13:'GA', 15:'HI', 16:'ID', 17:'IL', 18:'IN', 19:'IA', 20:'KS', 21:'KY', 22:'LA', 23:'ME', 24:'MD', 25:'MA', 26:'MI', 27:'MN', 28:'MS', 29:'MO', 30:'MT', 31:'NE', 32:'NV', 33:'NH', 34:'NJ', 35:'NM', 36:'NY', 37:'NC', 38:'ND', 39:'OH', 40:'OK', 41:'OR', 42:'PA', 44:'RI', 45:'SC', 46:'SD', 47:'TN', 48:'TX', 49:'UT', 50:'VT', 51:'VA', 53:'WA', 54:'WV', 55:'WI', 56:'WY', 60:'AS', 64:'FM', 66:'GU', 68:'MH', 69:'MP', 70:'PW', 72:'PR', 74:'UM', 78:'VI'}

    $scope.getLocation = () ->
