IOS-Offline-GeoCoder 0.0.4

IOS-Offline-GeoCoder 0.0.4

测试已测试
语言语言 Obj-CObjective C
许可证 Apache-2.0
发布最后发布2018年4月

Soheilbm维护。



  • Soheilbm

IOS-Offline-GeoCoder

反向地理编码的离线版本,用于获取国家名称和ISO代码。

安装

要使用此类,只需将其添加到您的Podfile中。

pod 'IOS-Offline-GeoCoder'

如果您不使用CocoaPods,请下载此项目并将“Classes”目录复制到您的项目中。

在您的头文件中导入reverseGeoCoder。

#import "reverseGeoCoder.h"

使用以下方式实例化reverseGeoCode:

// --- Initializing reverseGeoCode
reverseGeoCoder *reverseGeoCode = [[reverseGeoCoder alloc]init];
// --- Locations
CLLocation *location = [[CLLocation alloc]initWithLatitude:41.0987947 longitude:-86.9682634];
    
NSString *countryName = [reverseGeoCode getCountryDetailWithKey:KeyName withLocation:location];

NSString *countryISO  = [reverseGeoCode getCountryDetailWithKey:KeyISO2A withLocation:location];

您可以从反向地理编码中检索出三种类型的数据。

###1. KeyName
// 国家名称 ###2. KeyISO2A
// ISO Alpha-2 ###3. KeyISO3A
// ISO Alpha-3

您可以使用这些键中的任何一个来获取位置的详细信息。

如果您喜欢这个仓库,请随时发送您的pull请求。

许可证

本项目最初由krisrak创建 => https://github.com/krisrak/ios-offline-reverse-geocode-country