Created
September 10, 2020 15:15
-
-
Save tugcearar/437acac65c9688bcaf71666cca632ee1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void NearbySearch(LatLng currentLocation, string searchText) | |
{ | |
ISearchService searchService = SearchServiceFactory.Create(activity, Android.Net.Uri.Encode("YOUR_API_KEY")); | |
NearbySearchRequest nearbySearchRequest = new NearbySearchRequest(); | |
nearbySearchRequest.Query = searchText; | |
nearbySearchRequest.Language = "en"; | |
nearbySearchRequest.Location = new Coordinate(currentLocation.Latitude, currentLocation.Longitude); | |
nearbySearchRequest.Radius = (Integer)2000; | |
nearbySearchRequest.PageIndex = (Integer)1; | |
nearbySearchRequest.PageSize = (Integer)5; | |
nearbySearchRequest.PoiType = LocationType.Address; | |
searchService.NearbySearch(nearbySearchRequest, new QuerySuggestionResultListener(activity as MainActivity)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment