Map pages
Map pages display ServiceNow data graphically on a Google map page based on location data that you provide.
You can create as many map pages as required to define the types of data to display, the links to show, and the appearance of the map. After creating the map pages, you can create modules to display the map pages.
Note: Map pages are subject to the non-production access limitations. See Set up Google Maps API for details.
Map locations
Locations are used by various applications to locate users, facilities, or configuration items (CI) and are stored in the Location [cmn_location] table. You can configure different levels of location in a parent-child hierarchy. For example, an email server might be associated with a location of Second Floor, whereas the email business service might be associated with New York City.
Each level of this hierarchy contains a separate location record, with the next higher level specified as a parent.
The location is also used to generate a full identifier in the Full name field, which is available by configuring the form. For more information, see Show or hide fields on a form.
The Full name field on the Location form
How locations are defined
To create a location, navigate to User Administration > Locations and select New.
| Field | Description |
|---|---|
| Name | The name of the location. This name is the display value that the system uses when referencing this location on a form. |
| Street | The street address of the location. |
| City | The city of the location. |
| State / Province | State or province of the location. |
| Zip / Postal Code | The zip or postal code of the location. |
| Country | The country of the location. |
| Contact | Name of a user who is the contact for this location. |
| Phone | The phone number for the location. |
| Fax phone | The fax number for the location. |
| Parent | Name of the parent location for this location. Location hierarchies are described earlier. |
| Latitude | The latitude of the location.The get_lat_long business rule automatically populates this field and the Longitude field described below when the form contains enough information, such as an address or city name and a postal code. Deactivate this business rule to avoid the system overwriting any values entered manually into these fields. |
| Longitude | The longitude of the location. |
| Fields that can be added by configuring the form: | |
| Company | A reference field to the Company [core_company] table. |
| Full name | A read-only, calculated field that assembles the parent hierarchy of the location into a full name. |
| Stock room | A Boolean field that identifies whether the location is being used as a stock room. |
| Time zone | The time zone of the location. By default, the location uses the system time zone. |
Latitude and longitude
When a Company or Location record is created, or has one of its address fields changed [street, city, state, zip or country], the get_lat_long business rule is triggered. This business rule uses the GoogleMapsHelper script include to create sys_geocoding_request records.
The scheduled job Process Geocoding Request must be enabled to process sys_geocoding_request records. Process Geocoding Request uses the Google Map service to populate the latitude and longitude fields of the changed or created Company and Location records.
After the latitude and longitude are populated, Map Pages can be defined that display locations in an interactive map.
Note: Latitude and longitude are expressed as a floating point data type. Previous releases expressed this information as a string. During an upgrade, the system converts the data where possible.
- Set up Google Maps API
You enable the geolocation feature using the appropriate entries from a Google Maps API for Business license, or a Google Maps JavaScript API Key. - Create a map page
Your ServiceNow instance provides several default map pages. You can also create custom map pages with the script examples described in this page. - Create a map page module
You can create a new application module for desktop or smartphone users to display a Google map page. - Create an advanced Map Page
Use advanced configuration to set up Map Pages without scripting. - Set map application scope
Enable map application scope to specify which application can modify your Map Page configuration. - Create a smartphone map page module
You can create a custom smartphone module that links directly to a map page. - Scripting for map pages
The Script field on the Map Page form allows the use of attributes or custom code to define map characteristics, such as marker appearance, display information, and more.
Parent Topic:User interface configuration