CLGeocoder Only Returning One Placemark

后端 未结 2 1304
-上瘾入骨i
-上瘾入骨i 2020-12-30 10:38

I have a problem with CLGeocoder where when I call geocodeAddressString:withCompletionHandler I only ever get one result back, despite knowing that the inputted

相关标签:
2条回答
  • 2020-12-30 10:49

    Instead of UK use United Kingdom it will give you some related result.
    Try to add some more info in your address.
    One more thing UK is not a valid country code it's GB but it seems that putting GB instead of UK didn't solve the problem.
    Moreover CLGeocoder is not as smart as Google Maps API right now because apple uses its own server to decode addresses so you can use Google services.

    0 讨论(0)
  • 2020-12-30 10:54

    I dont know about CLGeocoder but if your requirement is a location search another way is to use google location search url http://maps.google.com/maps/geo?q=london which returns a json containing the matched location information.

    0 讨论(0)
提交回复
热议问题