问题标签 [here-ios]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
229 浏览

ios - 设置手势委托时无法选择地图对象

这是与HERE iOS HybridPlus SDK相关的问题。

如果使用类的 mapView 完成了任何交互NMAMapViewNMAMapViewDelegate并且NMAMapGestureDelegate两者都设置了,那么只有方法NMAMapGestureDelegate被调用。

例如:

如果点击地图上的对象,则被- mapView:didReceiveTapAtLocation:调用且 - mapView:didSelectObjects:不会被调用!

而在android中情况并非如此。在 android 中,如果一个对象被点击并且两个代表都被设置,那么上面提到的两个方法都会被调用。

问题:在 iOS 中解决这个问题的方法是什么?

0 投票
1 回答
345 浏览

ios - 获取 NMAMapMarker 的坐标

我正在使用 Here Maps 离线地图。我添加了四个 MapMarkers (annotations) 。现在我想使用 didSelectObjects:(NSArray *)objects 方法获取地图标记的 NMAGeoCoordinates。此方法返回值,但不返回 MapMarker 的坐标。请指导我如何在选择标记时获取标记的坐标。提前致谢。

0 投票
2 回答
600 浏览

ios - HERE Maps Distance to Destination 总是返回高值

我在这里的地图中计算了一条路线,并使用该路线开始了转弯导航。离线时一切正常,当我尝试使用计算到达目的地的距离时

上述方法返回的值非常高,例如 184467440737095520000。即使对于不同的路由,返回值始终为 184467440737095520000。当我提到导航管理器委托时,我发现此方法将返回以米为单位的值。但是即使这个返回值也太高了我的目的地的距离..请指导我如何正确计算到我的目的地的距离..提前谢谢

0 投票
1 回答
135 浏览

ios - 这里 Maps getMapPackageAtGeoCoordinates not Working 并抛出错误

当我参考 HereMap 文档时,我发现我们可以使用 getMapPackageatcoordinates Method 下载我们想要的任何区域。我尝试通过传递我的当前位置(NMAGeoCoordinate)来下载该区域。但是我的应用程序因错误而崩溃

我还附上了我用来使用 getMapPackageatcoordinates 方法获取地图包的代码

我已经通过了 getMapPackageatcoordinates 方法的预期数据类型,即 NMAGeoCoordinates。但是我的应用程序仍然因以下错误而崩溃。请指导我该怎么做以及应该将哪种数据类型传递给 getMapPackageatcoordinates 方法。

-[__NSCFConstantString escapeURLQueryParam]:无法识别的选择器发送到实例 0x101024968

0 投票
1 回答
502 浏览

ios - NMACoreRouter calculateRouteWithStops 无回调(swift)

我正在尝试在 Swift 中使用 Here API 创建一条路线,但我遇到了一些问题,因为从未调用过完成块,所以我无法确切知道问题出在哪里。这是我的代码:

有人对这个问题有任何想法吗?

PS app id、app code和license key都没有问题。在 AppDelegate 中成功设置了 NMAApplicationContext

0 投票
1 回答
515 浏览

here-api - Here Map Swift SDK 计算路由总是出错

我在 Xcode 8.2、Swift 3 上使用 Here Maps 的 Premium SDK for iOS。目前,我可以显示地图,找到我当前的位置,并将地图居中到我当前的位置。

但是,当我尝试使用 NMACoreRouter 计算路线时,它总是返回错误。以下是我的部分代码:

错误总是出现并且有 NMARoutingError

有人能告诉我我做错了什么吗?

0 投票
1 回答
202 浏览

ios - 支持室内 3D 场地的 HERE Maps 逐向导航?

我正在尝试在建筑物(室内)内的两个 3D 场地空间之间进行路由,并启动了转弯导航。

我发现,没有办法将“NMAVenue3dCombinedRoute”类型的路线转换为所需的“NMARoute”类型来启动 Turn-By-Turn-Navigation:

任何想法,将不胜感激。谢谢你。

0 投票
1 回答
259 浏览

ios - iOS/Swift :: HERE Maps 在初始化期间偶尔崩溃 => [NSCFString hac_toVariant]

我目前在使用 HEREMaps 的两个不同项目中遇到问题。在通过 NMAApplicationContext.set(...) 初始化后,应用程序正在崩溃,并给出以下日志:

