Marker selectors

Marker selector groups different types of markers and assigns them to a dataset.

These groups exist, because often there can be different types of points in the map - different store types, warehouses, ATMs etc., each of them represented by a different dataset.

Syntax

This is the marker selector that can be found in the Retail Solution Demo's Catchment Area Analysis and Customer Intelligence views.

This marker selector groups the company's own shops, and the partner shops.

Marker selector object syntax
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 { "name": "shops_marker_selector", "type": "markerSelector", "content": { "categories": [ { "dataset": "/rest/projects/$projectId/md/datasets?name=shops", "markers": [ { "marker": "/rest/projects/$projectId/md/markers?name=shops_marker", "visible": true }, { "marker": "/rest/projects/$projectId/md/markers?name=partners_marker", "visible": true } ] }, { "dataset": "/rest/projects/$projectId/md/datasets?name=competitors", "markers": [ { "marker": "/rest/projects/$projectId/md/markers?name=competitor_frankies_marker", "visible": false, "addOnExpand": true }, { "marker": "/rest/projects/$projectId/md/markers?name=competitor_da_marker", "visible": false, "addOnExpand": true }, { "marker": "/rest/projects/$projectId/md/markers?name=competitor_streetberries_marker", "visible": false, "addOnExpand": true }, { "marker": "/rest/projects/$projectId/md/markers?name=competitor_schelma_marker", "visible": false, "addOnExpand": true } ] } ] } }



Example of a dumped marker selector
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 { "url": "/rest/projects/yufqzxkbiecj7jot/md/markerSelectors/ompa8292o688a2iu", "dumpTime": "2018-01-31T15:07:37Z", "version": "1", "content": { "id": "ompa8292o688a2iu", "name": "shops_marker_selector", "type": "markerSelector", "content": { "categories": [ { "dataset": "/rest/projects/$projectId/md/datasets?name=shops", "markers": [ { "marker": "/rest/projects/$projectId/md/markers?name=shops_marker", "visible": true }, { "marker": "/rest/projects/$projectId/md/markers?name=partners_marker", "visible": true } ] }, { "dataset": "/rest/projects/$projectId/md/datasets?name=competitors", "markers": [ { "marker": "/rest/projects/$projectId/md/markers?name=competitor_frankies_marker", "visible": false, "addOnExpand": true }, { "marker": "/rest/projects/$projectId/md/markers?name=competitor_da_marker", "visible": false, "addOnExpand": true }, { "marker": "/rest/projects/$projectId/md/markers?name=competitor_streetberries_marker", "visible": false, "addOnExpand": true }, { "marker": "/rest/projects/$projectId/md/markers?name=competitor_schelma_marker", "visible": false, "addOnExpand": true } ] } ] }, "accessInfo": { "createdAt": "2017-10-05T08:27:09Z" }, "links": [ { "rel": "self", "href": "/rest/projects/yufqzxkbiecj7jot/md/markerSelectors/ompa8292o688a2iu" } ] } }

Additional syntax examples

Marker selectors can also be used in a view where no markers are present. This is a simple example of marker selector, which only takes care of granularity visibility, and filtering objects.

We set the hideGranularity property to false, because we want to see the granularity when we enter the view. However, it doesn't have to be like this in all cases. We've also set that granularity objects (areas, lines) and markers will be visible in the map, even after they're filtered out.

Example of a marker selector with no categories
1 2 3 4 5 6 7 8 9 10 11 { "name": "simple_marker_selector", "type": "markerSelector", "content": { "hideGranularity": false, "keepFiltered": { "granularity": true, "markers": true } } }

_

Another special use case marker selectors is with granularityCategories. This object can be used when setting up advanced lines visualization.

We have a dataset called roads, which contains 15 lines = roads. This dataset has (among others) these three properties: surface, road_class and traffic. We'll demonstrate the advanced line visualization on these properties.

Example of a marker selector with granularityCategories
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 { "name": "lines_selector", "type": "markerSelector", "content": { "granularityCategories": [ { "dataset": "/rest/projects/$projectId/md/datasets?name=roads", "splitPropertyName": "surface", "styleType": "color" }, { "dataset": "/rest/projects/$projectId/md/datasets?name=roads", "splitPropertyName": "road_class", "styleType": "pattern" }, { "dataset": "/rest/projects/$projectId/md/datasets?name=roads", "splitPropertyName": "traffic", "styleType": "weight" } ] } }

Each category is linked to the dataset, specified by the property name, and type of the styleType.

The dataset properties have then these displayOptions, which contain the values from the data (value property):

