ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping.Geocoding Namespace / LocatorManager Class / AddLocatorAsync Method
provider path. Can be a local file (ending in .loc) or a online geocode service.

In This Topic
    AddLocatorAsync Method
    In This Topic
    Add a locator to the set of available locators.
    Syntax
    public Task<LocatorProvider> AddLocatorAsync( 
       string providerPath
    )
    Public Function AddLocatorAsync( _
       ByVal providerPath As String _
    ) As Task(Of LocatorProvider)

    Parameters

    providerPath
    provider path. Can be a local file (ending in .loc) or a online geocode service.

    Return Value

    Task of bool indicating success or failure.
    Remarks
    Three different types of locators are supported : Local locators - example: D:\\Data\\Geocode\\ACT.loc Locators shared to portal - example: https://portal/server/rest/services/locatorName/GeocodeServer Geocoding services associated with an ArcGIS Server connection "ags" file - example: C:\\path\\my_ags_server\\locatorName.GeocodeServer". Note: the suffix .GeocodeServer is required. "C:\\path\\my_ags_server" is the fullpath (without suffix) to the ags connection file ""C:\\path\\my_ags_server.ags"
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also