addClusteredMarkersFromPoints method
Implementation
Future<String?> addClusteredMarkersFromPoints({
required List<OlaLatLng> points,
int? clusterRadius,
String? defaultMarkerColor,
String? defaultClusterColor,
double? textSize,
String? textColor,
String? stop1Color,
String? stop2Color,
String? iconPath,
}) {
final geoJson = jsonEncode({
'type': 'FeatureCollection',
'features': [
for (final point in points)
{
'type': 'Feature',
'geometry': {
'type': 'Point',
'coordinates': [point.longitude, point.latitude],
},
'properties': <String, dynamic>{},
},
],
});
return addClusteredMarkers(
geoJson: geoJson,
clusterRadius: clusterRadius,
defaultMarkerColor: defaultMarkerColor,
defaultClusterColor: defaultClusterColor,
textSize: textSize,
textColor: textColor,
stop1Color: stop1Color,
stop2Color: stop2Color,
iconPath: iconPath,
);
}