哼,它應該工作。這裏是我的代碼: 唯一的區別是,如果安裝FRA,我的方案會改變,那麼navigonFRA是首選。
NSString* scheme = @"navigonFRA";
if ((![NavigonApplication isFRInstalled]) && [NavigonApplication isWorldInstalled])
scheme = @"navigon";
NSString* urlAsString = nil;
urlAsString = [NSString stringWithFormat:@"%@://%@|%@|%@|%@|%@|%@|%@|%f|%f",
scheme,
@"myApp", // Field1/AppName:Application or Company Name (e.g. AroundMe)
thePOI.name, // Field2/NameOfPOI: Name of POI (e.g. Navigon AG Würzburg)
@"FRA", // Field3/Country: ISO 3166-1 alpha-3 code for country (http://unstats.un.org/unsd/methods/m49/m49alpha.htm) (e.g. DEU)
@"", // Field4/ZipCode: Postalcode, ZIP code of the POIs city (e.g. 97080)
thePOI.location.city, // Field5/City: Name of POIs city (e.g. Würzburg)
thePOI.location.streetAddress, // Field6/Street:POIs street name (e.g. Berliner Platz)
@"", // Field7/HouseNumber: POIs street/house number (e.g. 11)
thePOI.location.longitude, // Field8/Longitude: Longitude in WGS84 (e.g. 9.870)
thePOI.location.latitude]; // Field9/Latitude: Latitude in WGS84 (e.g. 49.938)
urlAsString = [urlAsString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"Starting Navigon app with %@", urlAsString);
NSURL*url = [[NSURL alloc] initWithString:urlAsString];
[[UIApplication sharedApplication ]openURL:url];
[url release];
而且此代碼正在工作。你有沒有檢查你的導航版本是> = v1.5?
沒人?請給我一個提示:) – rdesign 2010-06-07 13:29:47