Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Get Coordinates from adress
- /// </summary>
- /// <param name="searchTerm"></param>
- private async void getLocationCoordsfromAdress(string searchTerm)
- {
- GeocodeQuery a = new GeocodeQuery();
- Geoposition geoposition = await getLocation();
- if (geoposition != null)
- a.GeoCoordinate = new GeoCoordinate(geoposition.Coordinate.Latitude, geoposition.Coordinate.Longitude);
- else
- a.GeoCoordinate = new GeoCoordinate();
- a.SearchTerm = searchTerm; // mock search, replace with search value
- a.QueryCompleted += (s, e) =>
- {
- if (e.Error == null && e.Result.Count > 0)
- {
- // DO SOMETHING SERIOUS
- }
- };
- a.QueryAsync();
- }
Advertisement
Add Comment
Please, Sign In to add comment