使用Apple Map Kit从某个位置获取周围的邮政编码 [英] Getting surrounding zip codes from a location using Apple Map Kit
问题描述
我正在为自己的工作开始使用Map Kit,我有一个IOS项目正在研究涉及Map Kit的地方,我知道如何搜索位置并指出它的位置,但是我的问题是我的一部分该项目涉及获取我中心位置周围区域的下一个10-15邮政编码,并接收每个邮政编码中的城市,我真的不知道如何实现它,我需要帮助.一个解释或一小段代码将不胜感激.
I'm getting started on Map Kit for my job and I have a IOS project I am working on where it involves Map Kit, I know how to search for a location and pin point it but my issues is that part of my project involves getting the next 10-15 zip codes of the surrounding areas of my central location and receive the cities that are in each zip code, i really don't know how to implement it and I need help. an explanation or a snippet of code would be much appreciated.
推荐答案
MapKit中没有这样的邮政编码.您需要找到邮政编码数据的第三方来源(例如,代码+边界几何形状),找出对它们进行索引的方法(也许正在使用或预先计算
Zip codes like this aren't available in MapKit. You need to find a third-party source of zip code data (e.g. codes + bounding geometries), figure out a way to index them (perhaps be using or precalculating the centroid of each), and then figure out what's close to the selected point.
这篇关于使用Apple Map Kit从某个位置获取周围的邮政编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!