Example of a dataset with advanced displayOptions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 { "name": "roads_dwh", "type": "dataset", "title": "Roads", "properties": { "featureTitle": { "type": "property", "value": "id" } }, "ref": { "type": "dwh", "subtype": "geometryLine", "geometry": "roads-9gzct7", "visualizations": [ { "type": "line" } ], "table": "roads_1", "primaryKey": "id", "categorizable": true, "fullTextIndex": true, "properties": [ { "name": "id", "title": "id", "column": "id", "type": "string", "filterable": false }, { "name": "surface", "title": "surface", "column": "surface", "type": "string", "filterable": true, "displayOptions": { "valueOptions": [ { "value": "green", "color": "green" }, { "value": "lime", "color": "lime" }, { "value": "yellow", "color": "yellow" }, { "value": "orange", "color": "orange" }, { "value": "red", "color": "red" } ] } }, { "name": "road_class", "title": "road_class", "column": "road_class", "type": "string", "filterable": true, "displayOptions": { "valueOptions": [ { "value": "solid", "pattern": "solid" }, { "value": "longdash", "pattern": "longdash" }, { "value": "dash", "pattern": "dash" }, { "value": "dotdash", "pattern": "dotdash" }, { "value": "dot", "pattern": "dot" } ] } }, { "name": "traffic", "title": "traffic", "column": "traffic", "type": "string", "filterable": true, "displayOptions": { "valueOptions": [ { "value": "1", "weight": 1.0 }, { "value": "2", "weight": 2.0 }, { "value": "3", "weight": 3.0 }, { "value": "4", "weight": 4.0 }, { "value": "5", "weight": 5.0 } ] } }, { "name": "y_min", "title": "y_min", "column": "y_min", "type": "decimal(19,16)", "filterable": false }, { "name": "y_max", "title": "y_max", "column": "y_max", "type": "decimal(19,16)", "filterable": false }, { "name": "x_min", "title": "x_min", "column": "x_min", "type": "decimal(19,16)", "filterable": false }, { "name": "x_max", "title": "x_max", "column": "x_max", "type": "decimal(19,16)", "filterable": false } ] } }

And this is the outcome of the visualization. Also note that these 3 styles can be combined together.

Key description

content

Key

Type

Optionality

Description

Constraints

Key

Type

Optionality

Description

Constraints

categories

array

optional

array of marker categories

either categories or granularityCategories must be present

size => 1

granularityCategories

array

optional

array of granularity categories

either categories or granularityCategories must be present

size => 1

hideGranularity

boolean

optional

specifies if the granularity should be visible or not

[true, false]

keepFiltered

object

optional

specifies the "Keep filtered objects in the map" setting



showIndicatorValuesOnMap

boolean

optional

specifies if indicator value for each area/grid should be displayed

[true, false]

clusterMarkers

boolean

optional

specifies if marker clustering will be enabled or disabled

[true, false]

content.categories

Key

Type

Optionality

Description

Constraints

Key

Type

Optionality

Description

Constraints

dataset

string

required

URL link to a dataset object representing the markers

/rest/projects/$projectId/md/datasets?name={datasetName}

markers

array

required

an array of marker objects



linkedLayers

array

optional

an array of objects specifying layers linked to the marker category



There are two rules surrounding marker selector categories to note:

  • a dataset which has available data (e.g. your stores) is always displayed as the first category, instead of a dataset with no data (e.g. competitor stores)

  • a dataset which is selected as a marker selector category is not available to be visualized as a dot map

content.categories.markers

Key

Type

Optionality

Description

Constraints

Key

Type

Optionality

Description

Constraints

marker

string

required

URI link to a marker object representing marker in a category

/rest/projects/$projectId/md/markers?name={markerName}

visible

boolean

required

sets the default visibility of the marker

default = true

[true, false]

addOnExpand

boolean

optional

specifies if the marker should become visible after clicking on the category, when by default it is set to visible = false

[true, false]

content.categories.linkedLayers

The linkedLayers array contains layers that should be explicitly linked to markerSelector categories. They are represented by dwh datasets of geometryPolygon subtype, which are linked to their respective geometries defined by vt datasets.

The typcal use case is - the markers represent restaurants, and the linked layers are the restaurant's delivery zones.

Key

Type

Optionality

Description

Constraints

Key

Type

Optionality

Description

Constraints

dataset

string

required

URL link to a dataset object representing the linked layers

/rest/projects/$projectId/md/datasets?name={datasetName}

style

array

optional

specifies the style of the layer

[outline, outline_black, line_red_1, line_red_3, line_red_5]

visible

boolean

optional

sets the default visibility of the layer

[true, false]

content.granularityCategories.granularityCategory

Key

Type

Optionality

Description

Constraints

Key

Type

Optionality

Description

Constraints

dataset

string

required

URL link to a dataset object representing the linked granularities

/rest/projects/$projectId/md/datasets?name={datasetName}

splitPropertyName

string

required

dataset property, by which the marker will be filtered

{datasetProperty}

styleType

string

required

type of the visualization style

[color, pattern, weight]

content.keepFiltered

Key

Type

Optionality

Description

Constraints

Key

Type

Optionality

Description

Constraints

granularity

boolean

required

specifies if the filtered granularity objects (areas, lines...) should be visible when filtered

[true, false]

markers

boolean

required

specifies if the filtered markers should be visible when filtered

[true, false]

Visual representation

Marker selectors can be visualised as groups of markers. On this cutout, you can see 2 marker groups - orange and green, each represented by one marker selector.

You can manage the markers by clicking on the Visibility tool icon () next to the Infopanel.