1
MKMapViewにいくつかの場所を表示しようとしています。 mapViewControllerをロード中、コンソールで次のエラーメッセージが表示されます。iOS 5.1でMKMapViewを読み込めません。
__GEORegisterNetworkDefaults_block_invoke_0:私は自分のアプリケーションのためのXcode 4.3とiOS 5.1を使用していますcom.apple.geod.defaults
にGEODに接続できませんでした。
私はアドレスを表示するには、次のコードを使用しています:
- (void) showAddress
{
MKCoordinateRegion region;
MKCoordinateSpan span;
span.latitudeDelta = 0.2;
span.longitudeDelta = 0.2;
CLLocationCoordinate2D location = [self addressLocation];
region.span = span;
region.center = location;
}
とコードを次の中からアドレス位置を取得するための
。私はmapkitチュートリアルをGoogle-(CLLocationCoordinate2D) addressLocation
{
NSString *urlString = [NSString stringWithFormat:@"http://maps.google.com/maps/geo?q=%@&output=csv",
[@"cupertino" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
NSError *err;
NSString *locationString = [NSString stringWithContentsOfURL:[NSURL URLWithString:urlString] encoding:NSUTF8StringEncoding error:&err];
NSArray *listItems = [locationString componentsSeparatedByString:@","];
double latitude = 0.0;
double longitude = 0.0;
if([listItems count] >= 4 && [[listItems objectAtIndex:0] isEqualToString:@"200"])
{
latitude = [[listItems objectAtIndex:2] doubleValue];
longitude = [[listItems objectAtIndex:3] doubleValue];
}
CLLocationCoordinate2D location;
location.latitude = latitude;
location.longitude = longitude;
return location;
}
その後、私は上記のエラーを取得していますなぜhttp://mithin.in/2009/06/22/using-iphone-sdk-mapkit-framework-a-tutorial
から上記のコードは誰でも知っていましたか?
私は、プロジェクトの設定で「特権」やそれに類するものが得られませんでした。 –