Skip to content

Provide clustering for map pins #11811

@smitha-cgi

Description

@smitha-cgi

Description

Showing thousands of pins on the map works, but it takes a long time to render them all, and the map is then extremely cluttered. Pins should be grouped together in clusters which are then only expanded into pins as the map is zoomed in or out.

Could potentially be done using this on Android and this on iOS. I have written something custom for my MAUI app on Android (storing list of locations in memory and then dynamically painting cluster markers on the map when camera changes), happy to provide some example code if someone can work out how to get it to fit into MAUI and do the same thing on iOS.

Public API Changes

Something like this:

map.ClusterShapeTextColor = Colors.White;
map.ClusterShapeColor = Colors.IndianRed;
map.ClusterShapeRadius = 20;
map.ClusterDistance = Distance.FromKilometers(5);
map.IsClustering = true;

This is assuming that the cluster object is a simple circle with a number inside it that indicates how many locations it represents.

Intended Use-Case

Show thousands of locations on a map without it getting overloaded trying to draw individual pins for each location

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions