If the clusterer script is enabled, it would be nice if we could configure the following options:

  1. If you don't like the default large blue cluster icon, you can call clusterer.SetIcon(icon) to change it.
  2. clusterer.SetMaxVisibleMarkers(n) lets you change the threshold marker count where clustering kicks in. The default is 150 markers.
  3. clusterer.SetMinMarkersPerCluster(n) sets the minumum number of markers for a cluster. The default is five.
  4. clusterer.SetMaxLinesPerInfoBox(n) sets the maximum number of lines in an info box. The default is ten, but if your map is small this may be too many.

This would involve adding an inline script after the inclusion of clusterer.js.

If noone is working on this yet, I'll likely do it myself in the next 2-3 weeks.

CommentFileSizeAuthor
#2 cluster.png1.45 KBahoeben
#1 gmap_clusterer_options.patch4.04 KBahoeben

Comments

ahoeben’s picture

Status: Active » Needs work
StatusFileSize
new4.04 KB

Erm, scrap those 2-3 weeks, it was easier to implement than I thought. Here's a patch.
Creating the cluster icon can probably be done a bit more elegantly, marking as 'needs work'.

ahoeben’s picture

StatusFileSize
new1.45 KB

For kicks, here's a cluster marker.

ahoeben’s picture

Status: Needs work » Needs review

Here's clusterer (with set options) at work:
http://beta.ivrpa.org/map/user

webgeer’s picture

Status: Needs review » Fixed

Thanks for the patch.

I changed it a little and added a little feature to gmap.js so that markers that use other than the standard size/shape for the marker could be used.

Anonymous’s picture

Status: Fixed » Closed (fixed)