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)
continue;
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?
Solved! Go to Solution.
For single line address just use the overload that accepts a string
LocatorTask.GeocodeAsync Method (String)
For single line address just use the overload that accepts a string
LocatorTask.GeocodeAsync Method (String)