Am trying to create a LocalLocatorTask using a composite locator. This works when I use it in ArcMap. But when providing the .loc file to Runtime I get the error "One or more of the locator's properties is invalid". Are there Runtime-specific requirements for locators? Code is below. Any insights would be much appreciated.
Ed
private void SetupLocator()
{
try
{
string locatorPath = @"C:\GISData\Data\Snapshot\CompositeStreetLocator.loc";
_locatorTask = new Esri.ArcGISRuntime.Tasks.Geocoding.LocalLocatorTask(locatorPath);
}
catch (Exception ex)
{
this.Log.LogException(ex);
}
}
Hi Edward,
Have you created the runtime content for the locator in ArcMap which creates a .locb file. This is necessary to consume the local locator in Runtime application. Let me know if you need more details information on how to create the runtime content for the locator in ArcMap.
Nagma
Nagma -
Thanks for the reply. And no, I have not created a .locb file. More
details would be appreciated.
Thx
Hi Edward,
In ArcMap, first load the local locator. Then click on File--> Share As--> ArcGIS Runtime Content.
Choose the Locator and check the option "Use a locator from the current map". Also in "ArcGIS Runtime Content", choose the folder where you want to save the locator file.
In case , you don't see the option for "ArcGIS Runtime Content" in File--> Share As-->, then on the menu click "Customize --> ArcMap Options -->Sharing --> check the box "Enable ArcGIS Runtime tools"
Hope that helps.
Nagma
Nagma -
I just tried this and the process completes, but no .locb file is created.
Ed
Nagma -
Just tried this again, but this time with a feature class added to my map.
This time the .locb file got generated. When generating the runtime
content I excluded the GIS data, but it seems that generating runtime
content for a locator still wants to have some data in the map.
Ed
Hi Ed,
I have used the test data (attached) to create the .locb file to be used in runtime. Below is the video how I generated the .locb file. I don't think you need to add any data to the map, just adding the locator in ArcMap should work.
Hope that helps.
Nagma
Hi Nagma,
I am also having the same issue. I watched your video and followed the steps, but I still don't see .locb file.
Appreciate your help!
Hi Radhika,
Have you tried to generate the runtime content from the san-diego locator which is attached with the previous post.
Best,
Nagma
Thank you Nagma!
Just before your reply I was able to generate .locb file for USA_PointAddress file. But when I am using that with Local Locator task to get the latitude and longitude, I am not getting any data back.