这是一个用于解析/生成 KML 文件的 iOS 框架。此框架从 URL 或字符串中解析 KML,并创建 KML 结构的 Objective-C 实例。
此分支是 "iOS-KML-Framework" Pod 的源仓库。
iOS-KML-Framework 通过 CocoaPods 提供,要安装它,只需将以下行添加到您的 Podfile 中
platform :ios, '5.1'
pod 'iOS-GPX-Framework', "~> 0.0"
#import "KML.h"
// Parsing the KML
KMLRoot *root = [KMLParser parseKMLWithString:kml];
// Generating the KML
KMLRoot *root = [KMLRoot new];
KMLDocument *doc = [KMLDocument new];
root.feature = doc;
KMLPlacemark *placemark = [KMLPlacemark new];
placemark.name = @"Simple placemark";
placemark.descriptionValue = @"Attached to the ground.";
[doc addFeature:placemark];
KMLPoint *point = [KMLPoint new];
placemark.geometry = point;
KMLCoordinate *coordinate = [KMLCoordinate new];
coordinate.latitude = 37.422f;
coordinate.longitude = -122.082f;
point.coordinate = coordinate;
Watanabe Toshinori, [email protected]
iOS-KML-Framework 可在 MIT 许可下获得。有关更多信息,请参阅 LICENSE 文件。
它使用 TBXML 版权 (c) 2009 Tom Bradley