-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathaggregation_setup.dart
40 lines (35 loc) · 1015 Bytes
/
aggregation_setup.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import 'package:flutter/material.dart';
class AggregationSetup {
/// List of integern number, they are the limit of aggregation range
final List<int> maxAggregationItems;
/// List of MaterialColor, they are the color of the marker matching aggregation range
final List<MaterialColor> colors;
/// List of double, they are the limit of zoom when change the aggregation level
final List<double> maxZoomLimits;
final int markerSize;
AggregationSetup({
this.maxAggregationItems = const [10, 25, 50, 100, 500, 1000],
this.colors = const [
Colors.grey,
Colors.blue,
Colors.green,
Colors.yellow,
Colors.orange,
Colors.red,
Colors.pink
],
this.maxZoomLimits = const [
3.0,
5.0,
7.5,
10.5,
13.0,
13.5,
14.5,
],
this.markerSize = 150,
}) : assert(maxAggregationItems.length == 6),
assert(colors.length == 7),
assert(maxZoomLimits.length == 7),
assert(markerSize > 0);
}