Use the config.js to configure the Shelter Locator application to your organization's needs.
General settings
The application title, icon, theme, and splash window content can be changed by modifying the following parameters:
Parameter | Description |
ApplicationName | Title of the application. This title displays at the top of the application. |
ApplicationIcon | Icon displayed in the upper left corner of the application. |
ApplicationFavIcon | Icon used for a shortcut to the application. |
CustomLogoUrl | Logo displayed in the lower left corner of the application. |
ShowLegend |
Controls the visibility of the legend in the application.
|
SplashScreen | Message displayed when the application starts. |
ThemeColor | Theme and color of the application window. See the styles folder for alternative CSS files. |
BottomPanelToggleButtonText | Indicate the text to display on the toggle button for the bottom panel. |
SearchPanelTitle | Indicate the text to display on the search panel. |
ActivityPanelTitle | Indicate the text to display on the activity panel. |
EventPanelTitle | Indicate the text to display on the events panel. |
PodSettings |
Control the visibility of each individual pod in the bottom panel and in the popup (for example, the GalleryPod).
|
ZoomLevel | Scale at which the search result is displayed |
// Set application title
ApplicationName: "Shelter Locator",
// Set application icon path
ApplicationIcon: "/js/library/themes/images/ShelterLogo_Blue.png",
// Set application Favicon path
ApplicationFavicon: "/js/library/themes/images/favicon.ico",
// Set custom logo url, displayed in lower left corner. Set to empty "" to disable.
CustomLogoUrl: "",
// Set Legend Visibility
ShowLegend: false,
// Set splash window content - Message that appears when the application starts
SplashScreen: {
SplashScreenContent: "Welcome to the Shelter Locator. The Shelter Locator helps you locate emergency shelters in our community.",
IsVisible: true
},
// Set the application theme. Supported theme keys are blueTheme and greenTheme, orangeTheme, purpleTheme.
ThemeColor: "js/library/themes/styles/blueTheme.css",
// Set the bottom Pod Toggle Button Text
BottomPanelToggleButtonText: "Search Results",
// Set the Search Panel Title
SearchPanelTitle: "Search",
// Set sequence for info pods in the bottom panel
PodSettings: [{
SearchResultPod: {
Enabled: true
}],
// Following zoom level will be set for the map upon searching an address
ZoomLevel: 12,
Map settings
The application consumes an ArcGIS Online map. To use a map, specify the web map ID.
Parameter | Description |
WebMapId | The identifier for the map containing the operational layers for the Shelter Locator application. |
Basemap settings
Optionally, change the group name and owner if you would like to use your own basemaps.
Parameter | Description |
BasemapGroupTitle | The group that contains the basemaps used in the basemap switcher. The basemap group must be shared with everyone. |
BasemapGroupOwner | The name of owner of the basemaps group. |
BasemapSpatialReferenceWKID | The spatial reference for all of the basemaps. |
NoThumbnail | Basemap thumbnail displayed in the basemap switcher. A basemap thumbnail is only necessary if a thumbnail image does not exist. |
// Specify the title of group that contains basemaps
BasemapGroupTitle: "Basemaps",
// Specify the user name of owner of the group that contains basemaps
BasemapGroupOwner: "GISITAdmin",
// Specify spatial reference for basemaps, since all basemaps need to use the same spatial reference
BasemapSpatialReferenceWKID: 102100,
// Specify path to image used to display the thumbnail for a basemap when portal does not provide it
NoThumbnail: "js/library/themes/images/not-available.png",
Search settings
The application can be configured to search for activities or amenities. To configure the activities search, use the following parameters:
Parameter | Description |
Enable | Field containing yes and no values that reflect if an activity is available at each location |
UnifiedSearch |
Searches the specified layers in the SearchSettings.
|
Title | The map layer name defined in the ArcGIS Online map. |
QueryLayerId | Layer index number used to perform queries. The map layer QueryLayerId setting must match the layer's index number on the map's item page. |
SearchDisplayTitle | Title of the grouped search results. |
SearchDisplayFields | Field containing values displayed in the search panel, after the search is completed and the grouped search result is expanded. |
SearchExpression | Query expression used when searching for shelters by name. |
PrimaryKeyForActivity | Field name to be used as a Primary Key to relate the comment table. |
QualifyingActivityValue | Value used to indicate the given activity or amenity is available. It should represent the Yes or True value. |
Activity list
List the activities and icons used to represent them, in a series using the following parameters:
Parameter | Description |
FieldName | Field containing yes and no values that reflect if an activity is available at each location |
Alias | Hint text displayed for each activity |
Image | Icon displayed when the activity is available at a location |
isSelected | To select this activity by default in the activity search window, use the value true; otherwise, this parameter is not needed |
ActivityList: [{
FieldName: "HANDICAP",
Alias: "Handicap Accessible",
Image: "js/library/themes/images/activity/wheelchairAccessible.png",
IsSelected: true
}, {
Functions and formatting
Use the following tags to define the functions and formatting of the application:
Parameter | Description |
LocatorRippleColor | The color of the circle around the selected point. |
LocatorRippleSize | The size of the circle around the selected point. |
InfoPopupHeight | Maximum height of the info-popup window in pixels. |
InfoPopupWidth | Maximum width of the info-popup window in pixels. |
ShowNullValueAs | String value to show for null or blank field values. |
//Set the color of the circle around the selected point
RippleColor: "35,35,142",
//Set the size of the circle around the selected point
LocatorRippleSize: 40,
// Minimum height should be 270 for the info-popup in pixels
InfoPopupHeight: 270,
// Minimum width should be 330 for the info-popup in pixels
InfoPopupWidth: 350,
// Set string value to be shown for null or blank values
ShowNullValueAs: "N/A",
Use the following tags to define the behavior of the buffer slider for defining the buffer distance when searching:
Parameter | Description |
DistanceUnitName | Set the units for the buffer distance. Allowed units are Miles, Kilometers, Meters, and Feet. |
MinimumValue | Define the minimum buffer distance. |
MaximumValue | Define the maximum buffer distance. |
DistanceUnitSettings: {
DistanceUnitName: "Miles",
MinimumValue: 1,
MaximumValue: 50
},
Routing
The application provides routes and directions using the ArcGIS Online World Route Service. To use routing for this application, an ArcGIS Online for Organizations subscription is required and routing must be enabled.
Parameter | Description |
GetDirections | Enable or disable routing. When routing is disabled, the application maintains all other functionality.
|
RouteServiceURL | The URL for the route service. |
RouteColor | The color for the route. |
RouteWidth | The width for the route. |
Transparency | The transparency for the route. |
RouteUnit | The unit for routes. Supported units are MILES, METERS, KILOMETERS and NAUTICAL_MILES. |
// ------------------------------------------------------------------------------------------------------------------------
// DRIVING DIRECTIONS SETTINGS
// ------------------------------------------------------------------------------------------------------------------------
// GetDirections: if variable is set to false directions cannot be enabled
// RouteServiceURL: Set URL for routing service
// RouteColor: Set color for route
// RouteWidth: Set width for route
// Transparency: Set transparency for route
// RouteUnit: Set unit for route, units supported by Direction widget are MILES, METERS, KILOMETERS, NAUTICAL_MILES. If there is a Typo error in any of these four units then the unit will be displayed in KILOMETERS. If the unit is specified other than these four units then unit will be displayed in MILES
DrivingDirectionSettings: {
GetDirections: true,
RouteServiceURL: "http://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",
RouteColor: "0,0,225",
RouteWidth: 6,
Transparency: "0.5",
RouteUnit: "MILES"
},
Address search settings
By default, the application is configured to use ArcGIS Online geocoding service. To use your geolocator or to modify location-related parameters such as the default search address, modify the following parameters:
Parameter | Description |
DisplayText | Name of the tab from which addresses can be searched. |
LocatorDefaultAddress | Default search address |
LocatorURL | Geolocator URL. The application uses ArcGIS Online by default. |
DisplayText: "Address",
LocatorDefaultAddress: "4509 Bob Jones Dr, Virginia Beach, VA 23462",
LocatorURL: "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",
Comments
The default configuration of Shelter Locator does not have comments enabled. To enable comments, create a new table in your geodatabase to store shelter comments. Add the new comments table to the Shelter.mxd and update your Shelters service. Enable editing on the updated service and set the editing properties to; Add, update, and delete features. Once you have finished updating your shelter service, use the following tags to define how comments are stored and displayed in the info-popup window:
Parameter | Description |
Enabled | Set to true to enable comments |
Title | Name of the table in the online map for storing comments. |
QueryLayerId | Layer index number for the comments table. The table's QueryLayerId setting must match the layer's index number on the map's item page. |
ForeignKeyFieldForComment | The field name to be used as a Foreign Key to relate the activity table. Supported datatypes are string, integer, GUID. |
CommentsSettings: {
Enabled: false,
Title: "Comments",
QueryLayerId: "1",
ForeignKeyFieldForComment: "${SITEID}",
RankField: "${RANK}",
SubmissionDateField: "${SUBMITDT}",
CommentField: "${COMMENTS}"