Wednesday, July 01, 2015

Border Based Marker Clustering


The Food Assembly is a European organization which brings together local food producers with local consumers. The Food Assembly has created such groups throughout Europe, enabling consumers to come together and buy locally sourced food.

You can find your nearest food assembly on the Food Assembly's searchable Mapbox powered map. The map includes a really interesting marker clustering system which groups together food assemblies by region and country.

Nearly all of the existing marker clustering libraries are based on a proximity algorithm which groups together markers purely on their geographical proximity. The problem with this kind of proximity approach to marker clustering is that it ignores administrative and political borders and regions.

For example, using a proximity algorithm some markers in 'Country A' may be grouped together with markers from 'Country B' because they are geographically close, while other markers in 'Country A' may be clustered with markers in 'Country C' because they are closer geographically to 'Country C' than other markers in 'Country A'.

Map users however are used to country and regional borders. A marker clustering solution which groups makers based on country and regional borders may seem more natural to the user. In such a marker clustering system all the markers in 'Country A' will be in one cluster, all the markers in 'Country B' will be in a separate cluster and all 'Country C' markers will be in another. Place these clusters at the centroid of each respective country and the user can clearly tell which markers are in which country.

The Food Assembly has developed such a marker clustering solution, clustering markers based on administrative and political borders and regions. At the lowest zoom levels the map clusters markers by country. Zoom in on the map and the markers then become clustered by region. Only when you really zoom in on the map does the Food Assembly switch to a proximity algorithm which ignores administrative borders.
Post a Comment