Select to view content in your preferred language

How to add a locator via sdk ?

4283
20
11-08-2018 07:34 AM
servicesigu
Occasional Contributor

Hi,

I want to know how to add a locator from a server (ie a geocoding service).

The purpose is to give our users our own locators, when a project is opened.

Thanks in advance for your reply.

0 Kudos
20 Replies
BradNiemand
Esri Regular Contributor

Jamal,

The way you describe it looks correct.  You are going to want the path to be exactly how it is when you add the locator via Pro.  Just hover over the locator in the Locators folder and you will get the full path.

If you still have issues, I would say it might be time to get technical support involved.

Brad

JamalWest2
Regular Contributor

Yes it seems to be adding it, but it is just greyed out.

0 Kudos
BradNiemand
Esri Regular Contributor

Jamal,

When you open the Locate Pane, click on the settings tab and hover over the locator does it give you any type of warning or error?

Brad

JamalWest2
Regular Contributor

I'm using Version 2.3.3. When I open the Locators menu it if I click the locator it has a red ! next to the Locator I'm attempting to add. Also the folder name isn't there.

0 Kudos
BradNiemand
Esri Regular Contributor

When you hover over the locator in the settings tab do you get a popup tool-tip with the error message?  If so, what is it?

Brad

JamalWest2
Regular Contributor

I thought I replied to this earlier. Welp it looks like there is not support for a locator service at this time. Thanks for your help though!

0 Kudos
JamalWest2
Regular Contributor

One thing I noticed is when I hover over the connection at the end there is an extra '/' so instead of saying /{locatorName}.GeocodeServer it says /{locaterName}.GeocodeServer/

0 Kudos
BradNiemand
Esri Regular Contributor

I don't see the extra "/" on my end.  What version of Pro are you using?

Brad

JamalWest2
Regular Contributor

I get "Locator is not available on the current portal."

0 Kudos
NarelleChedzey
Esri Contributor

Hi Jamal, 

Unfortunately, after further investigation, we've found that the LocatorManager class currently only supports local locators and locators shared to Portal.  It does not support locator services.  

Thank you for finding this issue.  We will add support for locator services to the 2.5 version of the API. 

Narelle