Marker clustering with google maps SDK for iOS?

后端 未结 4 1671
既然无缘
既然无缘 2020-11-29 22:07

I am using Google Maps SDK in my iOS app, and I need to group markers which are very close to each other - basically need to use marker clustering like its shown in the atta

4条回答
  •  孤街浪徒
    2020-11-29 22:49

    After long hours of research, I have finally found a wonderful guy who did this.

    Thanks a lot to you DDRBoxman.

    Check his github : https://github.com/DDRBoxman/google-maps-ios-utils

    He recently pushed some code sample.

    When I wanted to run his project, I had some issues. I just deleted the Google Maps SDK and follow the complete Google tutorial to integrate Google Maps SDK. Then, no more issues, I was able to run the app. Don't forget to put your API KEY in the AppDelegate.m.

    I will work with this lib for the following days, I will let you know if I find some bugs.

    EDIT #1 : I worked a lot on clusters these days. My final approach is to integrate an MKMapView, create the cluster on an MKMapView (way much easier than doing it on the Google Maps SDK for iOS) and integrate Google Maps Places to my iOS project. The performance are better with this approach than the previous one.

    EDIT #2 : I don't know if you use Realm or if you plan to use it but they provide a really good solution for map clustering : https://realm.io/news/building-an-ios-clustered-map-view-in-objective-c/

提交回复
热议问题