From d6e8de25e362c1fbc4d1fc9e5ff760f630456f6f Mon Sep 17 00:00:00 2001 From: Ekhorn Date: Tue, 23 Jun 2026 17:51:09 +0200 Subject: [PATCH 1/3] Document map preset filters --- docs/user-guide/manager-ui/appearance.md | 105 ++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/docs/user-guide/manager-ui/appearance.md b/docs/user-guide/manager-ui/appearance.md index 137fd79..5b90d5e 100644 --- a/docs/user-guide/manager-ui/appearance.md +++ b/docs/user-guide/manager-ui/appearance.md @@ -52,7 +52,67 @@ By default Superusers (e.g. the 'admin' user of the master realm) will see these ] } } - } + }, + "clustering": { + "cluster": true, + "clusterRadius": 180, + "clusterMaxZoom": 17 + }, + "filters": [ + { + "query": { + "types": [ + "SoilSensorAsset" + ] + } + }, + { + "query": { + "types": [ + "HarvestRobotAsset" + ], + "attributes": { + "items": [ + { + "name": { + "predicateType": "string", + "value": "vegetableType" + }, + "value": { + "predicateType": "string", + "value": "TOMATO" + } + } + ] + } + } + }, + { + "label": "Robot & Irrigation errors", + "query": { + "types": [ + "HarvestRobotAsset", + "IrrigationAsset" + ], + "attributes": { + "items": [ + { + "name": { + "predicateType": "string", + "value": "notes" + }, + "value": { + "predicateType": "string", + "value": "error", + "match": "CONTAINS", + "caseSensitive": false + } + } + ] + } + } + } + ] }, "rules": { "rules": { @@ -544,6 +604,49 @@ This configures what asset types are shown as markers on the map. The legend is } ``` +**Map - Preset filters:** +This configures map preset filters, which add a dropdown on the map page to quickly filter the visible assets by type, attribute values, realm, and more using an `AssetQuery`. A live matching-asset count badge is shown per filter option. Options without a `label` will have an auto-derived label based on the type names and attribute values. Selected filters are persisted across page reloads (per user and realm) and reset on each new login session. You can also specify an optional `default` boolean or an array of `realms` to limit where the filter applies. Note that unsupported query fields like `orderBy`, `limit`, and `offset` will result in a warning. +```json +{ + "pages": { + "map": { + "filters": [ + { + "query": { "types": ["SoilSensorAsset"] } + }, + { + "query": { + "types": ["HarvestRobotAsset"], + "attributes": { + "items": [ + { + "name": { "predicateType": "string", "value": "vegetableType" }, + "value": { "predicateType": "string", "value": "TOMATO" } + } + ] + } + } + }, + { + "label": "Robot & Irrigation errors", + "query": { + "types": ["HarvestRobotAsset", "IrrigationAsset"], + "attributes": { + "items": [ + { + "name": { "predicateType": "string", "value": "notes" }, + "value": { "predicateType": "string", "value": "error", "match": "CONTAINS", "caseSensitive": false } + } + ] + } + } + } + ] + } + } +} +``` + ## Map Settings If you want to adjust the map styling. You can change the map under Map Settings. Here you have the following options: From 8c920176b89690ef86b945874a867a02f179311b Mon Sep 17 00:00:00 2001 From: Ekhorn Date: Tue, 23 Jun 2026 17:53:50 +0200 Subject: [PATCH 2/3] Improve language used for geocoding code blocks --- docs/developer-guide/working-on-maps.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/developer-guide/working-on-maps.md b/docs/developer-guide/working-on-maps.md index 3cae539..4bf64ff 100644 --- a/docs/developer-guide/working-on-maps.md +++ b/docs/developer-guide/working-on-maps.md @@ -69,7 +69,7 @@ For configuring the geocode URL and setting up a self-hosted Nominatim instance, The `` web component has a `showGeoCodingControl` boolean property (default: `false`) that controls whether the geocoding search box is rendered. In the Manager app (`ui/app/manager/src/pages/page-map.ts`), geocoding is enabled by default: -```html +```javascript 100", + "realms": [ + "smartcity" + ], "query": { "types": [ - "HarvestRobotAsset" + "EnvironmentSensorAsset" ], "attributes": { "items": [ { "name": { - "predicateType": "string", - "value": "vegetableType" + "predicateType": "number", + "value": "ozoneLevel" }, "value": { - "predicateType": "string", - "value": "TOMATO" + "predicateType": "number", + "value": 100, + "operator": "GREATER_THAN" } } ] @@ -88,24 +90,25 @@ By default Superusers (e.g. the 'admin' user of the master realm) will see these } }, { - "label": "Robot & Irrigation errors", + "label": "Irrigation water flow > 10", + "realms": [ + "manufacturer" + ], "query": { "types": [ - "HarvestRobotAsset", "IrrigationAsset" ], "attributes": { "items": [ { "name": { - "predicateType": "string", - "value": "notes" + "predicateType": "number", + "value": "flowWater" }, "value": { - "predicateType": "string", - "value": "error", - "match": "CONTAINS", - "caseSensitive": false + "predicateType": "number", + "value": 10, + "operator": "GREATER_THAN" } } ] @@ -612,30 +615,56 @@ This configures map preset filters, which add a dropdown on the map page to quic "map": { "filters": [ { + "realms": ["manufacturer"], "query": { "types": ["SoilSensorAsset"] } }, { + "label": "CO2 > 100", + "realms": [ + "smartcity" + ], "query": { - "types": ["HarvestRobotAsset"], + "types": [ + "EnvironmentSensorAsset" + ], "attributes": { "items": [ { - "name": { "predicateType": "string", "value": "vegetableType" }, - "value": { "predicateType": "string", "value": "TOMATO" } + "name": { + "predicateType": "number", + "value": "ozoneLevel" + }, + "value": { + "predicateType": "number", + "value": 100, + "operator": "GREATER_THAN" + } } ] } } }, { - "label": "Robot & Irrigation errors", + "label": "Irrigation water flow > 10", + "realms": [ + "manufacturer" + ], "query": { - "types": ["HarvestRobotAsset", "IrrigationAsset"], + "types": [ + "IrrigationAsset" + ], "attributes": { "items": [ { - "name": { "predicateType": "string", "value": "notes" }, - "value": { "predicateType": "string", "value": "error", "match": "CONTAINS", "caseSensitive": false } + "name": { + "predicateType": "number", + "value": "flowWater" + }, + "value": { + "predicateType": "number", + "value": 10, + "operator": "GREATER_THAN" + } } ] }