使用我不理解的MKDirections.calculate()
方法时,我收到一条错误消息。
我浏览了Apple的文档,但没有提及。我也曾使用Google进行过搜索,但仍然没有答案。
答案 0 :(得分:0)
看起来像MKErrorLoadingThrottled
code
参见MKErrorCode枚举
由于数据限制有效,因此未加载数据。
如果应用程序在短时间内频繁请求数据,则会发生此错误。
答案 1 :(得分:0)
根据文档
MKErrorUnknown = 1,
MKErrorServerFailure = 2,
MKErrorLoadingThrottled = 3,
MKErrorPlacemarkNotFound = 4,
MKErrorDirectionsNotFound = 5
MKErrorLoadingThrottled
意味着您在短时间内提出了太多请求。
可能是您循环调用MKDirections.calculate()
,或者有一个基于计时器调用MKDirections.calculate()
的函数。