Using ILocatorWorkspace
Use the ILocatorWorkspace interface to manage the locators and locator styles in a locator workspace. You can use this interface to retrieve locator and locator styles from the locator workspace, as well as create, modify, and delete locators contained in the workspace.
Retrieving Locators
Use GetLocator to retrieve a locator by name from a locator workspace.
The Locators property will return an enumeration of the locators in the workspace.
The LocatorNames property will return an enumeration of locator names representing the locators in the locator workspace.
Retrieving LocatorStyles
Use GetLocatorStyle to retrieve locator styles by name from a locator workspace.
The Locators property will return an enumeration of the locators in a workspace.
The LocatorNames property will return an enumeration of locator names representing the locators in the locator workspace.
Add a Locator to a workspace
Use AddLocator to add a new locator to the locator workspace.
Create a new Locator
To create a new locator, a developer retrieves the LocatorStyle on which the new locator will be based from a LocatorWorkspace, specifies all of the properties on the style as required to define the new Locator, and stores the modified LocatorStyle in the LocatorWorkspace using the AddLocator method on the ILocatorWorkspace interface.
See How to create an address locator for an example.
Delete a locator or locator style from a workspace
Use DeleteLocator to remove a locator or locator style from the workspace.
Rebuild a locator
Use RebuildLocator to rebuild an address locator, particularly if the reference data was modified.
Locator categories
Some of the methods on require you to pass a locator category as a parameter. Address locators and address locator styles used with ArcGIS have a category of "Address".ILocatorWorkspace
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine Runtime |
ArcView | ArcView |
ArcEditor | ArcEditor |
ArcInfo | ArcInfo |