Change Search Widgets default geocoder name

3616
6
Jump to solution
07-17-2015 10:40 AM
JssrRR
by
Occasional Contributor II

Hi Robert,

I was just working on this yesterday and I have set multiple sources in search widget and they work fine, and I get suggestions when each one is selected, depending on the field I specified in the code.

I want to know is there a way to change the title for "ESRI World Geocoder" to something else which is easier for everyone to understand, like  " Search" or anything else.

Thanks.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Saloni,

  Sure the "ESRI World Geocoder" is just a API default string for the search widget. So just add the following require and var and then this one line of code.

Require: "dojo/i18n!esri/nls/jsapi",

Var: esriBundle

esriBundle.widgets.Search.main.esriLocatorName = "something new";

View solution in original post

6 Replies
RobertScheitlin__GISP
MVP Emeritus

Saloni,

  Sure the "ESRI World Geocoder" is just a API default string for the search widget. So just add the following require and var and then this one line of code.

Require: "dojo/i18n!esri/nls/jsapi",

Var: esriBundle

esriBundle.widgets.Search.main.esriLocatorName = "something new";

JssrRR
by
Occasional Contributor II

Thanks, Robert. It worked!

0 Kudos
philippenn
Occasional Contributor

Thanks, Saloni!

0 Kudos
RichardMoussopo
Occasional Contributor III

Is there a way to remove that completely?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Richard,

   If you are asking about not having the "ESRI World Geocoder" as a source option than you just need to overwrite the Search Widgets sources property instead of adding to the array.

0 Kudos
RichardMoussopo
Occasional Contributor III

Got it!

Thank you Robert

0 Kudos