Additional configuration

Take the configuration of Maps and Apps Gallery beyond the settings that are exposed in the configuration panel by downloading the application code from GitHub and modifying the configuration file. The configuration file, config.js, can be opened in a text editor such as Notepad, but an IDE such as Visual Studio is recommended for easier reading.

Making these additional configuration changes does not require knowledge of JavaScript or JSON, but attention to details such as the locations of parentheses and commas is critical. It is strongly recommended that you 'lint' the configuration file code frequently using a website such as http://jsonlint.com/ to be certain you have not introduced syntax errors into the configuration file.

After modifying the configuration file, host your modified configuration as a new application template in your organization, or host the application on a web server.

The following additional configurations are available through the JSON configuration file:

Modify configuration panel settings

Simplify the configuration experience for your users by removing parameters from the configuration panel. Many of the configuration parameters such as basemaps and the icon are not data-specific. If the users of your app template won't need to change these values you can remove them from the configuration panel. The default values specified in the "values" section of the configuration file will be used instead.

Search the configuration file for "configurationSettings" to locate the section that controls the configuration panel user interface. The values associated with the following parameter names can be modified:

  • "category": These are the bold, underlined headings that appear in the configuration panel. Add, remove, or modify existing headings to guide your users through the configuration process.
  • "label": These are the labels shown for each of the parameters in the configuration panel. Rename parameters so they are more applicable to your organization.

To remove a parameter from the configuration file, first make note of the "fieldName" value associated with that parameter. For example the "fieldName" value associated with the Icon URL parameter is "titleBar.iconUrl".

Search the configuration file for this fieldName value. One matching result should be found in the "values" section of the configuration file. Set a default value for the parameter here, before returning to the "configurationSettings" section and deleting the section that references that parameter. For example, to remove the Icon URL parameter, delete the following code:


{
    "label": "Icon URL",
    "fieldName": "titleBar.iconUrl",
    "type": "string",
    "tooltip": "Icon in top left corner of application. Icon should be 48px high."
},
                   

After making these changes to the configuration file, save and lint the file using a validator such as JSONLint to ensure that you have well-formed, error-free JSON. It's also recommended that you clear your browser cache before attempting to view your modified configuration.

Top

Set default configuration values

Encourage your users to set the best setting values for your organization's data by defining default setting values. For example, the default zoom level of 16 may be too large-scale for the datasets typically handled by your organization, or you may want to encourage your organization members to use a particular app icon while still allowing them to use a different graphic.

The following default values can be found in the "values" section near the top of the configuration file and can be modified to suit your organization:

Basic Configuration Advanced Configuration Default Value
Group "group" ""
Title "applicationName" "Map and App Gallery"
Icon URL "applicationIcon" "/themes/images/logo.png"
Browser Tab Icon URL "applicationFavicon" "/themes/images/favicon.ico"
Color Scheme "theme" "#007ac2"
Default Layout "defaultLayout" "list"
Sort By "sortField" "numViews"
Sort Order "sortOrder" "desc"
Show Tag Cloud "showTagCloud" true
Alternate Basemap Group "basemapGroupTitle" ""
Basemap Group Owner "basemapGroupOwner" ""
Map Viewer "mapViewer" ""
Zoom Level "zoomLevel" "12"
Default Address "locatorDefaultAddress" "Lake Echo Rd Tracy City TN 37387"

After making these changes to the configuration file, save and lint the file using a validator such as JSONLint to ensure that you have well-formed, error-free JSON. It's also recommended that you clear your browser cache before attempting to view your modified configuration.

Top

Disable search autocomplete

By default, the application will guess the item name when searching the gallery. To disable autocomplete in this search box, search the configuration file for "enableAutoComplete": and change the value of this setting to false,.

After making these changes to the configuration file, save and lint the file using a validator such as JSONLint to ensure that you have well-formed, error-free JSON. It's also recommended that you clear your browser cache before attempting to view your modified configuration.

Top

Modify tag cloud font sizes

