All docs
V20.2
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

BingLocationInformation.GeocodePoints Property

Gets or sets the collection of geocode points that a Bing Maps Service returns.

Namespace: DevExpress.XtraMap

Assembly: DevExpress.XtraMap.v20.2.dll

Declaration

[DefaultValue(null)]
public BingGeocodePoint[] GeocodePoints { get; set; }
<DefaultValue(Nothing)>
Public Property GeocodePoints As BingGeocodePoint()

Property Value

Type Default Description
BingGeocodePoint[]

null

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