ios - MKLocalSearch returning results from outside region -
i'm searching places (would show businesses if possible) this:
cllocationcoordinate2d currentcenter = cllocationcoordinate2dmake(self.locationmanager.location.coordinate.latitude, self.locationmanager.location.coordinate.longitude); mkcoordinateregion currentregion = mkcoordinateregionmakewithdistance(currentcenter, 15000, 15000); mklocalsearchrequest *localsearchrequest = [[mklocalsearchrequest alloc] init]; localsearchrequest.naturallanguagequery = identifier; [localsearchrequest setregion:currentregion]; mklocalsearch *localsearch = [[mklocalsearch alloc] initwithrequest:localsearchrequest]; [localsearch startwithcompletionhandler:^(mklocalsearchresponse *respone, nserror *error) { if (!error) { // result handling } }]; but results include results other countries, why this? call method if cllocationmanager coordinate passes check:
cllocationcoordinate2disvalid thanks!
Comments
Post a Comment