0
Mein Ziel ist es, Lat und Long zu den Google Maps zu analysieren, nehme an, dass mapView
ist das Ansichtsobjekt von GMSMapView
Klasse und ich habe es initialisiert.Wie analysiere ich Breiten- und Längengrade für Google Maps?
override func viewDidLoad() {
super.viewDidLoad()
locationManager.delegate = self
// Ask for Authorisation from the User.
self.locationManager.requestAlwaysAuthorization()
// For use in foreground
self.locationManager.requestWhenInUseAuthorization()
// This is where I will parse the lat and long
var coordinate: CLLocationCoordinate2D
coordinate = CLLocationCoordinate2D(latitude: 3.203119, longitude: 101.7276145)
mapView.projection.containsCoordinate(coordinate)
}
Jedes Mal, wenn ich es laufen, es zeigt nicht die Markierung der benutzerdefinierten Koordinaten