iPhone Google 地图中的路线、折线

发布于 2024-08-15 19:38:31 字数 590 浏览 3 评论 0原文

在我们的iPhone应用程序中,我们需要在Google Maps上绘制路线(GMaps是唯一的选择,我们不能考虑其他地图)。

我们在用户四处走动时绘制路线 - 基本上是 GPS 跟踪。然后我们在地图上显示所有保存的路线。问题是谷歌地图几乎无法使用。无法滚动地图、缩放地图(一切都非常慢)。

现在我们在方法中将路线绘制在透明层[UIColorclearColor]上 - (void)drawRect:(CGRect)矩形 这是通过 UIGraphicsGetCurrentContext 使用 [setNeedsDisplay] 调用的。 我们的任务是绘制一条路线(几乎就像在原生 iPhone GMaps 应用程序中一样),以便地图可滚动且易于缩放,并且路线不会出现故障。

作为我们需要做的示例,我可以指向此应用程序 http://itunes.apple.com/us/app/endomondo-tracker/id333210180?mt=8 也许您可以向我指出任何执行此操作的库? 感谢您的帮助。

In our iPhone app we need to draw a route on Google Maps (GMaps is the only option, we can't consider other maps).

We draw the route while the user walks around - GPS tracking basically. Then we display all saved routes on the map. The problem is that Google Maps is almost unusable. It is impossible to scroll the map, zoom it (everything is extremely slow).

Now we draw the route on a transparent layer [UIColor clearColor] in the method
- (void)drawRect:(CGRect)rect
which is called using [ setNeedsDisplay] through UIGraphicsGetCurrentContext.
Our task is to draw a route (almost like in native iPhone GMaps app) so that the map will be scrollable and easy to zoom and the route won't be glitchy.

As an example of what we need to do I can point to this app http://itunes.apple.com/us/app/endomondo-tracker/id333210180?mt=8
Maybe you can point me to any of the libraries that do this?
Thank you for your help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

屋檐 2024-08-22 19:38:31

您可能想看看 http://github.com/mobilemelting/nvpolyline
该解决方案特别针对 v.4.0 之前的 iPhone OS 版本,

尽管它也可以在 v.4.0 中使用
希望这有帮助。

You might want to have a look at http://github.com/mobilemelting/nvpolyline
This solution is especially targeted at iPhone OS versions prior to v.4.0

Although it can also be used in v.4.0
Hope this helps.

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