Reputation: 13057
I am using Google Maps in iOS app. I set userData to markers, some String for example.
marker.userData = "SOME_ID"
When I tap on the marker I can get this userData without problem from any marker.
let data = marker.userData
I also use Clastering for my markers. When markers are grouped to cluster and when they are moved out of cluster(ungroupped), marker.userData becomes nil. For all markers. Why does it happen and how to prevent it ?
Upvotes: 0
Views: 290
Reputation: 181
I also got this issue and after many try it didn't worked.
Finally I made subclass of GMSMarker
and declared a custom variable, and that solved the problem for me.
Upvotes: 1