kdykoli se pokusí vrátit na délku / šířku souřadnic pro mé současné umístění, moje pády aplikací bez vysvětlení chyby ...
NSLog(@%@, mapView.userLocation.location.coordinate);
Čekám, až se telefon najde místo i ...
kdykoli se pokusí vrátit na délku / šířku souřadnic pro mé současné umístění, moje pády aplikací bez vysvětlení chyby ...
NSLog(@%@, mapView.userLocation.location.coordinate);
Čekám, až se telefon najde místo i ...
mapView.userLocation.location.coordinateJe struct zatímco %@formát specifikátor očekává objekt. To bude fungovat:
NSLog(@"%f, %f", mapView.userLocation.location.coordinate.latitude,
mapView.userLocation.location.coordinate.longitude);
Z nějakého důvodu, že to není práce pro mě. To mě brát na souřadnicích (0.0000, 0.0000). Níže je můj kód, pokud máte možnost podívat se na to. Děkuji za pomoc!
[mapView setMapType:MKMapTypeStandard];
[mapView setZoomEnabled:YES];
[mapView setScrollEnabled:YES];
mapView.showsUserLocation=TRUE;
MKCoordinateRegion region = { {0.0, 0.0 }, { 0.0, 0.0 } };
CLLocationCoordinate2D myCoord = {mapView.userLocation.location.coordinate.latitude,mapView.userLocation.location.coordinate.longitude};
[mapView setCenterCoordinate:myCoord animated:YES];
region.span.longitudeDelta = 0.01f;
region.span.latitudeDelta = 0.01f;
[mapView setRegion:region animated:YES];
[mapView setDelegate:self];