这是一个用于解析/生成GPX文件的iOS框架。此框架从URL或字符串解析GPX文件,并创建Objective-C的GPX结构实例。
这个分支是iOS-GPX-Framework pod的源仓库。它已经被创建,以将静态框架依赖管理迁移到Cocoapods。
iOS-KML-Framework可以通过CocoaPods获取,要安装它,只需将以下行添加到您的Podfile中
platform :ios, '5.1'
pod 'iOS-GPX-Framework', "~> 0.0"
//Import the umbrella header
#import "KML.h"
//To parsing the GPX file, simply call the parse method :
GPXRoot *root = [GPXParser parseGPXWithString:gpx];
//You can generate the GPX :
GPXRoot *root = [GPXRoot rootWithCreator:@"Sample Application"];
GPXWaypoint *waypoint = [root newWaypointWithLatitude:35.658609f longitude:139.745447f];
waypoint.name = @"Tokyo Tower";
waypoint.comment = @"The old TV tower in Tokyo.";
GPXTrack *track = [root newTrack];
track.name = @"My New Track";
[track newTrackpointWithLatitude:35.658609f longitude:139.745447f];
[track newTrackpointWithLatitude:35.758609f longitude:139.745447f];
[track newTrackpointWithLatitude:35.828609f longitude:139.745447f];
Watanabe Toshinori,[email protected]
iOS-KML-Framework可在MIT许可下使用。有关更多信息,请参阅LICENSE文件。
它使用了TBXML 版权(c)2009 Tom Bradley