有没有办法在 MapKit 的地图视图中的两个坐标之间画一条线?

发布于 2024-08-15 03:16:29 字数 84 浏览 2 评论 0原文

我有两个地点。当前位置(=可见)和用户可能想去的目标位置。我可以从当前位置到目标位置画一条线吗?据我所知,我只能创建注释。但也许有一种方法可以在那里画画?

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

未央 2024-08-22 03:16:29

我相信您必须创建实现 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文