2017-05-02 10:15:25.372 ANIO[3574:431630]-[ NSCFString hac_toVariant]:无法识别的选择器发送到实例 0x618000027560 2017-05-02 10:15:25.403 ANIO[3574:431630] *** 终止应用程序到期to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString hac_toVariant]: unrecognized selector sent to instance 0x618000027560' *** First throw call stack: ( 0 CoreFoundation 0x000000010edccb0b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010e41c141 objc_exception_throw + 48 2 CoreFoundation 0x000000010ee3c134-[NSObject(NSObject) 不识别选择器:] + 132 3 核心基础 0x000000010ed53840 ___forwarding_+ 1024 4 CoreFoundation 0x000000010ed533b8 _CF_forwarding_prep_0 + 120 5 ANIO 0x000000010d67819a _Z29PathToFileInWritableDirectoryP8NSString + 19706 6 ANIO 0x000000010d6bd98c _ZN6smart518segments_intersectExxxxxxxxPxS0_ + 55445 7 ANIO 0x000000010d6cdd8a _ZNSt3__110__list_impIN6smart517OrientedPointPairINS1_7geopt_tEEENS_9allocatorIS4_EEE5clearEv + 13288 8 ANIO 0x000000010d6cd1bb _ZNSt3__110__list_impIN6smart517OrientedPointPairINS1_7geopt_tEEENS_9allocatorIS4_EEE5clearEv + 10265 9 ANIO 0x000000010d6ee8a9 _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 97469 10 ANIO0x000000010d6ee778 _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 97164 11 ANIO 0x000000010d6ee93e _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 97618 12 ANIO 0x000000010d6ef293 _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 100007 13 ANIO 0x000000010d6ecebc _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 90832 14 libdispatch.dylib 0x00000001122c44a6 _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x00000001122ed05c _dispatch_client_callout + 8 16 libdispatch.dylib 0x00000001122cb94f _dispatch_queue_serial_drain + 221 17 libdispatch.dylib 0x00000001122cc669 _dispatch_queue_invoke + 1084 18 libdispatch.dylib 0x00000001122ceec4 _dispatch_root_queue_drain + 634 19 libdispatch.dylib 0x00000001122cebef _dispatch_worker_thread3 + 123 20 libsystem_pthread.dylib 0x0000000112684746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x0000000112684221 start_wqthread + 13 ) libc++abi.dylib:以 NSException 类型的未捕获异常终止dylib 0x00000001122cc669 _dispatch_queue_invoke + 1084 18 libdispatch.dylib 0x00000001122ceec4 _dispatch_root_queue_drain + 634 19 libdispatch.dylib 0x00000001122cebef _dispatch_worker_thread3 + 123 20 libsystem_pthread.dylib 0x0000000112684746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x0000000112684221 start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of类型 NSExceptiondylib 0x00000001122cc669 _dispatch_queue_invoke + 1084 18 libdispatch.dylib 0x00000001122ceec4 _dispatch_root_queue_drain + 634 19 libdispatch.dylib 0x00000001122cebef _dispatch_worker_thread3 + 123 20 libsystem_pthread.dylib 0x0000000112684746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x0000000112684221 start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of类型 NSExceptiondylib 0x0000000112684746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x0000000112684221 start_wqthread + 13) libc++abi.dylib: 以 NSException 类型的未捕获异常终止dylib 0x0000000112684746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x0000000112684221 start_wqthread + 13) libc++abi.dylib: 以 NSException 类型的未捕获异常终止

有人面临同样的问题吗?任何想法?摆脱此错误的唯一方法是卸载/安装应用程序。

亲切的问候,

迈克尔


好的,简短的更新...该错误很容易重现。

1.)从 [link] https://developer.here.com/mobile-sdks/documentation/ios-starter/topics/quick-start.html下载示例代码

2.)按照步骤包含 NMAKit-framework 和 NMAKit-bundle

3.)构建并运行(Xcode 版本 8.3.2 (8E2002))。目标模拟器/硬件无关紧要(尝试过 iPhone 6/7/s 模拟器和硬件)。即使使用 Obj-c 或 Swift 示例也没有任何区别。

第一次开始一切都很好。第二次启动导致崩溃。

