title: accessing current Location in google maps
body: <p>I have been looking at the google documentation  to get the  current location, but i am struggling to specify the location in the ViewDidLoad, as you can see i have set the Location fixed to Syndey Australia. In the google doc documentation when specifying the current location, they are using the "default location.coordinate" , i cannot access defaultLocation.coordinate in my code . </p>
  
  <p>here is a link to the documenation : <a href="https://developers.google.com/maps/documentation/ios-sdk/current-place-tutorial" rel="nofollow noreferrer">https://developers.google.com/maps/documentation/ios-sdk/current-place-tutorial</a></p>
  
  <p>this is the code inside the viewDidLoad</p>
  
  <pre><code>    GMSServices.provideAPIKey("AIzaSyARsPfNs54hrUAC4yKtHeu2jXfGjeA0b-E")
      GMSPlacesClient.provideAPIKey("AIzaSyARsPfNs54hrUAC4yKtHeu2jXfGjeA0b-E ")
      let camera = GMSCameraPosition.camera(withLatitude: -33.86, longitude: 151.20, zoom: 6.0)
      mapView = GMSMapView.map(withFrame: CGRect.zero, camera: camera)
      view = mapView
  
      // creating the marker //
  
      let marker = GMSMarker()
      marker.position = CLLocationCoordinate2D(latitude: -33.86, longitude: 151.20)
      marker.title = "Sydney"
      marker.snippet = "Australia"
      marker.map = mapView
  </code></pre>
  
  <p>This is my extenstion code </p>
  
  <pre><code> extension MapsViewController: CLLocationManagerDelegate {
       func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
       let location : CLLocation = locations.last!
       print("Location:\(location)")
       let camera = GMSCameraPosition.camera(withLatitude: location.coordinate.latitude, longitude: location.coordinate.longitude, zoom: zoomLevel)
       if mapView.isHidden {
          mapView.isHidden = false
          mapView.camera = camera
        } 
        else {
          mapView.animate(to: camera)
      }
  
  }
    func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
      switch status {
      case .restricted:
          // display the map the default location
          mapView.isHidden = false
      case .denied :
          print("User denied access to location")
          mapView.isHidden = false
      case .notDetermined :
          print("Location status not deteremined")
      case .authorizedAlways  : fallthrough
      case . authorizedWhenInUse :
          print("Location status is OK")
  
      }
  }
  </code></pre>