Use Multiple Layers in Geo Charts
Geo charts support multiple layers, allowing you to combine different geographic representations in a single visualization. At the moment, layers can be defined only in the GoodData for VS Code using YAML.
A single geo chart can contain up to 5 layers in total, including the base (core) layer.
Layers are defined using the layers property. Each layer follows the same general structure as the root geo chart definition and can define its own metrics, view_by, and segment_by buckets. Supported layer types are area and pushpin.
The visualization type defines the core layer. Using geo_area_chart creates an area-based map (choropleth) as the base layer. Using geo_chart creates a pushpin map as the base layer. Any layers defined in the layers section are rendered on top of this core layer.
This example shows an area geo chart with an additional pushpin layer rendered on top of it:
type: geo_area_chart
id: layered
title: mkn-layers
query:
fields:
3275aafed933486ab67473a0b98643fb: label/customer_region.customer_region_code
87bbdf10bf204aaa9349379b67b7fcf3: label/customer_country
f4b048c512674ffb839fd4851b58dd5a: attribute/customer_city
4796fa60126e441b891b80a0f03d321b:
aggregation: SUM
using: fact/order_unit_price
view_by:
- 3275aafed933486ab67473a0b98643fb
segment_by:
- 87bbdf10bf204aaa9349379b67b7fcf3
layers:
- id: layer_pushpins
title: Pushpin layer
type: pushpin
metrics:
- field: 4796fa60126e441b891b80a0f03d321b
format: "#,##0.00"
view_by:
- f4b048c512674ffb839fd4851b58dd5a
segment_by:
- 87bbdf10bf204aaa9349379b67b7fcf3Drilling
Drill definitions are applied at the metric level and are shared across all layers in a geo chart. This means that if multiple layers use the same metric, they will also share the same drill configuration.
If you need different drill behaviors for different layers, define separate metrics for each layer and configure drills for those metrics individually.