                   
                   bubble_legend = true
                   if value.radius > max_bubble_value
-                    color = value.fillColor
+                    bubble_legend_color = value.fillColor
                     max_bubble_value = value.radius
                     max_bubble_value_digits = (max_bubble_value.toString().length)-1
                     

        $.each this.options.layers, ( index, value ) ->
          max_value = 0
          min_value = 0
          if value.list[1]['style'] = 'choropleth'
            max_value = value.list[1]['choropleth_value']
            min_value = value.list[1]['choropleth_value']
          choro = false 
          level_number = 0 
          start = ""
          end = ""

                max_value = value.choropleth_value
              if value.choropleth_value < min_value
                min_value = value.choropleth_value
            
          if choro == true       
            start_red = parseInt(start.slice(1,3),16)
            start_green = parseInt(start.slice(3,5),16)
