Create a Polyline map

Custom lines can be drawn on a map using any number of points that are connected by a line. These can be used to draw lines that follow utility lines or roads but can also be used to customize multi-leg spider charts.

The examples below make use of a string of Lat / Long points. However, as of QM 2.6.1, polyline encoded format is supported as well. For more information on creating polyline encoded formated shapes, see here.

If you are using a polyline encoded format, you must add the following to the Feature Options box.

 

'
"isLine":"true"
'

Create a Polygons / Lines map

Add a 'Dimension' to the Polygon / Lines properties box of the QlikMaps Polygon / Lines object.

In the 'Boundary / Path' expression box format a string enclosed in single quotes in the following format:

'LINESTRING( <Start Longitude> <Start Latitude> , <Next Point Start Longitude> <Next Point End Latitude> )'

There can be as many points as necessary to create a line as long as each set of <Longitude Latitude> points are separated by a comma.

Below is a very simple example consisting of 4 points.

 

Configuring Polylines

Colors

By default, Polyline colors are randomized. The color can be changed using an expression in the Fill Color Expression box.

=red()

or

=if( sum( aggr( Receipts, SalesmanName)) > 2000000, Green(), Red())

 

Feature Options

By default, Polylines are solid. Additional modifications can be made to the line.

='
"opacity":"80",
"weight":"5",
"linecap":"butt",
"dashArray":"3,3",
"curved":"false",
"featurePinType":"arrow",
"featurePinLocation":"random"
'

This will format every line accordingly. An expression can be used to modify each line differently depending on the row it is a part of.

Feature Definition Values
Opacity Sets transparency 0-100
Weight Width of line in pixels any numeric
lineCap Format of line termination points butt | round | square
dashArray Line format The first number is the width of the dash in pixels, the second number is the space between the dashes in pixels
curved Forces the line to curve or be straight true forces the line to be curved. Anything other than true forces the line to be straight
featurePinType Allows pins to be added to the line arrow
featurePinLocation Location of the pin on the line start | center | end | random