AnsweredAssumed Answered

Migrating from 10.2 to 100.2:  LocatorTask.GetInfoAsync()

Question asked by cstephens0829 on Aug 29, 2019
Latest reply on Aug 30, 2019 by minerjoe

I'm in the process of migrating our code from using 10.2.6 to using 100.2.1.


The 10.2 code I'm having trouble migrating gets the locator info and queries the LocatorServiceInfo.SingleLineAddressField and LocatorServiceInfo.AddressFields to formulate the input parameters to be passed to GeocodeAsync.

// In a loop here...

LocatorServiceInfo info = await service.Locator.GetInfoAsync();


if (info.SingleLineAddressField == null)
inputParameters.Add(info.SingleLineAddressField.FieldName, singleLineAddress);


if (info.AddressFields.Any(f => f.FieldName == fieldName))


In 100.2, it appears I would access the LocatorInfo property.

LocatorInfo info = service.Locator.LocatorInfo;


However, LocatorInfo doesn't have SingleLineAddressField or AddressFields properties.  I'm guessing SearchAttributes would hold this information, but I'm not sure what the key would be for SingleLineAddressField.


Am I on the right track?  If so, how do I access the equivalent value for SingleLineAddressField?  If not, what is the correct approach?