BingLocationInformation.GeocodePoints Property
Gets or sets the collection of geocode points that a Bing Maps Service returns.
Namespace: DevExpress.Xpf.Map
Assembly: DevExpress.Xpf.Map.v24.2.dll
NuGet Package: DevExpress.Wpf.Map
Declaration
Property Value
Type | Description |
---|---|
BingGeocodePoint[] | The collection of geocode points. |
Remarks
Use the BingGeocodePoint.CalculationMethod property to determine how the geocode point is calculated. The BingGeocodePoint.UsageType property defines how the geocode point should be used.
The following example uses the GeocodePoints property to get geographical points for the Route and Display locations:
private void searchProvider_SearchCompleted(object sender, BingSearchCompletedEventArgs e) {
//...
GeoPoint routeLocation = GetLocation((BingLocationInformation)e.RequestResult.SearchResults[0], BingUsageType.Route);
GeoPoint displayLocation = GetLocation((BingLocationInformation)e.RequestResult.SearchResults[0], BingUsageType.Display);
}
GeoPoint GetLocation(BingLocationInformation locationInformation, BingUsageType usageType) {
foreach (BingGeocodePoint geocodePoint in locationInformation.GeocodePoints)
if ((geocodePoint.UsageType & usageType) != BingUsageType.None)
return geocodePoint.Location;
return null;
}
See the following article to get more information about location data returned from Bing Maps Services: Location Data.
See Also