0

I am stuck with some lack of xcode / iOS programming knowledge.

I have created a track in google maps for iOS, and programmatically created markers along this track. What I would like to do is update these markers with actual information in the .title / .snippet (ie. distance to go, time to go etc) or remove them all together. But when you create markers in a loop there is no way of keeping track of them. since the amount of markers can vary from 2 to 50 it would be strange in my opinion to create 50 different variables for each marker, I guess there must be another way?

martin010
  • 407
  • 1
  • 5
  • 14

1 Answers1

0

You can keeping track of created markers. Each GMSMarker has property userData. You can add some string tag or other custom object to identify this marker.

e.g. marker.userData = @{@"key" : @"some tag"};

gaRik
  • 607
  • 6
  • 10