How to hide "Esri World Geocoder" in the search widght with Arcgis-js-api 3.x

361
3
Jump to solution
08-22-2019 01:32 AM
zxz
by
New Contributor

How to hide "Esri World Geocoder" in the search widght with Arcgis-js-api 3.x

0 Kudos
1 Solution

Accepted Solutions
Egge-JanPollé1
MVP Regular Contributor

Hi z xz‌,

Pass in empty source array to clear the default ArcGIS Online World Geocoding service:

sources: []

See this example, showing the defaults ArcGIS Online World Geocoding service:Search multiple sources | ArcGIS API for JavaScript 3.29 

No you can modify the code (e.g. in CodePen) to modify the search to remove this default service:

      var search = new Search({
enableButtonMode: true, //this enables the search widget to display as a single button
enableLabel: false,
enableInfoWindow: true,
showInfoWindowOnSelect: false,
map: map,
//passing in empty source array to clear the default ArcGIS Online World Geocoding service
sources: []
}, "search");
‍‍‍‍‍‍‍‍‍

Does this work for you?

Cheers,

Egge-Jan

View solution in original post

3 Replies
Egge-JanPollé1
MVP Regular Contributor

Hi z xz‌,

Pass in empty source array to clear the default ArcGIS Online World Geocoding service:

sources: []

See this example, showing the defaults ArcGIS Online World Geocoding service:Search multiple sources | ArcGIS API for JavaScript 3.29 

No you can modify the code (e.g. in CodePen) to modify the search to remove this default service:

      var search = new Search({
enableButtonMode: true, //this enables the search widget to display as a single button
enableLabel: false,
enableInfoWindow: true,
showInfoWindowOnSelect: false,
map: map,
//passing in empty source array to clear the default ArcGIS Online World Geocoding service
sources: []
}, "search");
‍‍‍‍‍‍‍‍‍

Does this work for you?

Cheers,

Egge-Jan

View solution in original post

zxz
by
New Contributor

It works,thank you!

0 Kudos
Egge-JanPollé1
MVP Regular Contributor

Hi z xz‌,

If your issue has been solved, you may mark my answer as correct. In this way it will be clear to others - who may have the same question - that your question has been answered correctly.

Cheers,

Egge-Jan

0 Kudos