> ## Documentation Index
> Fetch the complete documentation index at: https://domoinc-openapi-sync-dataflows.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Flex Map v2 | Implementation Guide

export const InlineImage = ({src, alt = '', height = '1.6em'}) => {
  return <img noZoom src={src} alt={alt} style={{
    display: 'inline',
    verticalAlign: 'start',
    height: height,
    margin: '0'
  }} />;
};

## Intro

<Warning>
  **Important:** This guide helps you implement the Flex Map v2 app. This guide does not help you implement the [Flex Map v1](http://domo-support.domo.com/s/article/360043438353?language=en_US) app. To implement the Flex Map v1 app, see the [Flex Map v1 Implementation Guide](http://domo-support.domo.com/s/article/360043884674?language=en_US).
</Warning>

Flex Map v2 is a premium app you can use to map locations and territories and get geographical insights into your data. You can also discover relationships between locations and important locations.

***

## Prerequisites

Before you can use Flex Map v2, you need to create the following groups in your Domo instance:

* \_FlexMap\_Admins
* \_FlexMap\_ViewOnly

## Configuring Required DataSets

Before you can configure the app, you need to create two DataSets to power the four main parts of its functionality:

* Pin Layers
* Heatmaps
* Map Layers
* Uploading custom KML or GEOJSON layer files to display

The details for the two DataSets are as follows:

1. Locations Data — This is the main locations DataSet. Rows of locations data are mapped by latitude and longitude.
2. Heatmap Data — This is the main Heatmap DataSet. Rows of data by region display as numerical or categorical heat maps.

Prepare each DataSet as detailed below.

### Locations Data

The app requires the following fields for the Locations DataSet.

<Warning>
  **Important:** The required fields are case sensitive, so make sure to add these columns to your data with the names as shown.
</Warning>

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:208;a"><thead><tr><th colspan="1" rowspan="1"><p> Column Name </p></th><th colspan="1" rowspan="1"><p> Description </p></th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><p> Location Id </p></td><td colspan="1" rowspan="1"><p> A unique number/letter combination for a location. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Latitude </p></td><td colspan="1" rowspan="1"><p> The latitude of a location. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Longitude </p></td><td colspan="1" rowspan="1"><p> The longitude of a location. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Location Name </p></td><td colspan="1" rowspan="1"><p> The name of the location. <br /> This value should be a 1:1 relation with the Location Id for the location. You can have multiple rows for a single location and the app groups the data for the location together by the ID and name. </p></td></tr><tr><td colspan="1" rowspan="1"><p> Address </p></td><td colspan="1" rowspan="1"><p> The address of a location. </p></td></tr><tr><td colspan="1" rowspan="1"><p> SearchCache </p></td><td colspan="1" rowspan="1"><p> A comma separated list of terms you want the app to use to find the location when searching using the main search bar of the app. </p></td></tr><tr><td colspan="1" rowspan="1"><p><em> Additional Columns </em></p></td><td colspan="1" rowspan="1"><p> Any additional columns for data and metrics for the locations you want to display with the mapped pins. </p><p> Possible values include: Region, other address data, other metrics </p></td></tr></tbody></table>

### Heatmap Data

Use this data to map metrics to regions for the Heatmaps in the app. The most important columns from this data are RegionCode and RegionType.

The app uses statistical regions to create the Heatmaps, so you need to map your metric data to the region types that the app needs.

For example, if you are in the USA and you have metric data based on zip code, you need to map your zip codes to CBSA codes in order for the map to use your data. You can easily find data to map your data to these codes online.

The app supports the following region codes/types: CBSA for the USA, CMA for Canada, SA3 for Australia, and NUTS 2 for Europe. Reach out to your Account Executive (AE) or Customer Success Manager (CSM) if you need regions beyond what is available.

The app requires the following fields for the Heatmap DataSet.
The three required fields are case sensitive, so add them to your data with the names as shown:

<table border="1" cellpadding="1" cellspacing="1" data-aura-rendered-by="33:208;a"><thead><tr><th colspan="1" rowspan="1"><p> Column Name </p></th><th colspan="1" rowspan="1"><p> Description </p></th></tr></thead><tbody><tr><td colspan="1" rowspan="1"><p> RegionCode </p></td><td colspan="1" rowspan="1"><p> The code for the area that corresponds to the value in the RegionType column. </p><p> Example: RegionCode: 30030; RegionType: CBSA </p></td></tr><tr><td colspan="1" rowspan="1"><p> RegionName </p></td><td colspan="1" rowspan="1"><p> (Optional) The name of the region, if applicable. </p></td></tr><tr><td colspan="1" rowspan="1"><p> RegionType </p></td><td colspan="1" rowspan="1"><p> The value corresponds to the value in the RegionCode. </p><p> Possible values include: CBSA, CMA, NUTS 2, and SA3. </p></td></tr><tr><td colspan="1" rowspan="1"><p><i> Your Metric Columns </i></p></td><td colspan="1" rowspan="1"><p> Any columns with the metrics that you want to use to build your heat maps. You can add as many as you want, but at least one is required for heat map functionality. </p></td></tr><tr><td colspan="1" rowspan="1"><p><em> Additional Metadata Columns </em></p></td><td colspan="1" rowspan="1"><p> Optional columns with metadata about the regions you want to map that use Domo Page filters to filter through the data. </p></td></tr></tbody></table>

## Configuring Domo User Groups

Flex Map v2 supports three different user levels—Admin, Standard, and View-only.

To have admin or view-only privileges within the app, users must be added to a Domo Group. Standard users aren't added to a group and receive the standard app privileges and functionality. The following list describes the differences between the three user levels:

* Admin users can share items they create in the app with members of Domo Groups, and configure a default map and a default center.
* Standard users can create their own items and see things that admin users share with them, but can't share items or set defaults.
* View-only users can't create anything in the app. They can only view items that admin users share with them.

To add admin and view-only users, a Domo admin must navigate to the Domo admin portal and create two Domo Groups: \_FlexMap\_Admins and \_FlexMap\_ViewOnly.

Add a user to either group to give them admin or view-only privileges, or do not add the user to either group to give them standard user privileges.

## Connecting Your Data to the App

After you configure the required DataSets and user groups, you can deploy the app and connect your data.

* If you have access to the app card inside the
  **Asset Library**, deploy the app to a dashboard in Domo and follow the numbered steps below.
* If the app card has been deployed for you with sample data, navigate to the app, then follow the numbered steps below.

Follow these steps to connect your data to the app:

1. Hover over the top right corner of the app until
   <InlineImage src="/images/kb/ka05w00000127Q7-00N5w00000Ri7BU-0EM5w000005vsLM.jpg" /> **Card options** displays floating over the other map controls.

   <Frame>
     <img alt="card options over controls.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/WU9_nv8qBSXeO2YZ/images/kb/ka05w0000012A9f-00N5w00000Ri7BU-0EM5w000006wFwI.jpg?fit=max&auto=format&n=WU9_nv8qBSXeO2YZ&q=85&s=46ad19b45f4404c4f6e28655e9e4d941" style={{width: 328.999, height: 339.986}} width="712" height="736" data-path="images/kb/ka05w0000012A9f-00N5w00000Ri7BU-0EM5w000006wFwI.jpg" />
   </Frame>

2. Select <InlineImage src="/images/kb/ka05w00000127Q7-00N5w00000Ri7BU-0EM5w000005vsLM.jpg" /> **Card options** > **Edit Card**. The card editor opens.

3. (Optional) Check the box for
   **Fullpage** if you want to see the full page of the app as you edit.

   <Frame>
     <img alt="fullpage.jpeg" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/GXvfa618wDUsB9JU/images/kb/ka05w00000127Q7-00N5w00000Ri7BU-0EM5w000005vsM0.jpg?fit=max&auto=format&n=GXvfa618wDUsB9JU&q=85&s=2c0b0b42bb4380f62bdacd1388c47435" style={{width: 376.996, height: 218.999}} width="824" height="478" data-path="images/kb/ka05w00000127Q7-00N5w00000Ri7BU-0EM5w000005vsM0.jpg" />
   </Frame>

4. At the bottom of the card editor screen, locate the data
   **Mapping** area. (If it is not visible, select <InlineImage src="/images/kb/ka05w0000012Aee-00N5w00000Ri7BU-0EM5w000005w8c8.jpg" /> **Expand** to view it.) There are two tabs in this area: <InlineImage src="/images/kb/ka05w0000012Aee-00N5w00000Ri7BU-0EM5w000005w8bZ.jpg" /> **DataSets** and <InlineImage src="/images/kb/ka05w0000012Aee-00N5w00000Ri7BU-0EM5w000005w8bP.jpg" /> **Collections**. You can select the hamburger menu to view the mapping navigation drawer.

   <Frame>
     <img alt="hamburger menu mapping.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/WU9_nv8qBSXeO2YZ/images/kb/ka05w0000012A9f-00N5w00000Ri7BU-0EM5w000006wFwr.jpg?fit=max&auto=format&n=WU9_nv8qBSXeO2YZ&q=85&s=d3647e5208b9f67e839f5ff97f3f091b" style={{width: 1208.95, height: 257.997}} width="6010" height="1284" data-path="images/kb/ka05w0000012A9f-00N5w00000Ri7BU-0EM5w000006wFwr.jpg" />
   </Frame>

   <Frame>
     <img alt="mapping menu open.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/WU9_nv8qBSXeO2YZ/images/kb/ka05w0000012A9f-00N5w00000Ri7BU-0EM5w000006wFww.jpg?fit=max&auto=format&n=WU9_nv8qBSXeO2YZ&q=85&s=7aad8e999f599079e9946a282d5280d9" style={{width: 215, height: 303.999}} width="886" height="1252" data-path="images/kb/ka05w0000012A9f-00N5w00000Ri7BU-0EM5w000006wFww.jpg" />
   </Frame>

5. In the
   <InlineImage src="/images/kb/ka05w0000012Aee-00N5w00000Ri7BU-0EM5w000005w8bZ.jpg" /> **DataSets** tab (default), select the DataSet list at the top of the tab and choose **locations**.

   <Frame>
     <img alt="datasets tab_dataset list.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/WU9_nv8qBSXeO2YZ/images/kb/ka05w0000012A9f-00N5w00000Ri7BU-0EM5w000006wFx6.jpg?fit=max&auto=format&n=WU9_nv8qBSXeO2YZ&q=85&s=9170932be8c350579f3627f556487b1d" style={{width: 335.994, height: 189.993}} width="980" height="554" data-path="images/kb/ka05w0000012A9f-00N5w00000Ri7BU-0EM5w000006wFx6.jpg" />
   </Frame>

6. Under
   **Select DataSet**, click the button to open the **Select and DataSet** modal.

7. In the modal, search for and select the prepared Locations DataSet.

   <Frame>
     <img alt="Screen Shot 2022-12-05 at 5.29.35 AM.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/WU9_nv8qBSXeO2YZ/images/kb/ka05w0000012A9f-00N5w00000Ri7BU-0EM5w000006wFxB.jpg?fit=max&auto=format&n=WU9_nv8qBSXeO2YZ&q=85&s=22f01c2778b21340489416f71f312cb7" style={{width: 470.994, height: 365.994}} width="1446" height="1124" data-path="images/kb/ka05w0000012A9f-00N5w00000Ri7BU-0EM5w000006wFxB.jpg" />
   </Frame>

8. When you find and select your DataSet, select
   **Choose DataSet** to close the modal.

9. Repeat steps 5–8 for the
   **heatmap** DataSet.

10. Go to the
    <InlineImage src="/images/kb/ka05w0000012Aee-00N5w00000Ri7BU-0EM5w000005w8bP.jpg" /> **Collections** tab and toggle the switch to **Automatically create un-configured collections with app defaults**.

    <Frame>
      <img alt="Screen Shot 2022-12-08 at 2.12.19 PM.png" src="https://mintcdn.com/domoinc-openapi-sync-dataflows/WU9_nv8qBSXeO2YZ/images/kb/ka05w0000012A9f-00N5w00000Ri7BU-0EM5w000006wFxL.jpg?fit=max&auto=format&n=WU9_nv8qBSXeO2YZ&q=85&s=1edcad5f440f3db8867e617b90eab02b" style={{width: 455, height: 114}} width="1794" height="450" data-path="images/kb/ka05w0000012A9f-00N5w00000Ri7BU-0EM5w000006wFxL.jpg" />
    </Frame>

11. Select
    **Save and Finish** at the top of the card editor to save your configuration.

After configuring your Flex Map v2 app, you can learn about navigating it in the [Flex Map v2 User Guide](https://domo-support.domo.com/s/article/000005048).
