Back to Devexpress

AzureGeocodeDataProvider.RequestLocationInformation(GeoPoint) Method

windowsforms-devexpress-dot-xtramap-dot-azuregeocodedataprovider-dot-requestlocationinformation-x28-devexpress-dot-xtramap-dot-geopoint-x29.md

latest3.8 KB
Original Source

AzureGeocodeDataProvider.RequestLocationInformation(GeoPoint) Method

Sends a request to obtain information about the specified location.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
public void RequestLocationInformation(
    GeoPoint location
)
vb
Public Sub RequestLocationInformation(
    location As GeoPoint
)

Parameters

NameTypeDescription
locationGeoPoint

A GeoPoint object that identifies the location.

|

Remarks

The following example searches for a geographical point according to the specified coordinates:

csharp
using DevExpress.XtraMap;
// ...
const string key = "your key";
// ...
private void Form1_Load(object sender, EventArgs e) {
  AzureGeocodeDataProvider geocodeProvider = new AzureGeocodeDataProvider {
      AzureKey = key
  };
  geocodeProvider.RequestLocationInformation(new GeoPoint(40.730610, -73.935242));
  // Create a layer.
  InformationLayer informationLayer = new InformationLayer();
  informationLayer.DataProvider = geocodeProvider;
  // Add the created layer to the collection.
  map.Layers.Add(informationLayer);
}
vb
Imports DevExpress.XtraMap
' ...
Private Const key As String = "your key"
' ...
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
  Dim geocodeProvider As AzureGeocodeDataProvider = New AzureGeocodeDataProvider With {.AzureKey = key}
  geocodeProvider.RequestLocationInformation(new GeoPoint(40.730610, -73.935242))
  ' Create a layer.
  Dim informationLayer As New InformationLayer()
  informationLayer.DataProvider = geocodeProvider
  ' Add the created layer to the collection.
  map.Layers.Add(informationLayer)
End Sub

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RequestLocationInformation(GeoPoint) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

map-for-winforms-azure-geocoding/CS/AzureGeocoding/Form1.cs#L43

csharp
if (TryGetLocationArguments(out searchPoint)) {
    geocodeProvider.RequestLocationInformation(searchPoint);
}

map-for-winforms-azure-geocoding/VB/AzureGeocoding/Form1.vb#L49

vb
If TryGetLocationArguments(searchPoint) Then
    geocodeProvider.RequestLocationInformation(searchPoint)
End If

See Also

AzureGeocodeDataProvider Class

AzureGeocodeDataProvider Members

DevExpress.XtraMap Namespace