Open mistyn8 opened 8 years ago
Hey!
If it's ok to have calculator
globally, you can override function like this:
MarkerClusterer.prototype.calculator_ = function(markers, numStyles) {
...
coffeescript:
MarkerClusterer::calculator_ = (markers, numStyles) ->
...
A little confused about overriding the calculator...
should it be as per the example here http://gmaps-utility-library-dev.googlecode.com/svn/trunk/markerclusterer/examples/simple_example_with_values.html
eg passed in as a option on instantiation..
var markerCluster = new MarkerClusterer(map, markers, {'calculator': average});
or using the
markerCluster.setCalculator(function(markers, numStyles) {...});
I couldn't seem to get the example method to work, but assume there might be an overhead setting after instantiation?