Hi Team,
I need to implement a place/location search. This search should work on the Globe like "Maps" application do when we search for something. I tried it with below code but it is responding with very limited data. Could you please review the below code and help me to build my requirement.
I thougt this was might be the issue with region, So I tried to create region with "MKCoordinateRegionMakeWithDistance" by giving distance values. But it is still responding with same data that I got earlier. Below is the line of region created with Distance values.
I need to implement a place/location search. This search should work on the Globe like "Maps" application do when we search for something. I tried it with below code but it is responding with very limited data. Could you please review the below code and help me to build my requirement.
Code Block let request = MKLocalSearch.Request() request.naturalLanguageQuery = searchField.text request.region = self.mapView.region; let search = MKLocalSearch(request: request) search.start { response, _ in guard let response = response else { return } self.matchingItems = response.mapItems self.tableView.reloadData() }
I thougt this was might be the issue with region, So I tried to create region with "MKCoordinateRegionMakeWithDistance" by giving distance values. But it is still responding with same data that I got earlier. Below is the line of region created with Distance values.
Code Block let region = MKCoordinateRegionMakeWithDistance(self.mapView.centerCoordinate, 300000000, 300000000); request.region = region;