IIReverseNominatim 0.1.3

IIReverseNominatim 0.1.3

Ilya Yachin维护。



  • Ilya Yachin

IIReverseNominatim

又一个Nominatim逆地理编码器。与众不同的地方是它以GeocodeJSON格式请求数据。

这里没有什么特殊之处。

let nominatim = IIReverseNominatim()
nominatim.reverseGeocode(lat: 52.2620898, lon: 104.3203629){
    switch $0 {
    case .success(let resp):
        guard let s = resp.features, s.count > 0 else { return }
        print(geocoding?.label ?? geocoding?.name ?? "")
    case .failure(let e):
        print(e)
    }
}

安装

  • 使用Cocoa Pods
pod 'IIReverseNominatim'
  • 使用Swift PM
.package(url: "https://github.com/illabo/IIReverseNominatim.git", from: "0.1.1")