2017-05-02 13:38:34.331 HelloMap[16821:1642096]-[ NSCFString hac_toVariant]:无法识别的选择器发送到实例 0x7f80266079a0 2017-05-02 13:38:34.342 HelloMap[16821:1642096] *** 终止应用程序to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString hac_toVariant]: unrecognized selector sent to instance 0x7f80266079a0' *** First throw call stack: ( 0 CoreFoundation 0x000000010d9d9d85 __exceptionPreprocess + 165 1 libobjc.A.dylib 0x000000010d44ddeb objc_exception_throw + 48 2 CoreFoundation 0x000000010d9e2d3d -[NSObject(NSObject) 不识别选择器:] + 205 3 核心基础 0x000000010d928cfa ___forwarding_+ 970 4 CoreFoundation 0x000000010d9288a8 _CF_forwarding_prep_0 + 120 5 HelloMap 0x000000010cb6e9de _Z29PathToFileInWritableDirectoryP8NSString + 19706 6 HelloMap 0x000000010cbb41cc _ZN6smart518segments_intersectExxxxxxxxPxS0_ + 55445 7 HelloMap 0x000000010cbc4534 _ZNSt3__110__list_impIN6smart517OrientedPointPairINS1_7geopt_tEEENS_9allocatorIS4_EEE5clearEv + 13288 8 HelloMap 0x000000010cbc3965 _ZNSt3__110__list_impIN6smart517OrientedPointPairINS1_7geopt_tEEENS_9allocatorIS4_EEE5clearEv + 10265 9 HelloMap 0x000000010cbe5009 _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 97469 10 HelloMap0x000000010cbe4ed8 _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 97164 11 HelloMap 0x000000010cbe509e _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 97618 12 HelloMap 0x000000010cbe59f3 _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 100007 13 HelloMap 0x000000010cbe361c _ZNSt3__16vectorI11_GLKVector2NS_9allocatorIS1_EEE26__swap_out_circular_bufferERNS_14__split_bufferIS1_RS3_EE + 90832 14 libdispatch.dylib 0x000000010fe90d9d _dispatch_call_block_and_release + 12 15 libdispatch.dylib 0x000000010feb13eb _dispatch_client_callout + 8 16 libdispatch.dylib 0x000000010fe9782c _dispatch_queue_drain + 2215 17 libdispatch.dylib 0x000000010fe96d4d _dispatch_queue_invoke + 601 18 libdispatch.dylib 0x000000010fe99996 _dispatch_root_queue_drain + 1420 19 libdispatch.dylib 0x000000010fe99405 _dispatch_worker_thread3 + 111 20 libsystem_pthread.dylib 0x00000001101ee746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x00000001101ee221 start_wqthread + 13 ) libc++abi.dylib:以 NSException 类型的未捕获异常终止dylib 0x000000010fe96d4d _dispatch_queue_invoke + 601 18 libdispatch.dylib 0x000000010fe99996 _dispatch_root_queue_drain + 1420 19 libdispatch.dylib 0x000000010fe99405 _dispatch_worker_thread3 + 111 20 libsystem_pthread.dylib 0x00000001101ee746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x00000001101ee221 start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of类型 NSExceptiondylib 0x000000010fe96d4d _dispatch_queue_invoke + 601 18 libdispatch.dylib 0x000000010fe99996 _dispatch_root_queue_drain + 1420 19 libdispatch.dylib 0x000000010fe99405 _dispatch_worker_thread3 + 111 20 libsystem_pthread.dylib 0x00000001101ee746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x00000001101ee221 start_wqthread + 13 ) libc++abi.dylib: terminating with uncaught exception of类型 NSExceptiondylib 0x00000001101ee746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x00000001101ee221 start_wqthread + 13 ) libc++abi.dylib:以 NSException 类型的未捕获异常终止dylib 0x00000001101ee746 _pthread_wqthread + 1299 21 libsystem_pthread.dylib 0x00000001101ee221 start_wqthread + 13 ) libc++abi.dylib:以 NSException 类型的未捕获异常终止

0 投票
1 回答
66 浏览

ios - NMACoreRouter 是 Premium Here Maps 框架的一部分吗?

在 Here Maps iOS SDK 免费版(90 天试用版)的 NMAKitFramework 中,我找不到 NMACoreRouter.h 文件。它仅包含在高级版本中吗?

0 投票
1 回答
67 浏览

ios - HERE iOS SDK:Places API make*Request 总是返回 nil

我是 Here iOS SDK 的新手,我正在尝试通过搜索某个位置周围的位置来使用位置 API。我做了一个pod try HEREMapsStarter并尝试了以下代码:

但这不起作用,因为 result 和 result2 都为零。我在这里想念什么?