public Placemark?GetPlacemark(PointLatLng location, out GeoCoderStatusCode status) { var request = new GeocodingRequest { Address = new LatLng(location.Lat, location.Lng), Sensor = false }; var response = _geocodingService.GetResponse(request); status = GoogleMapWrapper.ToGeoCoderStatusCode(response.Status); return(response.Results.Any() ? GoogleMapWrapper.ToPlacemark(response.Results[0]) : (Placemark?)null); }
// reverse geo coding public GeoCoderStatusCode GetPlacemarks(PointLatLng location, out List <Placemark> placemarkList) { var request = new GeocodingRequest { Address = new LatLng(location.Lat, location.Lng), Sensor = false }; var response = _geocodingService.GetResponse(request); placemarkList = (from r in response.Results select GoogleMapWrapper.ToPlacemark(r)).ToList(); return(GoogleMapWrapper.ToGeoCoderStatusCode(response.Status)); }