How to get info if I am in village or out of the village (city)? (iOS geocoder or Overpass API for OSM) [closed]

大城市里の小女人 提交于 2019-12-13 08:25:53

问题


Is there any way to find out if I am within village/city or out the village/city using iOS SDK (geocoder information) or Overpass API for OSM?

I know there are commercially APIs providing this feature, but I am wondering if it exists any API or service for free? I am working on pseudo-navigation app and I need this info about my current location.

Edit: For now I am using geocoding - placemark info about location - if thouroughfare is null or some number (street or road No.) - I am out the town. If there is some 'string' - it is street name and I am in the city. But this approach is very inaccurate. I am also considering using Overpass API for Open Street Maps and I am wondering if OSM provides such information. Thanks for any sugestions.

Thank you


回答1:


iOS location services provide information about the device's position, but not information about the context of the position, such as which city they are near and how close they are to it. Geographic data such as what you're interested in comes at a price, which is why there are commercial SDKs providing it.



来源:https://stackoverflow.com/questions/16256358/how-to-get-info-if-i-am-in-village-or-out-of-the-village-city-ios-geocoder-o

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!