Skip to content

Commit

Permalink
Document on the newly added mapHover configuration property.
Browse files Browse the repository at this point in the history
  • Loading branch information
fschmenger committed Feb 26, 2024
1 parent 334342f commit 8cb136f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/wegue-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This describes the Wegue application configuration, which is modelled as JSON do
| **mapCenter** | Initial center of the map in map projection | `"mapCenter": [0, 0]` |
| mapProjection | Configuration object for CRS / projection used for the map | see [mapProjection](wegue-configuration?id=mapprojection) |
| mapGeodataDragDop | Configuration object for geodata file drag/drop functionality on the map. Only by setting the config this function will be enabled. | see [mapGeodataDragDop](wegue-configuration?id=mapGeodataDragDop) |
| mapHover | Configuration object to customize the bevahior of hover tooltips on the map. | see [mapHover](wegue-configuration?id=mapHover)
| **modules** | Array of module configuration objects | See [modules](module-configuration) |
| **mapLayers** | Array of map layer configuration objects | See [mapLayers](map-layer-configuration) |
| overviewMap | Configuration object for the overview map. | See [overviewMap](wegue-configuration?id=overviewMap)
Expand Down Expand Up @@ -226,6 +227,29 @@ Below is an example for such a configuration object:
}
```
### mapHover
Optional configuration object to customize the behavior of hover tooltips on the map.
The following properties are supported:
| Property | Meaning | Example |
|--------------------|:---------:|---------|
| delay | Timespan in milliseconds, by which displaying the tooltip is deferred after the mouse pointer rests. Defaults to `150`. | `"delay": 150`
| hideOnMousemove | Hide the tooltip when the mouse cursor is moved. Defaults to `false`. | `"hideOnMousemove": false`
| hoverOverlay | ID of a custom map overlay to use as a default display when a feature of the layer is hovered. Declaration of the `hoverOverlay` property on a mapLayer level takes precedence. For more information on how to implement a map overlay see the [reusable components](reusable-components?id=map-overlay) section. Defaults to Wegue's default tooltip `wgu-hover-tooltip` | `"hoverOverlay": "my-custom-overlay"`
Example:
```json
"mapHover":
{
"delay": 150,
"hideOnMousemove": false,
"hoverOverlay": "my-custom-overlay"
}
```


### lang

Wegue comes with multi-language support and currently supplies 2 language packs for English (`en`) and German (`de`). Languages supported by the application can be configured via the `lang` property. Wegue will automatically detect the users preferred languages from the browser settings and choose the most appropriate match. If no languages are configured, Wegue will default to English.
Expand Down

0 comments on commit 8cb136f

Please sign in to comment.