-
Notifications
You must be signed in to change notification settings - Fork 25
Using maps in LoqklDx
Neil MacMullen edited this page Oct 5, 2025
·
3 revisions
To render maps use
render scatterchart with (kind=map)The map control uses a convention-based approach to using the columns in the query result so you may need to extend or project columns with the expected names. Note that column-names are not case-sensitive for the purposes of selection.
- latitude,lat - the latitude of the point to render (must be a column of real)
- latitude,lon,lng - the longitude of the point to render (must be a column of real)
-
PinScale - controls the size of the pin symbols. The default value is
0.3which can be changed via themap.pin.scalesetting. -
PinFill - defines the color used to fill pin symbols. The default value is
ff0000which can be changed via themap.pin.fillsetting. -
PinSymbol - defines the symbol used for pins. The default value is
ellipsewhich can be changed via themap.pin.symbolsetting. Valid values are:- ellipse
- triangle
- rectangle
-
index,timestamp - if either of these two columns are present, lines will be drawn between pins to show route. Note that currently no ordering is done on this column by the map control so you should ensure the rows in your result are already ordered correctly. The line color is set using the
map.line.pen.colorsetting and the default value is0000ff - series - if lines are being drawn then defining a series column ensures that paths are grouped by series.
-
tooltip - allows a tooltip to be placed over pins. Use
extend tooltip=strcat(line1,"\n",line2)for multi-line tooltips
The default map layer is "OpenStreetMap" but you can change this using the map.defaultLayer setting.
A special function heatmap_color is provided to allow coloring of items based on a continual color. The method returns a color in the form "#RRGBB" and accepts parameters
- type : one of 'grayscale','gradient' or 'hue'
- min : the minimum value of the range
- max : the maximum value of the range
- value : the value for which the color should be calculated
# assuming a table called "data" with lat,lng,value
let min = toscalar(data | summarize min(value));
let max = toscalar(data | summarize max(value));
data
| extend pinFill = heatmap_color("hue",min,max,value)
| extend pinScale=0.1
| order by value asc
| render scatterchart with (kind=map)
See the chart-demo project in the tutorials folder.
#Home
Core Engine
Lokqldx (UI data explorer)
- Introduction
- Tutorials
- Running queries and commands
- Autocompletion
- Generating powerpoint reports
- Accessing ApplicationInsights data
Powershell
Other
Articles