Images and icons

The Images / Icons layer places a marker at each longitude and latitude. The marker is either an image held in your data, as a data URI or SVG text, or a short piece of text or an emoji drawn on a badge.

SVG icons of different shapes and colors marking cities on a map of Europe
An SVG icon at each location, taken from a column that holds SVG text for each row
Icon Map Lite cannot load images from links

Icon Map Lite makes no network requests, so it never downloads an image. A value such as https://example.com/icons/store.png is not drawn, and the row does not appear on the map. Put the image itself in your data instead:

  • a data URI, such as data:image/png;base64,iVBORw0...
  • SVG text, such as <svg xmlns="http://www.w3.org/2000/svg" ...>...</svg>
  • the word pin, for a built-in map pin

Or skip images altogether and use Text or emoji. See Where the image comes from.

What you need

Field well What to put in it
* ID (required) A unique value for each row
Longitude (X) Longitude in decimal degrees, summarized as Average
Latitude (Y) Latitude in decimal degrees, summarized as Average
Image / WKT / GeoJSON The image for each row: a data URI, SVG text or pin. Not needed when Image Source is Text or emoji.

These fields must be empty on an image's rows: Circle Size, Destination Longitude, Destination Latitude, Feature Reference, Heatmap Weight and Cell (H3/S2/A5/Geohash) Weight.

Remove Circle Size

A row with a value in Circle Size is a circle, not an image. If you started with circles, take the field out of Circle Size or the images will not appear.

Add images to the map

  1. Add fields to * ID (required), Longitude (X) and Latitude (Y). Set the coordinates to Average.
  2. If your data holds an image for each row, as a data URI or SVG text, add that field to Image / WKT / GeoJSON. If you want text or emoji markers, leave that field well empty.
  3. If the panel What kind of map are you making? is showing, select the Images & icons tile. Otherwise, in the Format pane expand Data Layers and switch on Images / Icons.
  4. Expand Images - Configuration and choose an Image Source: Image from data or Text or emoji.
  5. Set the size: Image Width and Image Height for images, or Icon Size for text and emoji.

Where the image comes from

Image Source has two options.

Image Source What each marker is Uses the Image / WKT / GeoJSON field
Image from data (the default) The image held in the row's Image / WKT / GeoJSON value Yes
Text or emoji The text in the Text or emoji setting, drawn on a badge No

Image from data

Each row carries its own image in the Image / WKT / GeoJSON field. The value must be one of these:

Value Example Drawn
A data URI of an image (PNG, JPEG, GIF, WebP or SVG) data:image/png;base64,iVBORw0... Yes
SVG text <svg xmlns="http://www.w3.org/2000/svg" ...>...</svg> Yes
The word pin pin Yes, as a built-in map pin
A link https://example.com/icons/store.png No
Any other text store No
Diagram: data URIs, SVG text and the word pin are drawn; links and other text are not
What Image from data accepts

The value must start with data:image, <svg, <?xml or be exactly pin, with nothing before it. A row whose value is anything else, including a link, is not drawn at all. Because the row has coordinates, it is not a shape either, so it reaches no layer.

Getting images into your data:

  • SVG text in a column or measure. SVG is plain text, so you can store it in a column, or build it in a DAX measure. Include xmlns="http://www.w3.org/2000/svg" in the <svg> tag. A measure can change the SVG per row, for example to color an icon by status:

    Status Icon =
    "<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'>"
        & "<circle cx='12' cy='12' r='10' fill='" & [Status Color] & "'/></svg>"
    
  • Data URIs. Convert each image file to a data URI with any image-to-data-URI tool, then store the result in a column. Keep the images small: Power BI holds at most 32,766 characters in one text value, and a longer data URI is cut short and cannot be drawn.

Text or emoji

Set Image Source to Text or emoji and type the text, a symbol or an emoji in the Text or emoji setting. Every location gets that text, drawn on a rounded badge. The default is ▲. Rows need nothing in Image / WKT / GeoJSON.

To show different text for each row, select the fx button next to Text or emoji, choose Field value and pick a column that holds the text or emoji for each row. See Conditional formatting.

  • The badge is as tall as Icon Size and as wide as the text needs.
  • Icon / Background Color and Icon Background Transparency set the badge.
  • Icon Text Color sets the text.

You can also set the text color in the value itself with a prefix:

Value Result
Hello or text:Hello "Hello" in the Icon Text Color
text-red:Hello "Hello" in red
text-#884455:Hello "Hello" in the color #884455

The named colors are white, black, red, amber, orange, yellow, green, blue and gray.

Emoji badges of several kinds at map locations
Text or emoji, with a different emoji for each row set by conditional formatting

There is no icon library in Icon Map Lite. Text that looks like an icon name, such as material-design-icons/filled/home, is drawn as that text. Use an emoji, a symbol character or an SVG instead.

If you keep a field in Image / WKT / GeoJSON while using Text or emoji, leave it blank on the image rows. A row whose value there is not an image is not drawn.

Settings

All of these are in Format pane > Data Layers > Images - Configuration, shown when the Images / Icons switch is on.

Setting What it does Default fx
Image Source Text or emoji or Image from data. See above. Image from data
Text or emoji The text or emoji drawn on each badge. Shown for Text or emoji. ▲ Yes
Use Cluster Color With Cluster Images on and a field in Cluster Group, each badge takes the color of its cluster group. Shown for Text or emoji. Off
Icon Text Color Text color of a badge. Shown for Text or emoji. #FFFFFF Yes
Icon / Background Color Background color of a badge. Shown for Text or emoji. #000000 Yes
Icon Background Transparency Transparency of a badge's background. Shown for Text or emoji. 0 Yes
Image Rotation Rotates the marker clockwise, in degrees, 0 to 360. Named Icon Rotation for Text or emoji. Use fx to point each marker in its own direction, for example a vehicle heading. 0 Yes
Rotation Alignment Viewport keeps markers fixed to the screen when the map rotates. Map rotates them with the map. Viewport
Pitch Alignment Viewport keeps markers upright when the map is tilted. Map lays them flat on the map. Viewport
Image Width Width in pixels, 0 to 1000. Named Icon Size for Text or emoji, where it sets the height of the badge. 30 Yes
Image Height Height in pixels, 0 to 1000. Shown for Image from data. 30 Yes
Transparency 0 is solid, 100 is invisible. 0 Yes
Offset Overlapping Images Markers at the same location are laid out side by side instead of on top of each other. Off
Offset Gap (pixels) Space between markers that have been offset. 0 to 100. 2
Offset Tolerance (meters) How close markers must be to count as the same location. 0 means exactly the same coordinates. Up to 10000. 0
Cluster Images Groups nearby markers into clusters. The cluster settings are in the Cluster - Configuration group of the same card. See Clusters. Off
Include in Auto Zoom Whether a marker counts toward the area the map zooms to. Yes Yes
Include Tooltip Whether a marker shows a tooltip. Yes Yes
Selectable Whether a marker can be selected. Yes Yes
Minimum Zoom Markers are hidden when the map is zoomed out past this level. -20 to 24. 0
Maximum Zoom Markers are hidden when the map is zoomed in past this level. -20 to 24. 24
EPSG Coordinate system of your longitude and latitude. 4326

Offset overlapping images

When several rows share a location, for example three assets at one site, their markers sit exactly on top of each other. Turn on Offset Overlapping Images to lay them out in a horizontal row centered on the location, Offset Gap (pixels) apart. Raise Offset Tolerance (meters) to treat markers within that distance as being at the same place. Offsets apply to markers that are not in a cluster.

Selection, tooltips and labels

  • Selection. Select a marker to filter the other visuals on the report page, as a slicer does. Hold Ctrl or Shift to select several. Markers you did not select fade, using Format pane > Selection > Formatting > Unselected Items Transparency. See Select and filter with the map.
  • Tooltips. With no fields in Tooltips, the tooltip shows the ID. Add fields to Tooltips to show those instead. See Tooltips.
  • Labels. Markers can carry data labels. See Data labels.
  • Legend. Images appear in the legend as Icons. See Legend.

Tips and limits

  • Nothing appears? Check the first characters of a value in Image / WKT / GeoJSON. A link, a file name or text with a space before <svg is not drawn. Also check that Circle Size is empty on those rows.
  • An image is anchored at its center. For a pin whose tip should touch the location, use an image with empty space below the tip so that the tip is at the center.
  • Markers never hide each other. Where they overlap, all of them are drawn.
  • Images and circles share one position in the drawing order, set by the Circles Z Index.
  • Text badges and images that repeat are drawn once and reused, so a few distinct values across many rows stay fast. Thousands of different images are slower: prefer a few small images, or text badges colored with fx.