开发者

how to get a location at mkmapview with searchBar? [duplicate]

开发者 https://www.devze.com 2023-03-19 03:14 出处:网络
This question already has answers here: Closed 10 years ago. Possible Duplicate: How to search MKMapView with UISearchBar?
This question already has answers here: Closed 10 years ago.

Possible Duplicate:

How to search MKMapView with UISearchBar?

okay now I have a MkMapView that show the currentLocation, but I want to make a search bar to make shortcut that will play a animation to target, such as.. I fill the searchBar with the name of开发者_运维问答 some Street example "Independence Street" and mkmapview will make a current location move to the target. how can I do so? any code to make it easier?


you can use this method.

NSString *urlString = [NSString stringWithFormat:@"http://maps.google.com/maps/geo?q=%@&output=csv", searchBar.text];

It gives the latitude and longitude

0

精彩评论

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