             data_by_iso[d.iso3] = val
 
         # Set the coloring function.
-        colorize = d3.scale.quantize()
+        geomap.colorize = d3.scale.quantize()
             .domain([min, max])
             .range(geomap.properties.colors)
 

            .attr('width', rect_w)
            .attr('height', rect_h)

        # TODO use colorize.invertExtent(colorval) to label each bin


(exports? or this).d3.geomap.choropleth = ()->
    new Choropleth()
            if data_by_iso[iso3] then geomap.properties.format(data_by_iso[iso3]) else 'No data'

        color_val = (iso3)->
            if data_by_iso[iso3] then geomap.colorize(data_by_iso[iso3]) else '#eeeeee'

        geomap.private.units.enter().append('path')
            .attr('class', 'unit')
