Google Maps marker clustering in iOS

I have a map based application using the Google Maps SDK. I need to save up to several thousand items in the main database and display them with markers on the map. For performance and usability reasons, I need to group these markers when the user is reduced, but I need to place representative markers so that the user knows where to zoom in to see more details.

Each entry in my underlying data model stores double latitude / longitude values. So I was thinking about clustering the elements in order to save a separate object, where I separate the less significant parts of the geographical coordinates and save the quantity in it.

Therefore, whenever an element with the lat / lon parameter {44.9382719, -130.20293849} is inserted into the database, another cluster object with the lat / lon parameter {44.9, -130.2} has the count count incremented property. The idea is that at small scales (i.e., Zoom), I would only request cluster objects and place them on the map instead of the actual elements.

My question is: according to the NSManagedObject link , you should not receive material in awakeFromInsert , since I can do that inserting a managed object of one kind updates the value of the corresponding managed object of another type?

+7
ios objective-c core-data google-maps
source share
2 answers

I searched the Markers cluster library on Google Maps for iOS for three days, and finally I ended up with this https://github.com/googlemaps/google-maps-ios-utils , which works beautifully and is very easy to use and understanding.

+7
source share

Look at routeMe, this is the default

/** Whether the annotation should be clustered when map view clustering is enabled. Defaults to /** Whether the annotation should be clustered when map view clustering is enabled. Defaults to YES . */ @property (nonatomic, assign) BOOL clusteringEnabled; . */ @property (nonatomic, assign) BOOL clusteringEnabled;

+1
source share

All Articles