In the tag cloud, common tags appear larger than rarer tags. To adjust the size range used in the tag cloud, search the configuration file for "tagCloudFontMinValue": and modify the value. This will be the size (in pixels) of the rarest tags used for the items displayed in the gallery. To change the size of the most common tags, search the configuration file for "tagCloudFontMaxValue": and modify the value.

After making these changes to the configuration file, save and lint the file using a validator such as JSONLint to ensure that you have well-formed, error-free JSON. It's also recommended that you clear your browser cache before attempting to view your modified configuration.

Top

Display item sharing level

Items in an ArcGIS Online, Portal for ArcGIS, ArcGIS Enterprise group may be shared with only the members of the group, with all members of an organization, or with everyone (public). To display this level of sharing as part of the item information, search the configuration file for "displaySharingAttribute":. Change the value of this setting to true, to display GRP for items that are shared only with the group, ORG for items that are shared with the organization, and ALL for items that are public.

After making these changes to the configuration file, save and lint the file using a validator such as JSONLint to ensure that you have well-formed, error-free JSON. It's also recommended that you clear your browser cache before attempting to view your modified configuration.

Top

Modify the portal URL

By default the application is set up to use items stored in ArcGIS Online. To use another portal, search the configuration file for "portalURL":. Modify the URL to use to your portals URL.

After making these changes to the configuration file, save and lint the file using a validator such as JSONLint to ensure that you have well-formed, error-free JSON. It's also recommended that you clear your browser cache before attempting to view your modified configuration.

Top

Modify Map Viewer

Map Viewer contains a series of widgets, including a basemap switcher, address search, and overview map. To hide or expose these widgets, or modify the location marker, make any of the following modifications to the configuration file:

  • By default, a basemap widget is displayed when viewing maps and services within the gallery application. To hide this widget, search the configuration file for "showBasemapGallery": and change the value of this setting to false,.
  • To turn on the overview map, search the configuration file for "showOverviewMap": and change the value of this setting to true,.
  • To hide the address search bar, search the configuration file for "showMapSearch": and change the value of this setting to false,.
  • To modify the symbol used to mark the locations of search results on the map, search the configuration file for "defaultLocatorSymbol": and provide the URL to a different graphic.
  • To change the size (pixels) of this graphic, modify the values of "markupSymbolWidth": and "markupSymbolHeight":.

After making these changes to the configuration file, save and lint the file using a validator such as JSONLint to ensure that you have well-formed, error-free JSON. It's also recommended that you clear your browser cache before attempting to view your modified configuration.

Top

Display additional item attributes

Most of the information displayed on the item details page of an item in ArcGIS Online, Portal for ArcGIS, or ArcGIS Enterprise can be displayed in the item page of items in the gallery. To hide or display these properties in the gallery, make any of the following modifications to the configuration file:

  • To show the ratings assigned to items in ArcGIS Online, Portal for ArcGIS or ArcGIS Enterprise, search the configuration file for "showRatings": and set the value of this setting to true,. To hide this attribute, set the value to false,.
  • To show the number of times an item has been viewed in ArcGIS Online, Portal for ArcGIS, or ArcGIS Enterprise, search the configuration file for "showViews": and set the value of this setting to true,. To hide this attribute, set the value to false,.
  • To show the access use and constraints information for items, search the configuration file for "showLicenseInfo": and set the value of this setting to true,. To hide this attribute, set the value to false,.
  • To show the credits for items, search the configuration file for "showAttribution": and set the value of this setting to true,. To hide this attribute, set the value to false,.
  • To show comments that were submitted in ArcGIS Online, Portal for ArcGIS, or ArcGIS Enterprise, search the configuration file for "showComments": and set the value of this setting to true,. To hide this attribute, set the value to false,.

After making these changes to the configuration file, save and lint the file using a validator such as JSONLint to ensure that you have well-formed, error-free JSON. It's also recommended that you clear your browser cache before attempting to view your modified configuration.

Top

Top