简体   繁体   中英

how to get latitude and longitude from the address in MKMapkit?

我已经实现了一个应用程序。我想从地址中获取经度和纬度。我不想使用Java脚本。是否可以,请帮帮我。

AFAIK,MKMapKit不支持此功能。

MapKit has no geocoding support (only reverse geocoding) but Google offers a HTTP Geocoding service that's very easy to use – assuming you comply with their license terms:

Note: the geocoding service may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited.

使用Apple的《位置感知编程指南:对位置数据进行地理编码》中的示例来精确定位您在地图上的位置,然后调用Google Geocoding Service(发布请求,解析结果json / xml数据)以获取地址。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM