Attention! Do you have any ideas for reorganizing and updating the Mapki? Please leave a note here. Thank you!

Clustering or Bunching

From Google Mapki

Jump to: navigation, search

Contents

[edit] About this article

The Google Maps API is great. But it has it's limitations. Even if it could load and render a billion points in a second, your screen would soon become very cluttered. There are various ways and means to approach this problem. One is to only display the n most recent posts. But why hide the old data if it is relevant ? A logical concept is that of grouping multiple markers together into one when they are so close together at the zoom level you are at that you would be unable to select one or the other, so what's the point in showing them both. This concept is commonly referred to as "Clustering" or "Bunching". I use the terms "bunching" or "bunch point" (to refer to a marker that represents other markers) in this article, but these can be considered synonyms for "clustering" or "cluster point".

There are two main methods of bunching, which I will call "Fixed" and "Arbitrary".

[edit] Fixed

Bunch points are static, named locations held in the database like other locations and can hold information.

Pros:

Bunch Points have meaning.
For example, if your map was a map of football clubs and there was a regional organisation covering the area of a region, the infowindow of the bunch point for that region could contain a link to that regional organisation's website.
Multi-level hierarchies can be built which can also be used for "navigation"

Cons:

More points in the database
Regions need to be manually created and stuck to.

[edit] Arbitrary

Bunch points are generated on-the-fly, chosen by the code. Wherever there are too many points too close together, the code bunches them together into one bunch point.

Pros:

No need to make bunch points manually.
Less tables required, less overhead.

Cons:

Bunch points are meaningless in themselves.

[edit] Further Info

More info about various methods:

evilC's Hierarchical Bunching Method (Fixed)
Personal tools
Advertisement