开发者

Display location around current location?

In my map i need to display the locations which 开发者_C百科i am getting from a xml which are currently in a 200 mile radius from my current location. I have never done this thing before can you please suggest a way.

Thanks,


Look into CoreLocation. Particularly, the method distanceFromLocation: of the CLLocation class will prove useful to find nearby locations. Use CLLocationManager to find out the current location.

Since you will most likely retrieve latitudes and longitudes from your XML, CLLocations initWithLatitude:longitude: will be handy to initialize CLLocation objects that you can later pass to distanceFromLocation:.


This will be the best site you ever visit http://www.raywenderlich.com/2847/introduction-to-mapkit-on-ios-tutorial

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