Create a location tracker search
To generate a location tracker visualization, use a search that returns data in the correct format.
Search syntax
Use this syntax to generate a location tracker graph.
... | table _time <latitude_field> <longitude_field> <resource_field> [icon_field]
Search components
- table
- Required
- Use the table command to create the correct results table column order.
- _time
- Required
- Use the timechart command in the query to generate a _time field.
- <latitude_field>
- Required
- This field indicates geographic latitude values in the data.
- <longitude_field>
- Required
- This field indicates geographic longitude values in the data.
- <resource_field>
- Required
- Values in this field indicate the different resources that you are tracking.
- <icon_field>
- Optional
- Values in this field determine map marker icons.
Search result data formatting
The location tracker search syntax returns results in a table with multiple columns. Columns represent the time, geographic coordinates, resource, color, and icon fields.
Check the Statistics tab after running a query to make sure that the results table includes the correct columns in the required order.
Results table columns
First | Second | Third | Fourth | Fifth |
---|---|---|---|---|
_time | latitude | longitude | resource | icon (optional) |
Example search
Here is a search that tracks driver locations and timestamps for a taxi service.
| inputlookup locations.csv | table _time latitude longitude user
The search generates the following results table.
Location tracker installation | Location tracker components |
This documentation applies to the following versions of Location Tracker: 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.5.1
Feedback submitted, thanks!