有没有办法在 MapKit 的地图视图中的两个坐标之间画一条线?
我有两个地点。当前位置(=可见)和用户可能想去的目标位置。我可以从当前位置到目标位置画一条线吗?据我所知,我只能创建注释。但也许有一种方法可以在那里画画?
I have two locations. A current location (=visible) and a target location where the user may want to go to. could I make a line from my current location to the target location? as far as I get it, I can only create annotations. But maybe there's a way to just draw in there?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信您必须创建实现 MKAnnotation协议。
The Reluctant Blogger 有一些很好的示例代码来创建路由
I believe you have to create custom class that implements the MKAnnotation protocol.
There is some good sample code on doing this to create routes at The Reluctant Blogger