问题
I can add many markers and circles on google map with in "didTapAt" event, but I want to delete them as well, for markers I can do this in "didTap marker" event but how can I delete its shape not other shape?
回答1:
let circle = GMSCircle(position: CLLocationCoordinate2D(latitude: 40.7336299, longitude: 30.1616061, radius: 10)
circle.isTappable = true
circle.map = mapView
func mapView(_ mapView: GMSMapView, didTap overlay: GMSOverlay) {
overlay.map = nil
}
来源:https://stackoverflow.com/questions/51591167/how-to-delete-the-shapecircle-on-google-map-when-tap-on-marker