GeocodeRequestResult Class
Contains results of a request to a web service to obtain GeoCode information about a specific location on a map.
Namespace: DevExpress.Xpf.Map
Assembly: DevExpress.Xpf.Map.v18.2.dll
Declaration
Related API Members
The following members return GeocodeRequestResult objects:
Example
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-get-information-about-a-geopoint-using-the-bing-geocode-web-service-e4258.
<dxm:BingGeocodeDataProvider x:Name="geocodeProvider" ProcessMouseEvents="False"
BingKey="{Binding Source={StaticResource YourBingKey}}"
LocationInformationReceived="geocodeProvider_LocationInformationReceived"/>
private void geocodeProvider_LocationInformationReceived(object sender, LocationInformationReceivedEventArgs e) {
GeocodeRequestResult result = e.Result;
StringBuilder resultList = new StringBuilder("");
resultList.Append(String.Format("Status: {0}\n", result.ResultCode));
resultList.Append(String.Format("Fault reason: {0}\n", result.FaultReason));
resultList.Append(String.Format("______________________________\n"));
if (result.ResultCode != RequestResultCode.Success) {
tbResults.Text = resultList.ToString();
return;
}
int resCounter = 1;
foreach (LocationInformation locations in result.Locations) {
resultList.Append(String.Format("Request Result {0}:\n", resCounter));
resultList.Append(String.Format("Display Name: {0}\n", locations.DisplayName));
resultList.Append(String.Format("Entity Type: {0}\n", locations.EntityType));
resultList.Append(String.Format("Address: {0}\n", locations.Address));
resultList.Append(String.Format("Location: {0}\n", locations.Location));
resultList.Append(String.Format("______________________________\n"));
resCounter++;
}
tbResults.Text = resultList.ToString();
}
Inheritance
Object
RequestResultBase
GeocodeRequestResult
See Also