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

TdxMapControlInformationProviders Class

#Declaration

Delphi
TdxMapControlInformationProviders = class(
    TcxComponentCollection
)

#Remarks

Auxiliary map information providers complement a tile data provider and allow you to display additional map-related information, such as routes and addresses.

VCL Map Control: An Address Hint Example

#Main API Members

The list below outlines key members of the TdxMapControlInformationProviders class. These members allow you to access and manage individual auxiliary map information providers.

#Collection Management API Members

Add
Creates a new information provider of the required type and adds the provider to the collection.
Clear
Clears the information provider collection.
Count
Returns the number of information providers in the collection.
Items
Provides indexed access to information providers in the collection.
Remove
Removes an individual information provider from the collection.

#General-Purpose API Members

Assign
Copies information providers between collections.
BeginUpdate | EndUpdate
Allow you to avoid excessive redraw operations and server queries during batch collection changes.

#Code Example: Create and Configure Azure Maps Information Providers

The following code example implements a procedure that accepts an Azure Maps account key, and creates and configures all Azure Maps information provider components:

uses
  dxAzureMapInformationProviders;  // Declares all Azure Maps information provider classes
// ...

procedure TMyForm.CreateAzureMapsInformationProviders(const AAzureKey: string);
var
  AProviders: TdxMapControlInformationProviders;
  AProvider: TdxMapControlAzureMapInformationProvider;
  I: Integer;
begin
  AProviders := dxMapControl1.InformationProviders;
  AProviders.BeginUpdate;  // Initiates the following batch change
  try
    // Create all Azure Maps information providers
    AProviders.Add(TdxMapControlAzureMapGeocodeProvider);
    AProviders.Add(TdxMapControlAzureMapGeolocationProvider);
    AProviders.Add(TdxMapControlAzureMapReverseGeocodeProvider);
    AProviders.Add(TdxMapControlAzureMapRouteProvider);
    for I := 0 to AProviders.Count - 1 do  // Iterates through all created information providers
    begin
      AProvider := AProviders.Items[I] as TdxMapControlAzureMapInformationProvider;
      AProvider.AzureKey := AAzureKey;  // Assigns the same Azure Maps account key to all providers
    end;
  finally
    AProviders.EndUpdate;  // Calls EndUpdate regardless of the batch operation's success
  end;
end;

#Direct TdxMapControlInformationProviders Class Reference

The TdxCustomMapControl.InformationProviders property references a TdxMapControlInformationProviders object.

#Inheritance

TObject
TPersistent
TcxComponentCollection
TdxMapControlInformationProviders
See Also