Skip to main content

Combining multiple layer types on the same map

Configuring Icon Map for multiple layers

Icon Map Pro supports adding different types of data-bound items on the same map. This process is not trivial as Power BI does not provide a method for items from different tables in the Power BI semantic model to be added to the same visual, unless they are related in a way that allows them to be presented as a flat table.

For example, deprivation data displayed as a choropleth map in a GeoJSON layer, needs to be located in the same place as point data presented as circles.

Combined Layer

The easiest way of achieving this is to have a single table containing all your data-bound map items. Each row represents an item to show on the map. Icon Map Pro determines which type of map layer that row represents based on which fields are populated.

For example to plot circles on the map the ID, Longitude and Latitude fields must be populated. All other fields must either not have fields assigned or contain null or BLANK() values.

IDLongitudeLatitudeDestination LongitudeDestination LatitudeCircle SizeH3 WeightImage / WKT / GeoJSONFeature ReferenceDaylight Date & TimeTooltips
Circle1-2.57651.481nullnull50nullnullnull(optional)optional
Circle2-2.95551.332nullnull100nullnullnull(optional)optional

If destination longitude and latitudes were also provided on this row, then circles would not be displayed as the rows would then be configured for lines. Lines would only be displayed if the Lines toggle was also enabled in the Data Layers section of the Icon Map Pro formatting options, and the Circle Size data replaced with nulls.

Daylight Date & Time and Tooltips do not impact which data layers are displayed.

Controlling which layers are displayed using Power BI slicers

As which layers are displayed is based on the configuration of the data fields, it's possible to use a Power BI slicer to determine which shapes are displayed.

This table of data contains Well Known Text polygons and circles. The Well Known Text polygons represent either Health Areas or Local Authority Areas. The Circles represent the locations of clinics.

Health Data Table

A slicer can be added to the report based on the Type field, which can then determine whether Health Areas, Clinics or Local Authority Areas are shown on the map, or a combination.

If the requirement is to either show Health Areas or Local Authority Areas and always show the clinics, then a separate table can be created with the slicer options. These are then joined to the table containing the map data with a join table as follows:

Join Table Example

The slicer is now configured from the Type field in the Slicer table. The slicer should also be set to type "Single Select":

Slicer Configuration