# Linemap

To learn more about linemap charts and how to create one, please view this [video](https://youtu.be/R8oe0K4dbkE?si=z_B9mD0SNNFw3Ikb).

The Linemap superimposes `LINESTRING` or `MULTILINESTRING` objects onto a geographic map. Uses include tracking shipping and transportation routes in real time, and studying geographic features such as fault lines.

| Features                                                              | Quantity | Notes                                                 |
| --------------------------------------------------------------------- | -------- | ----------------------------------------------------- |
| Required [Dimensions](/immerse/measures-and-dimensions.md#dimensions) | 0        |                                                       |
| Required [Measures](/immerse/measures-and-dimensions.md#measures)     | 1        | Measure Geo (a LINESTRING or MULTILINESTRING column). |

{% embed url="<https://www.youtube.com/watch?v=c8bzlWV9doQ>" %}

### Chart Popup Information

When you hover over a Linemap chart, a popup box appears that contains the column information for the highlighted area. You can copy this information to the clipboard. If the column information includes a URL, you can click the URL to open it in a browser.

![](/files/ub8HJTmCH8ZlrCr6Rhds)

## Examples

This example uses a dataset that maps geological fault lines in the United States of America, similar to datasets available at the [Koordinates.com](https://koordinates.com/publisher/usgs/data/) site. Set the **Geo** field to *mapd\_geo*.

![](/files/c0wc0dc5P2taJiWJRPHF)

You can use *length* to determine the width of the lines to make longer faults stand out. You can also use a text label for the color, which provides a legend and a guide to the type of faults displayed.

![](/files/0TEjPzn21Va3mdIo2kZA)

You can fine tune the graph further with enhancements such as changing the map theme, reducing the number of lines, changing the size domain and range, and adding values to the pop-up box.

![](/files/USNLthYwk5RT0ahJpt9g)

### Loading Linestring Data for Linemap

You can load your own linestring data to create Linemap charts. Linestring coordinates must be:

* Expressed as *longitude latitude*
* Between -180 to 180 (longitude), -90 to 90 (latitude)

North and East coordinates are positive numbers, South and West are negative numbers.

For example, you can import this CSV file with coordinates for Los Angeles to New York, San Francisco to Miami.

1. Save the following content as `crossCountry.csv`.

   ```
   cities,distance
   "LA-NY","LINESTRING( -118.2437 34.0522, -74.0060 40.7128)"
   "SF-MI","LINESTRING( -122.4194 37.7749, -80.1918 25.7617)"
   ```
2. Open Immerse
3. Choose the **Data Manager** tab.
4. Click **Import Data**.
5. Click **Import data from a local file**.
6. Click the **+** icon to browse for and open your file.
7. Click **Preview**.
8. Name the table *crossCountry*.
9. Verify the data is correct and click **Import Table**.
10. Click the **Dashboards** tab.
11. Click **New Dashboard**.
12. Click **Add Chart**.
13. Choose **Linemap**.
14. Click **+ Add Data Source**.
15. Choose *crossCountry* as the data source.
16. In the **Geo** field, click **+ Add Measure**.
17. Choose *Distance*.

    Your Linemap links Los Angeles to New York, San Francisco to Miami.

![](/files/iu5wK9r9sfckoSChMwwJ)

## Zoom

You can zoom in and out of a Linemap chart in the following ways:

* Using the mouse scrolling wheel.
* Selecting an area by holding down the Shift key and using the mouse to select the zoom area.
* Using the Zoom To box in the upper right of the map:
  * Type the name of a geographic location (address, city, state, or country) and optional zoom level. For example, **Denver, CO, !8** zooms to Denver, Colorado, with a zoom level of 8.
  * Enter latitude and longitude coordinates, and optional zoom level. For example, **39.26911, -76.54068, !9** takes you to Baltimore, MD, at zoom level 9.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.heavy.ai/immerse/immerse-chart-types/linemap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
