This document is archived and information here might be outdated.  Recommended version.


ICompositeLocator.Locator Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Location > ESRI.ArcGIS.Location > Interfaces > IC > ICompositeLocator Interface > ICompositeLocator.Locator Property
ArcGIS Developer Help

ICompositeLocator.Locator Property

Participating locator.

[Visual Basic .NET]
Public Function get_Locator ( _
    ByVal Name As String _
) As ILocator
[C#]
public ILocator get_Locator (
    string Name
);
[C++]
HRESULT get_Locator(
  BSTR Name,
  ILocator** Locator
);
[C++]
Parameters
Name [in]

Name is a parameter of type BSTR Locator [out, retval]
Locator is a parameter of type ILocator**

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The Locator method returns a list of participating locators.

[Visual Basic .NET]

Public Sub testICompositeLocator_Single()

  Dim locManager As ESRI.ArcGIS.Location.ILocatorManager2

  locManager = New ESRI.ArcGIS.Location.LocatorManagerClass

  Dim locWrkSpc As ESRI.ArcGIS.Geodatabase.ILocatorWorkspace

  locWrkSpc = locManager.GetLocatorWorkspaceFromPath("C:\Mylocators")

  Dim myLocator As ESRI.ArcGIS.Geodatabase.ILocator

  myLocator = locWrkSpc.GetLocator("CompositeLocator1")

  Dim compLoc As ESRI.ArcGIS.Location.ICompositeLocator

On Error Resume Next

compLoc = myLocator

On Error GoTo 0

If myLocator Is Nothing Then

  Debug.Print(myLocator.Name & " is not a composite locator")

  Exit Sub

End If

 

Dim participatingLocNameList() As String

participatingLocNameList = compLoc.LocatorNames

Dim participatingLocName As Object

For Each participatingLocName In participatingLocNameList

  Debug.Print(participatingLocName)

  Dim partLoc As ESRI.ArcGIS.Geodatabase.ILocator

  partLoc = compLoc.Locator(participatingLocName)

  Debug.Print(" ++++ " & partLoc.Description)

Next participatingLocName

 

End Sub

See Also

ICompositeLocator Interface