Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/developer-guide/working-on-maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ For configuring the geocode URL and setting up a self-hosted Nominatim instance,

The `<or-map>` 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 <!-- should be lit or js-templates if it existed/worked -->
<or-map id="map" class="or-map"
showGeoCodingControl
@or-map-geocoder-change="${(ev: OrMapGeocoderChangeEvent) => {
Expand All @@ -80,7 +80,7 @@ The `<or-map>` web component has a `showGeoCodingControl` boolean property (defa

To enable geocoding in your own component:

```html
```javascript <!-- should be lit or js-templates if it existed/worked -->
<or-map
.showGeoCodingControl="${true}"
@or-map-geocoder-change="${(ev) => {
Expand Down
134 changes: 133 additions & 1 deletion docs/user-guide/manager-ui/appearance.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,70 @@ By default Superusers (e.g. the 'admin' user of the master realm) will see these
]
}
}
}
},
"clustering": {
"cluster": true,
"clusterRadius": 180,
"clusterMaxZoom": 17
},
"filters": [
{
"realms": ["manufacturer"],
"query": { "types": ["SoilSensorAsset"] }
},
{
"label": "CO2 > 100",
"realms": [
"smartcity"
],
"query": {
"types": [
"EnvironmentSensorAsset"
],
"attributes": {
"items": [
{
"name": {
"predicateType": "number",
"value": "ozoneLevel"
},
"value": {
"predicateType": "number",
"value": 100,
"operator": "GREATER_THAN"
}
}
]
}
}
},
{
"label": "Irrigation water flow > 10",
"realms": [
"manufacturer"
],
"query": {
"types": [
"IrrigationAsset"
],
"attributes": {
"items": [
{
"name": {
"predicateType": "number",
"value": "flowWater"
},
"value": {
"predicateType": "number",
"value": 10,
"operator": "GREATER_THAN"
}
}
]
}
}
}
]
},
"rules": {
"rules": {
Expand Down Expand Up @@ -544,6 +607,75 @@ 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.
Comment thread
Ekhorn marked this conversation as resolved.
```json
{
"pages": {
"map": {
"filters": [
{
"realms": ["manufacturer"],
"query": { "types": ["SoilSensorAsset"] }
},
{
"label": "CO2 > 100",
"realms": [
"smartcity"
],
"query": {
"types": [
"EnvironmentSensorAsset"
],
"attributes": {
"items": [
{
"name": {
"predicateType": "number",
"value": "ozoneLevel"
},
"value": {
"predicateType": "number",
"value": 100,
"operator": "GREATER_THAN"
}
}
]
}
}
},
{
"label": "Irrigation water flow > 10",
"realms": [
"manufacturer"
],
"query": {
"types": [
"IrrigationAsset"
],
"attributes": {
"items": [
{
"name": {
"predicateType": "number",
"value": "flowWater"
},
"value": {
"predicateType": "number",
"value": 10,
"operator": "GREATER_THAN"
}
}
]
}
}
}
]
}
}
}
```

## Map Settings

If you want to adjust the map styling. You can change the map under Map Settings. Here you have the following options:
Expand Down