fx - SIMPLE

Home navigation:   NPGeoMap Properties Dialog > Dynamic Marker & Lines > Simple Marker Presentation >

fx - SIMPLE

Zum deutschen Handbuch wechseln NPGeoMap

Version 2.50.84, 07.12.2017

SimpleMarker
Create several Simple Marker blocks for individual usage and presentation.

coordinates
Set coordinates for each Simple Marker block.

Darstellung
Set presentation, MouseOvers (Tooltips), PopUps and Sense visualizations in PopUps for each Simple Marker block.

click to expand

click to expand

 

The values for nearly all features may be entered as calculated formulas or variables.

For detailed information about notation in this dialogs go to chapter The fx‑editor.

SIMPLE MARKER SETTINGS

SETTING / VALUES

EXPLANATION

 

 

SimpleMarker

caption

text

custom name for the whole Simple Marker Layer (default is "Simple Marker")

Custom name for the Simple Marker layer.
This name appears in the Layerswitcher, the Legend and the Selection Menu. There's another feature "caption" in every Simple Marker Block below to rename each of them.
(All layers in the object can be renamed - read more about in the Expert Settings.)

marker

[

{SimpleMarker Block},

{SimpleMarker Block}

]

After "marker": one of the two default Simple Marker blocks begin.
The individual blocks are enclosed by curly brackets {} and separated by comma - see screenshot on the right. All blocks together are enclosed by square brackets [] (see array in chapter fx‑editor).

click to expand

click to expand

You can add several Simple Marker blocks by copy-paste and as well remove them again. Therefore several groups of points/Markers can be created. The individual blocks can be edited completely independently.

 

 

Set coordinates of Simple Markers for each Simple Marker block.

coordinates

coordinates

Simple Marker coordinates, as well as an ID, a Name and numeric values for "KPI", "Color%" and "Size%"

This feature is not only for setting the coordinates, but also for setting an ID, Name, KPI, Color% and Size% for a Simple Marker block.
These at least three (ID, Name and Coordinates) up to six (ID/Name/Coordinates/KPI/Color%/Size%) settings create a table in the background, just like the Dimensions of Dynamic Markers and Dynamic Maps. Therefore each row assigns individual values to each Simple Marker, which then may be applied dynamically - just like Dynamic Markers do. In contrast to them, the range of dynamic input of Simple Markers is reduced to these six specific fields.

000_warning The Sense formula Concat() with the qualifier DISTINCT always has to be used for dynamic entries. Aggregation functions like Sum() or Max() always have to be enclosed additionally by aggr().
Read more further below.
 

Classes:
"KPI", "Color%" and "Size%" expect numeric values.
The KPI setting provides a variable used in Labels, MouseOvers or PopUps.
"Color%" and "Size%" are the source for the Classes, which automatically generate dynamic colors/images or sizes for the Simple Markers. In this way sales, volumes, weighting and other KPIs may be displayed dynamically. Even synthetic Legends can be configured, by assigning "types".
For example all Simple Markers with the type-value "1" could be yellow and "2" blue - the former are "vendors group 1" and the others "vendors group 2" - both in the same Simple Marker block.
To do so enter the Class ID in the feature colorclass at the end of this dialog - the Classes themselves can be configured in the fx‑editor COLOR & SIZE CLASSES.

Performance:
Attention - more fields/columns mean longer loading times. Therefore you should only use and enter the fields you really need.
Further the order of the settings must be maintained - so the fields can only be skipped from right to left (at first "Size%", then "Color%" and so on). For example if "Color%" is needed, "KPI" has to be entered as well. The fields you don't need but can't skip may be just entered like ' ' (empty).

Coordinates Format:
Simple Markers have to be WGS 84 projection format - see details in chapter coordinates. To apply other projections have a look at the feature proj4definition in the Expert Settings.

Coordinates Notation:
First the y coordinate (Latitude), then the x coordinate (Longitude).
They have to be separated by comma and the decimal separator has to be a dot.

Example (one pair of coordinates): 48.458263, 13.463537

Notation of the whole feature:
All fields together have to be entered as follows:

ID%NAME%LATITUDE,LONGITUDE%KPI%COLOR%SIZE;

