Deploying the Voyager Search Widget to Portal for ArcGIS

The Voyager Search widget can be used in deploying web map applications with the ArcGIS Portal product. There are two separate versions of the Voyager Search widget. The web application template is available for download to customers with a Voyager Pro license or a Voyager Basic license that includes the Voyager widget extension.

  • To deploy the widget using Esri's Web Appbuilder application, use the web-appBuilder folder and reference the Deploying the Voyager Search Widget Using Esri's Web Appbuilder help document.

  • To deploy the widget in current versions of ArcGIS Portal or in situations where using the Web AppBuilder is not a suitable deployment option, use the use the web-app-template folder and following steps below.

This document describes how to use the Voyager Search widget in a web application template using the web-app-template folder.

Prerequisites

  • You need access to a web server where you can host this web app template.

  • You need access to an ArcGIS Online or Portal for ArcGIS Account if you want to register and share this web app once you have configured it.

Installation, Configuration and Deployment

In the same folder as README.md there is a sub-folder named Voyager. This sub-folder contains the files that makeup a web application and is based on the web application template boilerplate found at https://github.com/Esri/application-boilerplate-js .

  1. For this web application to work with your Voyager installation, several references to http://voyagerdemo.com  need to be updated in the following files in the Voyager folder with your Voyager Server URL

    • In the file Map.html on line 72

    • In the file Search-widget.html on line 27

    • In the file Search.js on lines 117, 288 and 290 (note: the Voyager Server install_directory/data/meta folder will need to be published via a web server such as IIS and used on lines 288 and 290)

  2. You will also likely want to change the source and initial extent of the basemap to your meet your mapping needs. The basemap options are: "streets" , "satellite" , "hybrid", "topo", "gray", "oceans", "national-geographic" and "osm". More information on these parameters can be found at https://developers.arcgis.com/javascript/jsapi/map.html#Map/MapConst .

  3. Copy the Voyager folder to your web server.

  4. Open the web map's map.html file in a web browser and make sure the map looks OK.

  5. Open the Voyager Search widget and perform a test search to make sure the widget is returning results from the Voyager URL you provided.

  6. Register the newly created web map app as a web application template on ArcGIS Online or Portal for ArcGIS.

  7. Finally, to get this web map to show up on arcgis.com from the share dialog's make a web application button you need to 

    create a group,

     

    share your item with your newly created group and

     

    tell portal to use your group as the options for make a web application.

    See the Web App Template bullet under step 4 here:

Using the Widget in the Web App

  1. Open the web map in a browser.

  2. Click on the Voyager icon to open the widget if its not already open.

  3. Get search results simply by entering a keyword, or any text, into the widget's search box.

  4. Click on the blue button with a plus sign icon to add the item to the map.

  5. Once the item is added to the map the it will be listed at the top of the widget where you can turn the layer on/off and remove the layer from the map.

Troubleshooting

If you deploy the web app to your web server and the widget it's not returning search results. First check that the source Voyager Server is up and running and returning search results. Example: http:///solr/v0/select?=map

If you're using IIS to host this web app you might need to perform the steps below. By default IIS 7 or any of the IIS are not configure to handle .json extension. So below is a very simple method to do that. You can apply the method on the root of IIS so .json can be handled by every site or virtual folder in the IIS or just to the specific site.

  1. Open IIS Manager

  2. Display properties for the IIS Server

  3. Click MIME Types and then add the JSON extension

    • File name extension: .json

    • MIME type: application/json

  4. Go back to the properties for IIS Server

  5. Click on Handler Mappings

  6. Add a script map

  • Request path: *.json

  • Executable: C:\WINDOWS\system32\inetsrv\asp.dll

  • Name: JSON