googlemaps / google-maps-ios-utils

Google Maps SDK for iOS Utility Library
https://developers.google.com/maps/documentation/ios-sdk/utility/
Apache License 2.0
718 stars 410 forks source link

Clustering : Cluster Markers do not initially hide their items on the map #454

Open timothy-moonware opened 1 year ago

timothy-moonware commented 1 year ago

When we first open the map and start the cluster algorithm, the clusters appear rendered with their assigned items still visible. It is not until you zoom all the way in and back out do the clusters hide their associated items.

In GMUDefaultClusterRenderer::- (void)renderCluster:(id)cluster animated:(BOOL)animated I recommend adding the following code at line 286 :

      for (id<GMUClusterItem> item in cluster.items) {
          GMSMarker *marker;
          if ([item class] == [GMSMarker class]) {
              marker = (GMSMarker<GMUClusterItem> *)item;
              marker.map = nil;
          }
      }

This causes the initial Cluster renders to hide their items from the map.

wangela commented 1 year ago

If you would like to upvote the priority of this issue, please comment below or react on the original post above with :+1: so we can see what is popular when we triage.

@timothy-moonware Thank you for opening this issue. 🙏 Please check out these other resources that might help you get to a resolution in the meantime:

This is an automated message, feel free to ignore.