Skip to content

Commit

Permalink
[Fix] The checking of path is null in IOS.
Browse files Browse the repository at this point in the history
[Refactoring] Change the grid size from 50 to 25.
  • Loading branch information
boris committed Jul 13, 2021
1 parent ae1305d commit 13c97b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private void initClusterManager(final GoogleMap googleMap, final BMarkerManager
final BClusterRendered rendered = new BClusterRendered(context, googleMap, clusterManager, _markerIconPainter);
rendered.setDensity(density);
final GridBasedAlgorithm algorithm = new GridBasedAlgorithm();
algorithm.setMaxDistanceBetweenClusteredItems(50);
algorithm.setMaxDistanceBetweenClusteredItems(25);
clusterManager.setAlgorithm(algorithm);
clusterManager.setRenderer(rendered);
clusterManager.setAnimation(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ - (instancetype)initWithFrame:(CGRect)frame
_markerIconPainter = [[MarkerIconPainter alloc] init:registrar];

// begin init ClusterManager and ClusterController
id<GMUClusterAlgorithm> algorithm = [[BGridBasedClusterAlgorithm alloc] initWithGridSize:50];
id<GMUClusterAlgorithm> algorithm = [[BGridBasedClusterAlgorithm alloc] initWithGridSize:25];
id<GMUClusterIconGenerator> iconGenerator = [[GMUDefaultClusterIconGenerator alloc] init];
GMUDefaultClusterRenderer* renderer = [[GMUDefaultClusterRenderer alloc] initWithMapView:_mapView clusterIconGenerator:iconGenerator];
_clusterRenderer = [[ClusterRenderer alloc] initWithMarkerIconPainter:_markerIconPainter];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ - (instancetype)init:(NSObject<FlutterPluginRegistrar>*)registrar {

- (UIImage*) getRiderAvatar:(NSString *)path name:(NSString*)name status:(int)status ratio:(NSNumber *)ratio {
UIImage* image;
if (path != nil) {
if (path != nil && path != [NSNull null]) {
image = [self getUIImageFromPath:path ratio:ratio];
} else {
image = [self getUIImageFromText:name ratio:ratio];
Expand Down

0 comments on commit 13c97b8

Please sign in to comment.