What would be an appropriate command for removing formattedCoordinate from the array? I know a removeObject exists for Objective-C, but how about Swift?
var markersArray: Array<CLLocationCoordinate2D> = []
func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker){
let lat: CLLocationDegrees = marker.position.latitude
let lng: CLLocationDegrees = marker.position.longitude
var formattedCoordinate = CLLocationCoordinate2D(latitude: lat,longitude: lng)
//markersArray.remove(formattedCoordinate) need to fix this
self.clean()
// return 0; not sure if we need this here
}
func mapView(_ mapView: GMSMapView, didBeginDragging marker: GMSMarker){
let lat: CLLocationDegrees = marker.position.latitude
let lng: CLLocationDegrees = marker.position.longitude
var formattedCoordinate = CLLocationCoordinate2D(latitude: lat,longitude: lng)
// markersArray.remove(formattedCoordinate) need to fix this
}