Map Charts
Map charts include two types: Simple Maps and Layered Maps. The Simple Map displays geographic-related information on a map, with simple operations and no other complex data usage scenarios. Layered Maps, on the other hand, are used for complex geographic information display, where different layers are overlaid to present geographic information, allowing users to more intuitively understand the data content and analyze the data.
Before introducing the two types of map charts, let's first discuss the positioning modes of maps.
Positioning Modes
When creating maps, it is necessary to locate the data on the map based on geographic information. Common positioning modes include Place Mode and Latitude/Longitude Mode.
Place Mode is based on geographic names, such as country/region, province/municipality/autonomous region, city, district/county, etc., to locate the position on the map. For example, Beijing, Tianjin, Shanghai Pudong New Area, etc., can determine their positions on the map based on these place names. When using Place Mode, you first need to convert the geographic name field into a Geographic Role.
Latitude/Longitude Mode refers to positioning based on latitude and longitude information. This mode can automatically match the corresponding geographic location without the need for geographic role conversion.
Simple Map
The Simple Map displays geographic-related information in the corresponding map area, with no other complex data display scenarios. The image below shows the admission rates for the first batch of undergraduate programs in various provinces.
Additionally, the Simple Map supports Macro Region Map and Drill-Down Function.
The Simple Map is easy to create, and the process is introduced later in this article. You can refer to the example to create a Simple Map.
Layered Map
Layered Maps are often used in complex map analysis scenarios, such as sales in various regions, flight routes, product transportation routes, product popularity, etc. They can all be displayed using Layered Maps.
Currently, Layered Maps support layers such as Label Map, Area Map, Heat Map, Scatter Map, Fly Line Map, Trajectory Map, Polygon, etc. They support multiple layers overlaying and layer order adjustment. Please refer to Layered Map for the usage scenarios and display effects of each layer. Additionally, Layered Maps support GIS Layer effects.
Below is the effect of displaying the admission rates for the first batch of undergraduate programs in various provinces using an Area Map in Layered Maps.
Layered Maps support 2D and 3D display, which can be switched at will during display.
Map Creation
Editing Area Introduction
The interface of the map editing state is shown below, mainly divided into three areas.
Area 1 (blue box) is the data source area, displaying the dataset and its model, fields used by the chart, indicators, in-chart indicators, parameters, user attributes, etc.
Area 2 (yellow box) is the map creation area.
- In the configuration, drag and drop dimension and measure information to generate the map.
- The Simple Map includes one dimension and one measure. The dimension needs to use a Geographic Role field.
- Layered Map
- You can add layers by clicking the "+" button, adjust the layer order by the up and down arrows, and add various layers for layer sorting.
- There can be one layer or multiple layers, and the usage scenarios and detailed introductions of each layer are available.
- In the style settings, set the map style, including title, map theme, blending mode, padding, and settings for each layer. The following introduces the style settings related to the map. Common chart styles can be set in Style.
- Simple Map
- Map settings include border and background color.
- In the chart content, you can set colors, labels, and tooltip information.
- Layered Map
- The map theme uses GIS Background Map, including light, dark, no background, Baidu Map, and Gaode Map.
- The blending mode includes normal, additive, and subtractive modes. Additive mode uses Additive Color to display colors, while subtractive mode uses Subtractive Color to display colors.
- Simple Map
- In the interaction settings, you can set Limit Rows, Map Zoom, Auto Refresh, Time Roaming, etc.
- In the configuration, drag and drop dimension and measure information to generate the map.
Area 3 (red box) is the map display area. You can view detailed data and details.
Creation Process and Example
Simple Map Creation
Below is the creation process for a Simple Map. Please follow the steps below to create a Simple Map.
- Click the red icon to create a new chart. In the pop-up dialog box, select the data source and dataset, and choose Map -> Simple Map.
- After the chart is added successfully, the data information is displayed in the left data column. Refer to Geographic Role Conversion to convert the geographic location in the field into a geographic role.
- Drag and drop the geographic role field and measure field to generate the map.
- Set the map style, including color, label, tooltip information, etc.
- Set Interaction, Controls, Theme, etc.
- Preview the map display effect.
Layered Map Creation
Below is the creation process for a Layered Map. Please follow the steps below to create a Layered Map.
- Click the red icon to create a new chart. In the pop-up dialog box, select the data source and choose Map -> Layered Map.
- After the chart is added successfully, the data information is displayed in the left data column. Convert the geographic location in the field into a geographic role. If using latitude/longitude positioning, you can ignore this step. The example uses a geographic role for city-level administrative regions.
- Add layers for the Layered Map in the configuration. Click the "+" button, select the geographic layer to be added, and drag and drop the dimension and measure information. The example selects a heat map layer.
- Edit the map title, select the map theme, blending mode, top and bottom padding, and other basic map chart styles in the style settings, and edit the relevant styles for the layers. The example shows editing the style of the heat map.
- When there are multiple layers in the Layered Map, repeat steps 3 and 4, and click the arrows to adjust the layer order. The example creates a heat map and a label map, and adjusts the layer order so that the label map is above the area map.
- After all layers are added, set Interaction, Controls, Theme, etc.
- Preview the map display effect.
Map Drill-Down
In map charts, as long as a geographic role field is dragged in, a corresponding map can be generated. Therefore, in the drill-down levels of the map, you can drag in a geographic role field to achieve drill-down at various geographic levels. The drill-down layers of the map can be freely set and support drill-down to other charts.
For detailed operations of map drill-down, please refer to the control Drill-Down Settings.
Map Limitation Notes
When the number of maps under the same dashboard exceeds 5, the system will prompt that there are too many maps, as too many maps can cause the browser to load slowly or even crash.
Most browsers currently have a limit of 8 webgl contexts, meaning that the current browser only allows a maximum of 8 contexts to exist simultaneously, corresponding to 8 webgl canvases. Our Layered Maps create a context for each layer, and the system resources corresponding to each context cannot be shared, which can lead to context loss and loading failure when more than 8 contexts appear under the same browser.
If the browser is Chrome, you can adjust the experimental flag to set the context limit, such as launching Chrome via the command line on a Mac system to modify this limit.
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --max-active-webgl-contexts=32