如何强制接收iOS上的反向地理编码数据的语言? [英] How to force language in which reverse geocoding data on iOS is received?
问题描述
当我打电话
geocoder reverseGeocodeLocation:currentLoc completionHandler:
我根据iphone上设置的语言设置获得所有语言的数据(城市,县,...)。
i get all the data (city, county, ...) in a language according to locale set on iphone.
我如何强制总是用英语获取这些数据?
How can i force to always get this data in English?
推荐答案
你不能强制使用地理语言从 CLGeocoder
或 MKReverseGeocoder
中检索的数据。它始终是设备的系统语言。
如果您想获得英文数据,您需要构建自己的地理编码器,使用 Google Maps API 。
You can not force the language of the geo data retrieved from CLGeocoder
or MKReverseGeocoder
. It will always be the system language of the device.
If you want to get the data in English you need to built your own geocoder which is relatively easy to implement with the Google Maps API.
以下是Google Maps API中受支持语言的电子表格:
https://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1
Here is a spreadsheet of the supported languages in Google Maps API: https://spreadsheets.google.com/pub?key=p9pdwsai2hDMsLkXsoM05KQ&gid=1
这篇关于如何强制接收iOS上的反向地理编码数据的语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!