Set more than one Marker into Google Maps

Here is a helpful class

class MyCustomMap: GMSMapView {

var markers: [Marker]                   = [] // array of custom marker to be shown in the map
var defaultZoom: Float                  = 10 //default zoom level of the map

override func awakeFromNib() {
    super.awakeFromNib()

    settings.rotateGestures = true
    isMyLocationEnabled = true
    settings.setAllGesturesEnabled(true)

}

func removeAllMarkers() {

    for eachMarker in markers {
        eachMarker.map = nil
    }

}

/// Sets the zoom level of the map to show all the marker at once with in the screen
func showAllMarkers(for markers: [Marker]) {

    var bounds = GMSCoordinateBounds()
    for marker in markers {
        bounds = bounds.includingCoordinate(marker.position)
    }
    let update = GMSCameraUpdate.fit(bounds, withPadding: 100.0)
    animate(with: update)

}

// MARK: - Private

func createMarker(with marker: Marker) {
    markers.append(marker)
    marker.map = self
}

func createMarkers(with markers: [Marker]) {

    for eachMarker in markers {
       createMarker(with: eachMarker)
    }

}
}