1.A unique ID for each record/Marker
(accessible via variable [#ID] in label, mouseover and popup)
 percentage sign 

2.Name - this field may contain any kind of information
(accessible via variable [#Name] in label, mouseover and popup)
 percentage sign 

3.Coordinates for each Simple Marker, first Latitude/y-value, then Longitude/x-value - internal separated by comma, a dot as decimal separator, several coordinates separated by semicolon:
LAT1,LON1;LAT2,LON2;
Latitude and Longitude may be already in one field of your data source or concatenated here.
(hint: order of LAT and LON is always alphabetical in NPGeoMap)
 percentage sign 

4.KPI (Key Performance Indicator, for example "Sales") - not only a variable but also the source for automatically generated colors/images and sizes of Circle Cluster and Hexagon Grid Clusters.
(accessible via variable [#KPI] in label, mouseover and popup)
 percentage sign 

5.Numeric values for automatically generating a color/image for each Simple Marker via Classes
 percentage sign 

6.Numeric values for automatically generating a color/image for each Simple Marker via Classes
 all concatenated by semicolon 

There must be no spaces between the entries and the decimal separator has to be a dot.

Several Markers (coordinates) have to be separated by semicolon (beware when loading the script):

ID%NAME%LATITUDE,LONGITUDE;ID%NAME%LATITUDE,LONGITUDE;ID%NAME%LATITUDE,LONGITUDE;

Example:
1%NewYork%40.740721,-74.015567;1%LosAngeles%34.114025,-118.272910;

The whole feature in the fx-Editor looks like that:

"coordinates": "5%Stuttgart%48.748895, 9.183613;6%Würzburg%49.809582, 9.952656;7%Leipzig%51.337428, 12.347675;8%Bremen%53.080781, 8.788105",

You can replace the components directly by the appropriate values (not the common way, only for a small number of coordinates) or by using Sense variables, formulas or fields.
000_warning The Sense formula Concat() with the qualifier DISTINCT always has to be used for dynamic entries. Aggregation functions like Sum() or Max() always have to be enclosed additionally by aggr().

Example: Concat(aggr(Sum(Sales),ID))

Separator has to be a semicolon.
Please note that Sense elements are handled as text in JSON, therefore the JSON string must be "interrupted" with single quotes ' ' and the "parts" connected with ampersand & (see details in chapter The fx‑editor):

Concat(DISTINCT ID&'%'&NAME&'%'&COORDINATES&'%'&KPI&'%'&COLOR%&'%'&SIZE%,';')

Example (including entries for KPI, Color% und Size%):

Concat(DISTINCT CustomerNo&'%'&CustomerName&'%'&CustomerCOO&'%'&aggr(Sum(Sales),ID)&'%'&aggr(Sum(Sales),ID)&'%'&aggr(Sum(Sales),ID),';')

The whole feature in the fx-Editor looks like that:

"coordinates": "' & Concat(DISTINCT ID&'%'&Name&'%'&Latitude&','&Longitude&'%'&aggr(Sum(Sales),ID)&'%'&aggr(Sum(Sales),ID)&'%'&aggr(Sum(Sales),ID),';')&'",

You can also just copy one of the two template lines above in the expression dialog.

To always display all available Simple Markers of the group, regardless of taken selections, use the Sense identifier {1} :

Concat( {1} DISTINCT ID&'%'&''&'%'&COORDINATES,';')

Example (only required entries):

Concat( {1} DISTINCT CustomerNo&'%'&''&'%'&CustomerCOO,';')

The whole feature in the fx-Editor looks like that:

"coordinates": "' & Concat({1}DISTINCT ID&'%'&Name&'%'&Coordinates,';')&'",

If additionally to using the identifier {1} the feature layer further below is set to "1", a Static Simple Map can be created.

More Tips:
You can also use coordinates in Encoded Polylines format - more information at developers.google.com.
Enabling this feature in the Expert Settings is a easy way to locate possibly faulty Marker coordinates.
For detailed information about notation in this dialogs go to chapter The fx‑editor.

caption

text

custom name for this Simple Marker block (default is "Simple Marker 1")

Custom name for this Simple Marker block.
This name appears in the Layerswitcher the Legend and the Selection Menu. There's another feature "caption" further above to rename the Simple Markers in general.
(All layers in the object can be renamed - read more about in the Expert Settings.)

 

 

Set presentation, MouseOvers (Tooltips), PopUps and Sense visualizations in PopUps for each Simple Marker block.

type

number

Simple Marker type, number from 0 to 2 and 7 (default is 2)

Set the Simple Marker type/shape in which Simple Markers are displayed:

0 = don't show Markers (and also don't calculate)

1 = don't show Markers, but the Labels

2 = circle (default)

7 = Heatpoint for Heatmaps

The feature image further down allows to display any image instead of a shape for Simple Markers.

Performance tip: Circles need the least loading time, therefore "2" is the fastest for big amounts of displayed Markers.

Type "0":
This feature may be useful to define a Sense variable and set a button in the application, so the user can switch on and off the Simple Markers of this block. With the Layerswitcher they can be hidden/unhidden as well - but in that way the data will be loaded anyway, therefore this is more a quick tool when working on the map. To increase performance in the app better actually disable the Markers with this feature, if you don't need them.

size

number

Simple Marker size (default is 8)

Simple Marker Size.
The unit depends on the setting of the feature Marker Units in the menu group Basic Settings. It can be pixel or meter (default is pixel).
When a Heatmap is created and the Simple Marker type above is set to 7, the size plays an important role.

Use Classes for automatic generated sizes.

image

file path

file path of the image displayed as Simple Marker

A Simple Marker can also be displayed as an image, instead of a circle - just fill in here the file path of the image you want to use. The Marker Type above has to be 2.
The image file has to be stored within the NPGeoMap Extension Directory in the sub folder "images" or below.

Example (file in folder "image"):

"image": "flag.png",

Example (file in sub folder "demo"):

"image": "demo/airplane.png",

There are two options to set the size of the Simple Marker Images:

oOutside this dialog in the menu area Marker Image Settings
- same size for all Images - offset/position can be configured

oor using the field Size% in the feature coordinates above
- automatically calculated sizes based on number values and steered by Classes - Images are always centered

A Class may also be used to display various images - more.
Tip: It's possible to use animated GIFs.

color

color

Simple Marker fill color (default is orange)

Simple Marker fill color.
Use Classes for automatic generated colors/images.

When setting colors you can use Hex-Codes, HTML color names or RGB
Example: color red = #FF0000 or red or RGB(255, 0, 0)
(Detailed information in chapter The fx‑editor)

bordercolor

color

Simple Marker border color (default is black)

Simple Marker border color.
If you don's set any value here, no border will be rendered.

When setting colors you can use Hex-Codes, HTML color names or RGB
Example: color red = #FF0000 or red or RGB(255, 0, 0)
(Detailed information in chapter The fx‑editor)

opacity

number

Simple Marker transparency in percent (default is 50)

Transparency of the fill color of Markers in percent:

0% - colors are covering
100% - completely transparent

label

content

Simple Marker label

Simple Marker labels are displayed below the Simple Markers, however you can additionally configure the offset and further settings for labels in the menu area Marker Label Settings outside this expression dialog. Basically labels contain only text, but you can use Sense variables and formulas or these NPGeoMap #Hashtag Variables provided in the feature coordinates above:

[#Name]

[#ID]

[#KPI]

Example:
"label": "[#Name]"

Labels can be edited with line breaks (using Chr(13)), but it is not possible to use HTML here.
See details about these variables in chapter The fx‑editor.

labelsize

number

Label size in pixels (default is 12)
 

Label size in pixels

labelcolor

color

Label font color (default is black)
 

Label font color
 
When setting colors you can use Hex-Codes, HTML color names or RGB
Example: color red = #FF0000 or red or RGB(255, 0, 0)
(Detailed information in chapter The fx‑editor)

mouseover

content

Simple Marker MouseOver content

MouseOver (Tooltip) for Simple Markers.
It appears next to the cursor, if it hovers on a Simple Marker.
This text may contain HTML, like for example a <br> tag to set a line break. Furthermore a delay and the duration time of MouseOvers can be configured in the Expert Settings.
Use Sense variables, fields and formulas for dynamic content
or these NPGeoMap #Hashtag Variables provided in the feature coordinates above:

[#Name]

[#ID]

[#KPI]
 

Example:

"mouseover": "Hello World",

"mouseover": "[#Name]",

Example with dynamic content (see sceenshot on the right):
"mouseover": "[#Name]<br>from [#ID]",

(See details about notation in chapter The fx‑editor).

 

000_warning Important: If you want to use local image files in HTML, you have to indicate the Sense image path - read details here.

000_pinTip: There's a CSS file "info.css" located in the NPGeoMap Extension directory (subfolder "css"), which can be customized to define the default presentation of PopUps, MouseOvers and SketchBoxes.
(If you configure this file make sure to save a backup, when installing an NPGeoMap update - the actual file will probably be replaced.)

More information about integrating Sense fields or formulas and further details on notation see chapter The fx‑editor.

click to expand

click to expand

popup

content

Simple Marker PopUp content

A PopUp is a kind of dialog or a small window, that opens or "pops up" if you click on an item (Marker, Polygons,...), for which a PopUp is defined. NPGeoMap can display text and dynamic content in a PopUp.
The whole PopUp content can be edited with HTML.
Use Sense variables, fields and formulas for dynamic content
or Use QlikView variables, fields and formulas for dynamic content
or these NPGeoMap #Hashtag Variables (the first three provided in the feature coordinates above):

[#Name]

[#ID]

[#KPI]
[#Latitude] (WGS84 Latitude coordinate)
[#Longitude] (WGS84 Longitude coordinate)
[#PRJ=EPSG:xxx] (converts the variables above by provided EPSG Code)

Example:

"popup": "Hello World",

"popup": "[#Name]",

Some nice Examples for the coordinates variables:

simple coordinates:
"popup": "[#Latitude] / [#Longitude]"

converted coordinates:
"popup": "[#Latitude] / [#Longitude] [#PRJ=EPSG:31252]"

integrating GoogleMaps Streetview:
"popup": "<iframe width=600 height=450 frameborder=0 style=border:0 src=https://www.google.com/maps/embed/v1/streetview?key=[yourGoogleMapsKey]&location=[#Latitude],[#Longitude]&heading=0&pitch=10&fov=35 allowfullscreen></iframe>"
 

Check it out!

(See details about notation in chapter fx‑editor).

 
Further below in the following feature qvchart you can also add any Sense object or chart in this PopUp. The content you add at this point will appear just above the Sense visualization.

000_warning Important: If you want to use local image files in HTML, you have to indicate the Sense image path - read details here.

000_pinTip: There's a CSS file "info.css" located in the NPGeoMap Extension directory (subfolder "css"), which can be customized to define the default presentation of PopUps, MouseOvers and SketchBoxes.
(If you configure this file make sure to save a backup, when installing an NPGeoMap update - the actual file will probably be replaced.)

If the feature "popupautoclose" is disabled in the Expert Settings, you may keep several PopUps open at the same time.

More information about integrating Sense fields or formulas and further details on notation see chapter The fx‑editor.

qvchart

Sense object ID

Sense object ID

Feature for displaying any Sense visualizations in the PopUp, instead of a NPGeoMap Chart. Just fill in the Sense object ID of the visualization you want to use. See here a description in the Sense Manual how to get the object ID: help.qlik.com/obtain-app-object-id
Basically all kinds of Sense objects can be used, however this feature is optimized for displaying Sense Charts. The only requirement is to keep the Sense object in the same app.
By using the PopUp Variables in the Expert Settings the Sense visualization can be restricted to the values of the variables, like for example the current selections.
The size of the qvchart is defined by the two features below "width" and "height".

click to expand

click to expand

chartwidth

number

qvchart width (default is 350)

Width for displaying Sense visualizations in a PopUp.

chartheight

number

qvchart height (default is 200)

Height for displaying Sense visualizations in a PopUp.

layer

1

static layer

2

dynamic layer (default)

Type of layer for this Simple Marker block:

1 = static layer
Simple Markers are in the background - no selections, PopUps or MouseOvers.

2 = dynamic layer
Simple Markers are in the foreground - selections are possible by the use of the dynamic dimension of the ID in the coordinates above, as well as PopUps and MouseOvers.

selection

number

type of selection (default is 2)

Type of selection for this Simple Marker block:

-1 = OFF, no selection possible
1 = ON, selection by the use of values from a Sense field (set in feature below)
2 = ON, selection by the use of the Marker dimension set in the properties tab "Dynamic Marker & Lines" - "Marker Dimension"

Enabled selections also work with active Cluster.

listbox

sense fieldname

Sense fieldname used with selection type 1

If the feature selection above is set to 1, fill in here the fieldname of the concerning Sense field containing the selection values.

colorclass

class name/ID

Class for automatically generated colors/images for Simple Markers of this block (default is "EVEN_GRADIENT_COLOR")

Name (ID) of the Class for automatically generated colors/images for the Simple Markers of this block, configured in the expression fx - COLOR & SIZE CLASSES.
Default options:

EVEN_GRADIENT_COLOR

EVEN_RANGE_COLOR

FIXED_RANGE_COLOR

QUANTILE_RANGE_COLOR

Source for calculating the Classes is the field/entry "Color%" in the feature coordinates at the beginning of each Simple Marker block.
Read more about Classes here.

sizeclass

class name/ID

Class for automatically generated sizes for Simple Markers of this block (default is "EVEN_GRADIENT_COLOR")

Name (ID) of the Class for automatically generated sizes for the Simple Markers of this block, configured in the expression fx - COLOR & SIZE CLASSES.
Default options:

EVEN_GRADIENT_SIZE

EVEN_RANGE_SIZE

FIXED_RANGE_SIZE

QUANTILE_RANGE_SIZE

Source for calculating the Classes is the field/entry "Size%" in the feature coordinates at the beginning of each Simple Marker block.
Read more about Classes here.