When the view loads on initial launch(tap of icon/run program), the google Map View starts in the united kingdom then teleports to my current location in a very abrupt manner. Nowhere in my code do I have any UK Coordinates that I would think would cause it to load there then teleport to my location.
How can I solve this issue and make the launch process more elegant?
let locationManager = CLLocationManager()
let googleMapView: GMSMapView!
override func viewDidLoad() {
super.viewDidLoad()
self.locationManager.requestAlwaysAuthorization()
self.locationManager.requestWhenInUseAuthorization()
if CLLocationManager.locationServicesEnabled() {
locationManager.delegate = self
locationManager.desiredAccuracy = kCLLocationAccuracyBest
locationManager.startMonitoringSignificantLocationChanges()
}
}
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
self.googleMapView = GMSMapView(frame: self.mapViewContainer.frame)
self.view.addSubview(self.googleMapView)
self.googleMapView.myLocationEnabled = true
self.googleMapView.settings.compassButton = true
}