сначала установите камеру в метод loadView следующим образом:
override func loadView() {
// set mapView with settings
let camera = GMSCameraPosition.camera(withLatitude: 30.101932, longitude: 31.379173, zoom: 15.5)
let mapView = GMSMapView.map(withFrame: .zero, camera: camera)
mapView.delegate = self
mapView.isMyLocationEnabled = true
mapView.settings.compassButton = true
mapView.settings.myLocationButton = true
mapView.setMinZoom(8, maxZoom: 20)
self.mapView = mapView
view = mapView
}
, затем установите функцию маркера следующим образом
func drawMarker(lat: CLLocationDegrees , long: CLLocationDegrees, description : String) {
let marker = GMSMarker()
marker.position = CLLocationCoordinate2D(latitude: lat, longitude: long)
marker.icon = UIImage(named: "")
marker.map = mapView
}
, наконец, в функции viewDidLoad вызовите ваш метод
drawMarker(lat: Double("your value"), long: Double("your value"), description: "")