如何判断mapkit是否无法获取用户位置?
我想知道如果mapkit无法获取用户位置(无法在用户位置显示蓝色斑点)并显示警报,然后再次重新定位位置。我不想使用corelocation.plz帮助我。
I want to find that if mapkit failed to get user location(fails to show blue blob at user location) and show alert and then relocate the location again.i don't want to use corelocation.plz help me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试使用被调用的委托方法来查看是否需要蓝点:
您可以假设仅在地图套件已知位置后才需要蓝点。但是,我认为这不是一个好主意,因为这些东西可能很容易在下一版本的 SDK 中损坏。
我建议使用核心位置。它相对易于使用,并为您提供长期的灵活性和稳定性。
You might try to use the delegate methods that gets called to see if the blue dot is being asked for:
You could assume that the blue dot is only asked for after the location is known to map kit. However, I think this would not be a good idea as those things might easily break in the next version of the SDK.
I would recommend to use Core Location. It is relatively easy to use and gives you all the flexibility and stability over the long run.