ios - MKLocalSearch not finding all nearby restaurants -
i implemented mklocalsearch within region on mkmapview returns array of restaurants within region. through research, 10 restaurants being shown. there's way mklocalsearch can return more 10 restaurants within region? here code,
mklocalsearchrequest *request = [[mklocalsearchrequest alloc]init]; request.naturallanguagequery = @"restaurant"; request.region = midregion; mklocalsearch *localsearch = [[mklocalsearch alloc]initwithrequest:request]; [localsearch startwithcompletionhandler:^(mklocalsearchresponse *response, nserror *error) { nsmutablearray *annotations = [nsmutablearray array]; [response.mapitems enumerateobjectsusingblock:^(mkmapitem *item, nsuinteger idx, bool *stop){ customannotation *annotation = [[customannotation alloc] initwithplacemark:item.placemark]; annotation.title = item.name; annotation.subtitle = item.placemark.addressdictionary[(nsstring *)kabpersonaddressstreetkey]; annotation.phone = item.phonenumber; [annotations addobject:annotation]; }]; [self.mapview addannotations:annotations]; }]; }
so although it's been while since i've asked question, still want address because think should. after stumbling across various links on stackoverflow , apple developer forums, seems built-in mklocalsearch method limited returning 10 results. whereas, google maps api can return 60 results. therefore, i'm afraid answer question
no, can't mklocalsearch method return more 10 locations within region tied specific naturallanguagequery keyword.
Comments
Post a Comment