CalculateBestCentereOnLocationPackageExtension extension

on

Methods

calculateBestCenter({required Set<TLocationComponents> locations, required double threshold, required DistanceUnit distanceUnit}) TLocationComponents

Available on LocationUtils, provided by the CalculateBestCentereOnLocationPackageExtension extension

Calculates the best center for a set of locations. This is the geometric center unless the distance to the closest marker is greater than the threshold, then the closest marker is used. The distanceUnit is the unit of the threshold.