Map Location names in drop down list

試著忘記壹切 提交于 2019-11-30 07:45:11

No , there is not any method of MapKit to implement this type of property..

For That You have to implement Your own Code, i.e. use of UISearchbarCantroller or Simple UISearchbar.

For Search results you can use Google Place Autocomplete api.

You can Use this GooglePlacesAutocomplete Example.

In iOS >= 6.1 provides MKLocalSearch, MKLocalSearchRequest to search for natural language points of interest. Sample

MKLocalSearchRequest *request = [[MKLocalSearchRequest alloc] init];
request.region = regionToSearchIn;
request.naturalLanguageQuery = @"restaurants"; // or business name
MKLocalSearch *localSearch = [[MKLocalSearch alloc] initWithRequest:request];
[localSearch startWithCompletionHandler:^(MKLocalSearchResponse *response, NSError *error) {
    // do something with the results / error
}];
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!