Error in an Address Locator for a Mobile Application [Repost]

346
1
07-19-2010 03:48 PM
ChrisDistefano
Esri Contributor
Originally posted- 7/16/2010 on the ArcGIS Address Coder Forum.
Chris

Coding a Find Address tool for a mobile application. The Address locator is local for the application.

An address Geocoding tool from a form input of an address :
Eg: 5125 Elmore Road

Able to get the locator file, but when type casted to addressgeocoding (IAddressGeoGoding), I get this exception **


private void GetLocator()
        {
            locatorManager = new LocatorManagerClass();
            locatorWorkspace = locatorManager.GetLocatorWorkspaceFromPath(@"C:\Temp\Locator");
            //localLocatorWorkSpace = (ILocalLocatorWorkspace)locatorWorkspace;
            //get the address locator

            locator = locatorWorkspace.GetLocator("Jeetu");
            addressGeoCoding** = (IAddressGeocoding)locator;

                 ERROR: ** MatchFields = 'addressGeoCoding.MatchFields' threw an exception of type 'System.Runtime.InteropServices.COMException'


}

Need help on this error.
0 Kudos
1 Reply
Jitendrudulacaraju
New Contributor
this error is because i am trying to use the locator assemblies of .net sdk for a stand alone mobile application which will not be initializing the arcgis license.
0 Kudos