Gpx 解析器或 GPX 文档
我正在开发一个 iOS 5 应用程序。
我想开发一个 GPX 解析器,但我想知道在我开始开发它之前是否已经开发了一个。
你知道是否有 Objective-c GPX 解析器吗?
I'm developing an iOS 5 application.
I want to develop a GPX parser but I'm wondering if there is one developed before I start to developing it.
Do you know if there is an Objective-c GPX parser?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(4)
看看:
http://terrabrowser.googlecode.com/svn/trunk/
在这里您可以找到 GPSFileParser。 m 和 GPSFileParser.h 可能对您有帮助。
Have a look at:
http://terrabrowser.googlecode.com/svn/trunk/
There you will find GPSFileParser.m and GPSFileParser.h which may help you.
我已经在 gpx-api 上工作了一段时间。它将读取 gpx 文件并具有可用的数据模型(在我看来)。
I have been working on the gpx-api for a little while. It will read gpx files and has a data model that is useable (in my opinion).
目前 Obejective-C 没有特定的 GPX 解析器。
但这并不是真正的问题,因为 GPX 只是 XML,因此您可以使用任何 XML 解析器来处理 GPX 数据。看看 Ray Wenderlich 有关 iOS XML 解析器的教程 中提供了一些示例。
There is no specific GPX parser for Obejective-C at present.
This is not really a problem though since GPX is just XML, so you can use any XML parser to work with GPX data. Take a look at Ray Wenderlich's tutorial on iOS XML parsers for some examples.
我意识到这是一个老问题,但我刚刚开始使用这个 GPX 解析器:
https:// github.com/patricks/gpx-parser-cocoa
是从这个分叉出来的:
https://github.com/fousa/gpx-parser-ios
下面是我正在使用的代码。它假设您已将 IBOutlet (self.theMapView) 连接到 MKMapView,您已设置委托并将 MapKit 框架添加到您的目标,并且您已获得有效的 gpx 文件(称为 test-gpx.gpx)在您的项目中。我在 Mac 应用程序中使用它,但我认为该代码也适用于 iOS。
下面 @Dave Robertson 提到的 iOS GPX Framework 看起来不错,所以我可能会切换到那在某个时刻。
I realise this is an old question, but I've just started using this GPX parser:
https://github.com/patricks/gpx-parser-cocoa
which is forked from this one:
https://github.com/fousa/gpx-parser-ios
Below is the code I'm using. It assumes you've got an IBOutlet (self.theMapView) hooked up to your MKMapView, that you've set the delegate and added the MapKit framework to your target, and that you've got a valid gpx file (called test-gpx.gpx) in your project. I'm using this in a Mac app, but I think the code will also work in iOS.
The iOS GPX Framework mentioned by @Dave Robertson below looks good, so I might switch over to that at some point.