Skip to main content

Vector Tiles

Vector tiles provide a way of delivering large numbers of shapes on the map. As they are simplified for each level of zoom, they can provide precise coordinates at detailed levels of zoom.

Vector tiles can be generated and hosted in platforms such as GeoServer and Mapbox Studio.

Data Setup

In order for Power BI to interact with shapes the following fields must be provided:

Data setup example

  • ID - the unique reference of a feature within your file
  • GeoJSON / KML / Shapefile / Tile / Feature Reference - an item from your Power BI data than can be joined with the value in a property of that feature within tile layer.

Join Data

Sample data

IDLongitudeLatitudeDestination LongitudeDestination LatitudeCircle SizeCluster GroupH3 WeightHeatmap WeightImage / WKT / GeoJSONFeature ReferenceFeature Weight
1nullnullnullnullnullnullnullnullnullEnglandnull
2nullnullnullnullnullnullnullnullnullScotlandnull

Drill down

It is possible to create multiple levels of vector tile layers, and use Power BI's drill down features to view more levels of detail. Dragging the ID field of the 2nd level down into the ID field well enables drill down within the visual. The "Feature Reference" field well should contain a field to lookup the relating property for each level of drill down.

Data setup example with drill down.

Sample data

IDLongitudeLatitudeDestination LongitudeDestination LatitudeCircle SizeCluster GroupH3 WeightHeatmap WeightImage / WKT / GeoJSONFeature ReferenceFeature Weight
A1nullnullnullnullnullnullnullnullnullSurreynull
A2nullnullnullnullnullnullnullnullnullHampshirenull
B1nullnullnullnullnullnullnullnullnullWaverleynull
B2nullnullnullnullnullnullnullnullnullEast Hampshirenull

Multiple Layers

It is possible to add multiple layers of vector tiles on the same map. These layers can operate through Power BI's drill-down where only one layer is visible at a time, or set to show all layers at the same time.

Configure the number of levels / layers from the Vector Tiles - Setup options:

Vector tile setup

If you select more than one level, select the level or layer to set the configuration and formatting options for in the "Apply settings to" dropdown. Each level and layer is configured independently.

Please note these options are only available for maps added to reports using Icon Map Pro version 1.0.4.1 or later.

Configuration Options

To enable vector tiles, the "Vector Tiles" toggle should be enabled in the Data Layers section of the visual's formatting options.

Configuration Options

Number of Drill-down Levels

Drill-down levels

Icon Map Pro supports up to 5 levels of drill-down. Increasing this value above 1, will enable provide additional options to enter layers for each level. Setting the value to 1 assumes that there will be one level of data.

Vector Tile XYZ URL

This is the URL template for requesting tiles from the server. There are a number of prerequisites:

  • Tiles must be served as EPSG:3857
  • Tiles must be served as Mapbox Vector Tiles in Protobuf format
  • The URL should start https
  • The server must be configured for CORS

GeoServer URL

The URL for GeoServer's GeoWebCache WMTS service could similar to the URL below:

https://my.geoserverwebaddress.com/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=iconmap:LAD_DEC_2022&STYLE=&TILEMATRIX=EPSG:3857:{z}&TILEMATRIXSET=EPSG:3857&FORMAT=application/vnd.mapbox-vector-tile&TILECOL={x}&TILEROW={y}

Mapbox URL

To determine your URL for Mapbox tilesets, within Mapbox Studio, navigate to preview your tileset:

Mapbox studio

and capture the highlighted part of the URL:

URL

and then add:

{z}/{x}/{y}.vector.pbf?access_token=MapboxAccessTokenGoesHere

after, substituting "MapboxAccessTokenGoesHere" for your Mapbox API key so that the whole URL resembles:

https://api.mapbox.com/v4/mapboxaccountname.tilesetid/{z}/{x}/{y}.vector.pbf?access_token=MapboxAccessTokenGoesHere

Match a Specific Property

When Icon Map Pro draws the features (a point, polygon, linestring etc) from the layer on the map, it tries to match each feature to a row of Power BI data in the "Feature Reference" field. It does this by checking the properties of each feature against the value in each row of data. If features have a large number of properties this can take time. Also if there are conflicts between the values in different properties, it can cause false matches.

Join Data

To improve performance and avoid false matches it is possible to configure a specific property to check against.

Match a specific property

The value in this field should be the name of the property in your layer and is case sensitive.

Add Property to Tooltip

Tooltip with the code added

This provides a convenient way of adding the join field to the tooltip.

Add All Properties to Tooltip

This will add all the features of matched shapes to the tooltip.

All properties

Add Tooltips to Unmatched Shapes

Unmatched Tooltips

This will add tooltips exposing the properties of unmatched shapes. This is also useful for debugging your shapes if matching is not occurring as you expect.

Selectable

Determines whether these items can be selected to cross-filter or highlight other visuals on the Power BI report. This can be configured using conditional format to specify this option an a row by row basis.

Layer Name(s)

Some vector tile sources may have multiple layers. For example a source may contain polygons and the polygons' centroids as separate layers within the same source. It is possible to specify the layer to include by specifying its name. Multiple layers can be listed separated by commas.

Min Zoom Level

It is possible to configure layers to only appear between specific zoom levels. The Min Zoom Level specifies the zoom level that the layer should start appearing.

Max Zoom Level

It is possible to configure layers to only appear between specific zoom levels. The Max Zoom Level specifies the zoom level that the layer should stop being visible.

Min and Max Detail Zoom Level

Vector tile sources may not contain tiles for every level of zoom. Setting the min and max detail levels means that for layers outside the min and max values, either the min detail zoom level's tiles will be used when zooming out, or the max detail's zoom level will be used when zooming in. Vector tiles will be scaled based on the detail available at those levels.

If the min and max zoom levels are configured beyond the available tiles, then no tiles will be shown at those zoom levels.

Visible

It is possible to set whether a layer is visible or not using conditional formatting. Specifying a field or DAX measure that returns either "yes" or "no" will determine whether this layer is visible.

Z-Index

A number that determines the order that different map layers appear in. The larger the number, the nearer the foreground.

Labels Z-Index

A number that determines the order that different map layers appear in. This settings enables you to specify the z-Index that data bound labels for items in the vector tile layer appear at. The larger the number, the nearer the foreground.

Formatting Options

Formatting for Matched Shapes

Matched Shapes Formatting

Outline color

The color of shape outlines or linestrings.

Outline transparency

Transparency shape outlines or linestrings. This should be a numeric value between 0 and 100.

Outline Width

Width of the outline in pixels. Can be a decimal number.

Circle Radius

The radius to draw circles for any point data within the vector tile layer.

Dash Array

The dash array determines the pattern used for the line. It consists of a series of space separated numbers. Each value represents the length along the line that should be painted (the dash) and then not painted (the gap). Eg:

4 4

Fill Color

Fill color of a shape.

Fill Transparency

Transparency of the fill of a shape.

Formatting for Unmatched Shapes

Unmatched Formatting Options

Unmatched Outline color

The color of shape outlines or linestrings.

Unmatched Outline transparency

Transparency shape outlines or linestrings. This should be a numeric value between 0 and 100.

Unmatched Outline Width

Width of the outline in pixels. Can be a decimal number.

Unmatched Dash Array

The dash array determines the pattern used for the line. It consists of a series of space separated numbers. Each value represents the length along the line that should be painted (the dash) and then not painted (the gap). Eg:

4 4

Unmatched Fill Color

Fill color of a shape.

Unmatched Fill Transparency

Transparency of the fill of a shape.

Unmatched Circle Radius

The radius to draw circles for any point data within the vector tile layer.