MKLocalSearch in MapKit from iOS6.1

MKLocalSearch provides a simple way to find local points of interest within a geographic region. Because of its no-hassle webservice integration and tight integration with MapKit, any location-based app would do well to take advantage of it.

Usage :
MKLocalSearchRequest *request = [[MKLocalSearchRequest alloc] init];
request.naturalLanguageQuery = @"Hospitals";
request.region = mapView.region;
MKLocalSearch *search = [[MKLocalSearch alloc] initWithRequest:request];
[search startWithCompletionHandler:^(MKLocalSearchResponse *response, NSError *error) {
    NSLog(@"Map Items: %@", response.mapItems);
}];

Comments

Popular posts from this blog

Free Hand Drawing on Google's Map View

Android from iOS Guy's Perspective

Free Hand Drawing on Maps with MapBox SDK