Search code examples
iosmkmapview

How to set the current focus location to one ZIP area by UIMapview?


I am coding one location based app, I am using UIMapview to display the map information. I want to know how to update the map view's current focus location according to the ZIP code user may input. Can any experts can share some ideas? Thank you in advanced!


Solution

  • Finally, I found one solution by myself. I used the google map geocode api to do it. Trigger one call of https://maps.googleapis.com/maps/api/geocode/json? with zip parameter, then it response one location to the center of zip area.