LocalLocatorTask "one or more of the locator's properties is invalid"

1399
11
08-17-2017 11:03 AM
EdwardBlair
Occasional Contributor

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);

}

}

0 Kudos
11 Replies
NagmaYasmin
Occasional Contributor III

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

0 Kudos
EdwardBlair
Occasional Contributor

Nagma -

Thanks for the reply. And no, I have not created a .locb file. More

details would be appreciated.

Thx

0 Kudos
NagmaYasmin
Occasional Contributor III

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.

RuntimeContentLocator

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"EnabelRuntimeTool

Hope that helps.

Nagma

0 Kudos
EdwardBlair
Occasional Contributor

Nagma -

I just tried this and the process completes, but no .locb file is created.

Ed

0 Kudos
EdwardBlair
Occasional Contributor

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

0 Kudos
NagmaYasmin
Occasional Contributor III

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.

2017-08-17_1255 

Hope that helps.

Nagma

0 Kudos
RadhikaAnumolu
New Contributor

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!

0 Kudos
NagmaYasmin
Occasional Contributor III

Hi Radhika,

Have you tried to generate the runtime content from the san-diego locator which is attached with the previous post.

Best,

Nagma

0 Kudos
RadhikaAnumolu
New Contributor

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.

0 Kudos