ArcObjects Library Reference (Location)  

IGeocodeServerObjects.AddressLocator Property

The address locator used by the geocode server.

[Visual Basic .NET]
Public ReadOnly Property AddressLocator As ILocator
[C#]
public ILocator AddressLocator {get;}
[C++]
HRESULT get_AddressLocator(
  ILocator** AddressLocator
);
[C++]

Parameters

AddressLocator [out, retval]

  AddressLocator is a parameter of type ILocator

Product Availability

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

Remarks

This IGeocodeServerObjects interface is available only if the GeocodeServer was obtained for use in a stateful manner (i.e., either by co-creating the GeocodeServer object or by obtaining a reference using a GISServerConnection object.)

The following example illustrates how to obtain a reference to the address locator that provides the geocoding functionality for a GeocodeServer:

    Dim pGISServerConnection As esriServer.IGISServerConnection
    Dim pServerObjectManager As esriServer.IServerObjectManager
    Dim pServerContext As esriServer.IServerContext
    Dim pGeocodeServerObjects As esriLocation.IGeocodeServerObjects
    Dim pLocator As esriGeoDatabase.ILocator
    
    '+++ connect to an ArcGIS Server and get the server object manager
    Set pGISServerConnection = New esriServer.GISServerConnection
    pGISServerConnection.Connect ("napanee")
    Set pServerObjectManager = pGISServerConnection.ServerObjectManager
    
    '+++ get a GeocodeServer object from its server context
    Set pServerContext = pServerObjectManager.CreateServerContext("RedlandsStreets", "GeocodeServer")
    Set pGeocodeServerObjects = pServerContext.ServerObject
    
    '+++ get the address locator from the GeocodeServer
    Set pLocator = pGeocodeServerObjects.AddressLocator
    
    '+++ release the server context after completing work with the GeocodeServer
    pServerContext.ReleaseContext

See Also

IGeocodeServerObjects Interface