One of the very powerful (and unique) features of the Multimap API is the decluttering of markers. See this example.
Another useful feature in the Multimap API is the restyling of info boxes (that open when you click on the marker). See this example.
However if you want to restyle info boxes for markers that have been decluttered you need to follow a slightly different approach. This is because the marker for the cluster is a separate marker, which won’t have been touched by the your standard info box restyling, so will use the default info box style. What you need to do is add a handler for the ‘declutterCluster’ event. This will be called every time a set of markers is clustered. The 7th argument to the handling function will be an anonymous object (basically a hash/dictionary/associative array) that they can set info box options on. So you could use something like the following:
mv.addEventHandler('declutterCluster', handleCluster); ... function handleCluster(type, target, declutter_type, group_name, markers, cluster_marker, infobox_options ) { infobox_options['className'] = 'mpB'; infobox_optione['minWidth'] = 170; }
Thanks to John McKerrell for the approach and sample code.
See the full class documentation for more detail.
