Change or Add Location Field Names
By default, Find retrieves latitude and longitude information from the LAT
and LON
IDOL fields, respectively. When you are using these fields in your documents, you can configure map visualizations by using the Find configuration settings page (see Configure Map Visualizations).
You can also update the map configuration manually if you want to use different fields as the latitude and longitude values, or if you want to use multiple location values. In this case, you modify the map
configuration object in your config.json
file, and update the fieldsInfo configuration with any required fields. In this case, you can use split latitude and longitude fields, or a single field that contains POINT or POLYGON definitions in Well-known text (WKT) format (for example, IDOL fields with the GeospatialType
field property set to unified
).
The following table describes the properties that you can set in the map
configuration section.
Property | Type | Description |
---|---|---|
enabled
|
Boolean | Set to true to enable the map visualizations in Find. |
attribution
|
String | An optional string to include in the bottom right of the map visualization, for example a copyright notice. |
initialLocation
|
Object | The location to use as the initial center point of the map visualization. This object contains the following properties:
|
tileUrlTemplate
|
String | The full Slippy Map Tilenames (SXYZ) URL for requesting a tile from an accessible tile server, with the x , y , and z coordinates and S server replaced with curly brace variables. For example, https://{s}maps.example.com/tiles/{z}/{x}/{y}.png .
|
resultsStep
|
Integer | The maximum number of location points that you want to be able to render on your map view. Setting this parameter to a high value can make the map slow to render. |
locationFields
|
Array, objects | The details of the fields that you want to use to plot locations. Each location field object defines the fields that contain the location information in one of the following ways:
Each location field object in the array also contains the following properties:
|
For each object in your locationFields
array, Find displays a set of location markers on your map visualization. For example, the following map configuration configures two sets of location fields to use in the map visualization. The map visualization includes two sets of markers, for DefaultLocation
and Geoindex
.
"map": { "enabled": false, "attribution": null, "initialLocation": { "latitude": 51.5074, "longitude": 0.1278 }, "tileUrlTemplate": null, "resultsStep": 2500, "locationFields" : [ { "displayName" : "DefaultLocation", "latitudeField" : "latitude", "longitudeField" : "longitude", "iconName" : null, "iconColor" : null, "markerColor" : null }, { "displayName" : "Geoindex", "geoindexField" : "geounified", "iconName" : "hp-pin", "iconColor" : "blue", "markerColor" : "orange" } ] }
Where latitude
, longitude
, , and geounified
are fields defined in the fieldsInfo
configuration:
"fieldsInfo": { "latitude": { "names": [ "NODE_PLACE/LAT", "LAT" ], "type": "NUMBER", "advanced": true }, "longitude": { "names": [ "NODE_PLACE/LON", "LON" ], "type": "NUMBER", "advanced": true }, "geounified" : { "names" : [ "GEOUNIFIED" ] "type" : "geoindex", "advanced" : true, } }
In this case, the GEOUNIFIED
field must contain POINT and POLYGON definitions in WKT format. To optimize performance, use an IDOL field with the GeospatialType
field property set to unified
. For more information, refer to the IDOL Server Reference.
TIP: If you want to use multiple location fields in your map visualization, but you want only one set of location markers, you can update the fieldsInfo
configuration to add the new fields without adding a new locationFields
option to the map configuration. For example:
"fieldsInfo": { "latitude": { "names": [ "NODE_PLACE/LAT", "LAT", "OG_LATITUDE" ], "type": "NUMBER", "advanced": true }, "longitude": { "names": [ "NODE_PLACE/LON", "LON", "OG_LONGITUDE" ], "type": "NUMBER", "advanced": true }
However, you cannot use this method to combine unified geoindex fields with split latitude and longitude fields.
For more information about fieldsInfo
configuration, see Configure User-Friendly Names for Fields and Values.