0

这真的让我很沮丧。我使用了 Navigon 本身提供的文档。不幸的是,它没有按预期工作。Navigon 启动,但在主菜单处停止。

我所做的就是:

NSString *myTestStr = [NSString stringWithFormat:@"navigon://App|Another place|FRA|75008|PARIS|rue de Turin|17|2.324621|48.881273"];

   NSString *navigonStrEsc = [myTestStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
   NSLog(@"navigonStr: %@", navigonStrEsc);
   [[UIApplication sharedApplication] openURL:[NSURL URLWithString:navigonStrEsc]];

任何想法我的方式有什么问题?

多谢!

4

3 回答 3

3

最后我找到了正确的解决方案。Navigon 应用程序交换纬度和经度值的秘密成分。

使用此自定义 url 方案传递导航目的地坐标(传递的坐标必须在加载的地图上):navigon://coordinate/YourAppName/longitude/latitude

例如:navigon://coordinate/NaviCard/19.084443/47.573305

于 2013-02-14T17:58:17.020 回答
0

我发现了问题,第一个字段(AppName)非常重要。

以下 html 链接现在可以使用:

<a href="navigon://Safari|Some nice place||||||9.937156|49.800074">Some nice place</a>

信息:我昨天打电话给navigon支持,接电话的女人很无助而且非常咄咄逼人,我现在正在考虑使用TomTom :)

于 2010-07-08T08:28:53.820 回答
0

hum it should work. Here's my code: The only diff is that my scheme changes if FRA is installed , then navigonFRA is prefered.

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];

And this code is working. Did you check that your navigon version is >= v1.5 ?

于 2010-06-10T13:20:40.463 回答