AppleClusterManager<T extends AppleClusterItem> constructor

AppleClusterManager<T extends AppleClusterItem>(
  1. Iterable<T> _items,
  2. void updateAnnotations(
    1. Set<Annotation>
    ), {
  3. Future<Annotation> annotationBuilder(
    1. AppleCluster<T>
    )?,
  4. List<double> levels = const [1, 4.25, 6.75, 8.25, 11.5, 14.5, 16.0, 16.5, 20.0],
  5. double extraPercent = 0.5,
  6. int maxItemsForMaxDistAlgo = 200,
  7. ClusterAlgorithmApple clusterAlgorithm = ClusterAlgorithmApple.geoHash,
  8. MaxDistParamsApple? maxDistParams,
  9. double? stopClusteringZoom,
  10. double? devicePixelRatio,
})

Implementation

AppleClusterManager(
    this._items,
    this.updateAnnotations, {
      Future<apple_map.Annotation> Function(AppleCluster<T>)? annotationBuilder,
      this.levels = const [1, 4.25, 6.75, 8.25, 11.5, 14.5, 16.0, 16.5, 20.0],
      this.extraPercent = 0.5,
      this.maxItemsForMaxDistAlgo = 200,
      this.clusterAlgorithm = ClusterAlgorithmApple.geoHash,
      this.maxDistParams,
      this.stopClusteringZoom,
      double? devicePixelRatio,
    })  : annotationBuilder = annotationBuilder ?? _basicAnnotationBuilder,
      assert(
      levels.length <= precision,
      'Levels length should be less than or equal to precision',
      ),
      devicePixelRatio = devicePixelRatio ??
          WidgetsBinding.instance.platformDispatcher.views.first.devicePixelRatio;