我正在使用HERE iOS SDK,正在实现转弯导航,但是未调用import matplotlib.pyplot as plt
x = 1.283
ax = plt.subplot(1, 1, 1)
ax.set_xlim(left=1.25, right=1.35) # optional
movepoint, = ax.plot(x, 0.02, 'rv') # the ',' makes movepoint the Line2D instance instead of a 1-element list
# plt.pause(1) # not sure what purpose that would serve
while x <= 1.3:
x += 0.001
movepoint.set_xdata([x])
plt.pause(0.1) # long enough to see something
中的方法didUpdateManeuvers
或其他任何方法。
当我尝试模拟移动和使用时:
NMANavigationManagerDelegate
一切正常,但是当我模拟在let source = NMARoutePositionSource(route: route.route)
NMAPositioningManager.sharedInstance().dataSource = source
文件中移动或进行实时测试时,不会调用委托方法...
我的代码:
GPX
我想跟踪,如果用户使用错误的方式,应该何时更改操作或何时需要创建新路线。我会很感谢您的帮助。
答案 0 :(得分:1)
您的代码段对我有用。确保没有任何控制台错误:
Access to this operation is denied.
或
This app has attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain both “NSLocationAlwaysAndWhenInUseUsageDescription” and “NSLocationWhenInUseUsageDescription” keys with string values explaining to the user how the app uses this data
NMAHEREPositionSource需要在Info.plist中设置NSMotionUsageDescription键。您可以检查NMADevicePositionSource是否适合您。
要模拟GPX文件的移动,请使用NMALoggedPositionSource
要强制定位广播,可以使用startPositioning
答案 1 :(得分:0)