I am integrating google maps sdk. Its all work fine. But how to remove particular Marker(Pin Point) when second will appear.(I am not using Mapkit)
I want the following:
swift 5
func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool
{
let alertcontrolserver = UIAlertController.init(title : nil, message : "Are you sure you want to Remove ! ", preferredStyle: .alert)
let okbtn = UIAlertAction(title: "Yes", style: .default, handler: { UIAlertAction in marker.map = nil
})
let cancelbtn = UIAlertAction(title: "No", style: .default, handler: nil)
alertcontrolserver.addAction(okbtn)
alertcontrolserver.addAction(cancelbtn)
self.present(alertcontrolserver, animated: true, completion: nil)
return true
}