Qlik Sense Map charts are used to geographically display data related to countries, cities, states, regions, or particular geolocations (etc…). Maps offer different ways to present your data by first setting a base layer, then adding multiple layers to the map which are specific locations highlighted in multiple ways including Area, Points, Lines, Density, boundaries etc..
You can add as many layers as you want. These layers are comprised of dimensions and measures that allow to efficiently present geographical distribution of values related to locations in order to display a data story.
Types of layers:
- Point Layer: composed of bubbles or markers (you can choose a shape) positioned in specific coordinates (Lat / Long)
- Area Layer: geographic shapes sized and placed on specific areas
- Line Layer: connect two fields containing point data or a field containing geometries.
- Heatmap Layer: uses color gradient to show data density (intensity is greater at the center and declines towards the outer perimeter)
![Img1.png Img1.png](https://community.qlik.com/t5/image/serverpage/image-id/96867i96C04107FEACFC17/image-size/large?v=v2&px=999)
Base Maps:
Using different base maps can enhance the way data is displayed and aid in analysis. You can choose from:
- Default: Good for when using only 1 or 2 simple layers
- Pale: great for when you add multiple layers with different colors which might be difficult to read if using the default base
- Dark: good for when you color layers with bright colors, this style can also be used when it matches the rest of your dark themed dashboard.
- Satellite: gives a more realistic look to your map
- None: in this case, you can add custom background layers (covered later in this post)
![Img2.png Img2.png](https://community.qlik.com/t5/image/serverpage/image-id/96868iDE04E0C7826DBA41/image-dimensions/143x450?v=v2)
Best Practices when designing Maps:
- Make your maps Simple to read:
- Be sure to use colors purposefully (stick to the default palette or use something like this https://jarrettmeyer.com/2018/08/07/viridis-color-palette)
- Use tooltips when necessary to provide more context when your layers are hovered.
- Change fonts and font colors when necessary, think about contrast between your layer coloring and the overlapping text font color.
- Think about the data you are visualizing:
- Continuous vs Discrete
- If visualizing two or more variable, it’s better to use color and size
- For instance, in a point layer showing office locations, you can color the point based on number of employees and size the bubble based on the Sum of sales made.
Advanced Uses:
Multi-Layer Maps:
When including multiple layers in map chart, it might become hard to interpret data. In that case, you can address this by controlling at what zoom levels different layers appear or have layers that appear only if other values in a drill-down dimensions are selected. This allows to create multiple levels of detail as you make selections and zoom in and out or locations of interest on the map.
- Zoom-Dependent Layer Display
Let’s create a map that relies on Zoom to reveal different layers.
- We start by creating the first layer as an Area layer to represent Countries and we color using the Sum(Sales) aggregated measure.
- We choose the Pale base type in order for the data to stand out more.
![Img22.png Img22.png](https://community.qlik.com/t5/image/serverpage/image-id/96869i0FEEAD40388242DE/image-dimensions/560x283?v=v2)
- Next, we add two new Point Layers
- First, to represent cities. We choose to color by measure using the Sum(Sales) aggregation.
- Second, to represent Customers. We choose the shape of the point layer to be a Triangle, and we color by Sum(Sales)
- Lastly, we configure the Layers to only show at certain zoom levels. We do that by changing the Layer Display “Show in zoom levels” property from Auto to Custom.
- Country Area Layer will show up until 4x zoom
- City Point Layer will show from 4x to 9x zoom
- Customer Layer will show starting at 10x zoom
![Img33.png Img33.png](https://community.qlik.com/t5/image/serverpage/image-id/96870iD7EB34CF294A7114/image-dimensions/600x310?v=v2)
The result:
![opti1.gif opti1.gif](https://community.qlik.com/t5/image/serverpage/image-id/96879iD3679460C4CC7A77/image-size/large?v=v2&px=999)
Let’s create a map that uses a drill-down dimension to display layers based on selection. Keep in mind that Drill-down dimensions should have the fields in order of highest geographical are to smallest geographical area.
- First, we create a Drill-down master dimension that contains three levels:
- Sales Region
- State
- Sales office
![Img44.png Img44.png](https://community.qlik.com/t5/image/serverpage/image-id/96871iE9D20B83A3E47A66/image-dimensions/644x448?v=v2)
- Next, we add out 3 layers:
- An Area Layer for Sales Region: Choose the created Master Dimension as the dimension of the layer, and choose Sales Region.Area as the location.
- An Area Layer for the states.
- A Point layer for Sales offices.
- To enable the drill-down functionality. For each layer, navigate to Layer Options > Display. And change the “Visible drill-down levels” property from Auto to Custom and un-select the non-relevant layers, for instance:
![Img55.png Img55.png](https://community.qlik.com/t5/image/serverpage/image-id/96872iFBF22344AC395528/image-dimensions/201x562?v=v2)
The result:
![opti2.gif opti2.gif](https://community.qlik.com/t5/image/serverpage/image-id/96880iE1A4D38EE0CF215F/image-size/large?v=v2&px=999)
Tip:
If you load data and it appears incorrect like below:
![Img77.png Img77.png](https://community.qlik.com/t5/image/serverpage/image-id/96873i355C08C6028D57C7/image-dimensions/504x270?v=v2)
Head to Location, switch off Scope for location from Auto to Custom.
Change Location Type to “Administrative Area (Level 1)” in our case. Then, change Country to your location, in our example it’s ‘US’
![Img88.png Img88.png](https://community.qlik.com/t5/image/serverpage/image-id/96874i0B29F505550B1CA8/image-dimensions/493x290?v=v2)
Multiple Background Layers:
To use custom base maps beyond the types mentioned above, you can add different background layers.
Let’s create a map with multiple background layers using a TMS and two WMS.
- First, we need to set the Base Map to non under Map Settings.
- Next, we add the first layer as a Background Layer and choose Format to be TMS
- We include the appropriate URL and attribution
- For the second and third layers, we use WMS server URLs, set the version and Load the WMS.
Important:
Keep in mind that when using URLs for TMS and WMS formats for background layers, these URLs that contain resource requests to external resources must have its origins allowlisted in the Content Security Policy, else the resource will not be loaded. WMS resources must have both image-src and connect-src directives allowlisted. More Info here.
![Img66.png Img66.png](https://community.qlik.com/t5/image/serverpage/image-id/96875i90E4CF1814757329/image-dimensions/307x257?v=v2)
- Finally, we add a Point Layer.
The Result:
![Img99.png Img99.png](https://community.qlik.com/t5/image/serverpage/image-id/96876i8C610B43D7CF69AB/image-size/large?v=v2&px=999)
The QVFs for all three advanced examples can be found below. You can load them to your Qlik Cloud tenant, investigate the chart settings, and tweak the configurations to practice these concepts.
MultipleBackgroundLayersBlogExample.qvf