Additional configuration

Use the config.js to configure the Event 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.
  • true to display the legend
  • false to hide the legend
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 pop-up (for example, the GalleryPod).
  • true to display the pod
  • false to hide the pod
ZoomLevel Scale at which the search result is displayed
    

// Set application title
ApplicationName: "Event Locator",
// Set application icon path
ApplicationIcon: "/js/library/themes/images/logo.gif",
// 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 Event Locator. The Event Locator helps you discover festivals, shows, concerts, and other activities in a community and then add these events to your calendar before scheduling a visit or trip.",
    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,
            
        

Top

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 Event Locator application.

Top

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",
            
        

Top

Search settings

The application can be configured to search for events. To configure the events 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.
  • True to search the layer
  • False to exclude the layer from the search
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 details page.
SearchDisplayTitle Title of the grouped search results.
SearchDisplayFields Fields displayed in the search panel to group results.
SearchDisplaySubFields Field displayed in the search panel, after the search is completed and the group is expanded.
SearchExpressionForDate Query expression used when searching for events by date.
SearchExpression Query expression used when searching for events by name.
SortingKeyField Field used to sort search results.
AddToCalendarSettings A collection of fields used to configure the format of the iCal item.
     

EventSearchSettings: [{
Enable: true,
UnifiedSearch: "true",
Title: "CommunityEvents",
QueryLayerId: "0",
SearchDisplayTitle: "Events",
SearchDisplayFields: "${EVENTNM}",
SearchDisplaySubFields: "${EVENTSTART},${FULLADDR}",
SearchExpressionForDate: "(EVENTEND >= DATE ${0} AND EVENTEND <= DATE ${1}) OR (EVENTSTART <= DATE ${0} AND EVENTEND >= DATE ${1}) OR (EVENTSTART >= DATE ${0} AND EVENTSTART <= DATE ${1})",
SearchExpression: "UPPER(EVENTTYPE) LIKE UPPER('${0}%')",
SortingKeyField: "${EVENTSTART}",
   AddToCalendarSettings: [{
        IcsFileName: "${EVENTNM}",
        StartDate: "${EVENTSTART}",
        EndDate: "${EVENTEND}",
        Location: "${FULLADDR},${PSTLCITY}",
        Summary: "${EVENTNM}",
        Description: "${EVENTDESC}",
        Organizer: "${SPONSOR}"
}]

Top

Functions and formatting

Use the following settings 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 settings 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
},
			
        

Top

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.
  • true to enable routing
  • false to disable routing
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"
},
                
        

Top

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: "160 Duke of Gloucester, Annapolis, MD, 21401",
LocatorURL: "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer",

        

Top

Top