I am trying to detect when a Google Maps marker has been unselected so that I can toggle the visibility of a button.
Below is my code to determine if a marker has been clicked.
func mapView(mapView: GMSMapView!, didTapMarker marker: GMSMarker!){
joinButton.isHidden = false
}
How can I determine when the marker has been unselected? I want my button only to appear when a user has clicked the marker.
This is how it was implemented in Android:
mMap.setOnInfoWindowCloseListener(new GoogleMap.OnInfoWindowCloseListener() {
@Override
public void onInfoWindowClose(Marker marker) {
joinButton.setClickable(false);
joinButton.setVisibility(View.INVISIBLE);
}
});