def compute(self):
        (positions, center) = self.get_positions()
        legacy = self.get_input("allowLegacy")
        use_values = True
        try:
            values = [float(x) for x in self.get_values()]
        except __HOLE__, e:
            # LEGACY SUPPORT
            if legacy:
                use_values = False
            else:
                raise ModuleError(self, "Must provide values column")
        if not use_values:
            symbol_data = positions
            symbol_options = {}
        else:
            symbol_options = self.get_options(self.SPECS)
            symbol_options["path"] = \
                            RawJavaScriptText("google.maps.SymbolPath.CIRCLE")
            min_value = min(values)
            max_value = max(values)

            # if we have black or white, we want hue to match the other side
            def white_or_black(c):
                return ((c[0] < 1e-8 and c[1] < 1e-8 and c[2] < 1e-8) or
                        (c[0] > 1-1e-8 and c[1] > 1-1e-8 and c[2] > 1-1e-8))
            start_c = symbol_options.pop("fillStartColor").tuple
            end_c = symbol_options.pop("fillEndColor").tuple
            start_wb = white_or_black(start_c)
            end_wb = white_or_black(end_c)
            start_c = list(colorsys.rgb_to_hsv(*start_c))
            end_c = list(colorsys.rgb_to_hsv(*end_c))
            if start_wb:
                start_c[0] = end_c[0]
            elif end_wb:
                end_c[0] = start_c[0]

            symbol_data = []
            for i in xrange(len(positions)):
                val = values[i]
                if max_value - min_value < 1e-8:
                    norm_val = 1.0
                else:
                    norm_val = (val - min_value) / (max_value - min_value)
                color = []
                for j in xrange(len(start_c)):
                    color.append((1.0 - norm_val) * start_c[j] + 
                                 norm_val * end_c[j])
                color = colorsys.hsv_to_rgb(*color)
                symbol_data.append([positions[i],
                                    GMapColor(255 * color[0],
                                              255 * color[1],
                                              255 * color[2])])
        symbol_titles = self.get_titles(default_col=(3 if legacy else None))
        data = {"symbol_data": symbol_data,
                "symbol_options": symbol_options,
                "symbol_titles": symbol_titles,
                "use_values": use_values}
        vis_data = GMapVisData([], self.TEMPLATE, data, center)
        self.set_output("self", vis_data)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/packages/gmaps/vis.py/GMapSymbols.compute