Карты Bing в приложении для iPhone - PullRequest
1 голос
/ 01 сентября 2010

Как интегрировать Bing Maps в приложение для iPhone? Я делаю, используя VirtualEarthKit Framework [веб-сайт для размещения вредоносных программ]. Мой код, как показано ниже: Я получаю ошибку при получении токена.

{
 VECommonService *commonService = [[VECommonService alloc] init];
 NSString *token;
 printf("2\n");
 NSError *error=[commonService getToken:&token forUserID:@"abc" password:@"def" ipAddress:@"123"];

 NSString *errMsg= [error description];
 printf("\n%s\n",[errMsg UTF8String]);

  printf("3\n");

 VEGeocodeService *geocodeService = [[VEGeocodeService alloc] init];

 VEGeocodeRequest *geocodeRequest = [[VEGeocodeRequest alloc] init];
  printf("4\n");
 geocodeRequest.query = @"Portland State University";
 geocodeRequest.token = token;

printf("5\n");

 VEServiceResponse *geocodeResponse = [geocodeService geocode:geocodeRequest];

 VEGeocodeResult *geocodeResult = [geocodeResponse.results objectAtIndex:0];


 //NSLog([geocodeResult.location description]);
 //NSLog([geocodeResult.address description]);

 VEImageryService *imageryService = [[VEImageryService alloc] init];

 VEGetMapURIRequest *mapRequest = [[VEGetMapURIRequest alloc] init];

 mapRequest.center = geocodeResult.location;
 mapRequest.token = token;


 VEGetMapURIResponse *mapResponse = [imageryService getMapURI:mapRequest];





 NSURL *url = mapResponse.mapURL;

 //printf("\n\n URL==> %s",[url relativeString]);
 NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
 [webView loadRequest:requestObj];
 [self.view addSubview:webView]; 
}

есть ли способ использовать карты Bing в приложении для iPhone?

...