Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

public BingGeocodePoint[] GeocodePoints { get; set; }

#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