What marker is used in the Google Maps SDK ios?
I have a lot of markers in GMSMapView
. I want to know which marker is being used. I know there is a delegate - (BOOL)mapView:(GMSMapView *)mapView didTapMarker:(GMSMarker *)marker
. But my problem is that when I click any marker, I will show different information for each marker in infoWindow
. So, I have to know which marker is being used. How can i do this?
source to share
You can set the accessibilityLabel property of the marker at the time of its creation from your data.
For example, you create markers from an array of objects, and then set the marker.accessibilityLabel of each marker as its position in your array, so when the user will use any marker, just find its accessibilityLabel and so find the data from the array at that position.
source to share