Get location name from Latitude & Longitude in iOS

前端 未结 12 1052
遥遥无期
遥遥无期 2020-11-28 07:30

I want to find current location name from latitude and longitude,

Here is my code snippet I tried but my log shows null value in all the places except in place

12条回答
  •  南笙
    南笙 (楼主)
    2020-11-28 07:36

    If the location you are trying to get is listed in this list then there is something wrong in your code..

    http://developer.apple.com/library/ios/#technotes/tn2289/_index.html#//apple_ref/doc/uid/DTS40011305

    otherwise CLGeoCoder doesnt have addresses to other countries.

    I faced the same problem so i used this to get the address.. Gives a really accurate address.

    http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true_or_false

提交回复
热议问题