Reputation: 229
I have used Google map in my iOS application. I have placed markers on the map. I want based on filter selected the marker should be placed.For example mumbai has three location and pune has 2 location. Based on the filter marker marker should be shown
Upvotes: 1
Views: 118
Reputation: 20804
you need to add your markers on a dictionary with key of your desired city and value an array of markers, Then when you want to show one city, you need make a cycle over your markers and set .map = yourViewMap, and if you want to remove all markers from one city (is the same but setting .map = nil)
I hope this helps you
Upvotes: 1