GEOG 863:
Web Application Development for Geospatial Professionals

6.1.1 Basic Implementation


A basic implementation of this widget is really quite simple, as demonstrated by Esri’s Search Widget (3D) sample. After adding the Search module to the require() list, all that is necessary to implement the widget is to create a new object of the Search class, set its view property to the app’s view, then add the widget to the view’s UI in the desired position. The widget will match the user’s text against Esri’s World Geocode service by default.

Some properties of the widget that you might consider customizing include:

  • allPlaceholder – text users see in the search box prompting them on what to enter
  • minSuggestCharacters – number of characters that must be entered before queries are made against the widget’s source
  • popupEnabled – Boolean specifying whether a popup can be opened over a search result
  • popupOpenOnSelect – Boolean specifying whether a popup should open automatically over the selected result
  • popupTemplate – object that defines what the user sees in the popup