Quantcast
Channel: User AnthonyL - Stack Overflow
Viewing all articles
Browse latest Browse all 26

Listen for GoogleMaps Marker unselected swift

$
0
0

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);
        }
    });

Viewing all articles
Browse latest Browse all 26

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>