Skip to content

Commit f19fa5c

Browse files
committed
Document measurementPrecision and crs precision
1 parent 6e22646 commit f19fa5c

File tree

2 files changed

+57
-39
lines changed

2 files changed

+57
-39
lines changed

src/configuration/ViewerConfiguration.md

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,33 @@ All settings are optional, with fallback to the default values as documented.
2525

2626
| Setting | Description |
2727
|-------------------------------------|-------------|
28-
|`allowFractionalZoom` | Whether to allow arbitrary scales for viewing the map. Default value: `false`. |
29-
|`assetsPath` | Relative path to the `assets` folder. Default value: `assets`. |
30-
|`defaultColorScheme` | The color scheme to use. See [Color schemes](#color-schemes) for details. |
31-
|`defaultFeatureStyle` | The default style to use for selection geometries and other unstyled features. Default value: see `qwc2/utils/FeatureStyles.js`. |
32-
|`defaultInteractionStyle` | The default style to use on geometries to measure, snap or edit. Default value: see `qwc2/utils/FeatureStyles.js`. |
33-
|`defaultMarkerStyle` | The default style to use as marker icon. Default value: see `qwc2/utils/FeatureStyles.js`. |
34-
|`editingAddLinkAnchors` | Whether to automatically insert link anchors in text values when editing. |
28+
|`allowFractionalZoom` | Whether to allow arbitrary scales for viewing the map. Default: `false`. |
29+
|`assetsPath` | Relative path to the `assets` folder. Default: `"assets"`. |
30+
|`defaultColorScheme` | The color scheme to use. See [Color schemes](#color-schemes) for details. Default: `"default"`. |
31+
|`defaultFeatureStyle` | The default style to use for selection geometries and other unstyled features. Default: see [`qwc2/utils/FeatureStyles.js`](https://raw.githubusercontent.com/qgis/qwc2/refs/heads/master/utils/FeatureStyles.js). |
32+
|`defaultInteractionStyle` | The default style to use on geometries to measure, snap or edit. Default: see [`qwc2/utils/FeatureStyles.js`](https://raw.githubusercontent.com/qgis/qwc2/refs/heads/master/utils/FeatureStyles.js). |
33+
|`defaultMarkerStyle` | The default style to use as marker icon. Default: see [`qwc2/utils/FeatureStyles.js`](https://raw.githubusercontent.com/qgis/qwc2/refs/heads/master/utils/FeatureStyles.js). |
34+
|`editingAddLinkAnchors` | Whether to automatically insert link anchors in text values when editing. Default: `true`, |
3535
|`editServiceCaptchaSiteKey` | ReCAPTCHA public site key for public editing, see [ReCAPTCHA validation](../Topics/Editing.md#recaptcha). |
36-
|`editTextNullValue` | A text value which represents `NULL` when editing. |
37-
|`geodesicMeasurements` | Whether to perform measurements on the geoid. |
38-
|`loadTranslationOverrides` | Whether to attempt to load tanslation overrides, see [translations](#translations). Default value: `false`. |
39-
|`localeAwareNumbers` | Whether to use locale aware numbers throughout. Default value: `false`. |
40-
|`omitUrlParameterUpdates` | Whether to omit updating the URL parameters. Default value: `false`. |
41-
|`projections` | A list of map projections to register, in the format `{"code": "<code>", "proj": "<proj4def>", "label": "<label>"}`. By default, `EPSG:3857` and `EPSG:4326` are registered. |
42-
|`qgisServerVersion` | The QGIS Server major version in use, defaults to `3`.|
36+
|`editTextNullValue` | A text value which represents `NULL` when editing. Default: `""`. |
37+
|`geodesicMeasurements` | Whether to perform measurements on the geoid. Default: `false`. |
38+
|`loadTranslationOverrides` | Whether to attempt to load tanslation overrides, see [translations](#translations). Default: `false`. |
39+
|`localeAwareNumbers` | Whether to use locale aware numbers throughout. Default: `false`. |
40+
|`measurementPrecision` | Number of decimal digits to display in measurements. Default: `2`. |
41+
|`omitUrlParameterUpdates` | Whether to omit updating the URL parameters. Default: `false`. |
42+
|`projections` | A list of map projections to register, in the format `{"code": "<code>", "proj": "<proj4def>", "label": "<label>", "precision": <decimals>}`. By default, `EPSG:3857` and `EPSG:4326` are registered. |
43+
|`qgisServerVersion` | The QGIS Server major version in use. Default: `3`. |
4344
|`startupTask` | Task to automatically activate on application start, in the format `{key: "<Task>", "mode": "<Mode>"}`. |
44-
|`storeAllLayersInPermalink` | Whether to store the full layertree in the permalink data, rather than only local (i.e. redlining) layers. If `false`, remote layers are re-queried from the respective services, if `true`, they are statically reloaded (meaning restored layers may be outdated compared to current service capabilities).
45-
|`translationsPath` | Relative path to the `translations` folder. Default value: `translations`. |
46-
|`trustWmsCapabilityURLs` | Whether to trust the GetMap etc. URLs reported in WMS service capabilities. If not `true`, the protocol, host and pathname portion of the URLs are inherited from the called capabilities URL. |
47-
|`urlPositionCrs` | The CRS used to encode the current map extent coordinates in the URL. Default value: the map projection. |
48-
|`urlPositionFormat` | How to encode the current map extent in the URL, either `centerAndZoom` or `extent`. See [URL parameters](../topics/Interfacing.md#url-parameters) for details. Default value: `extent`. |
49-
|`urlRegEx` | A [JSON-escaped](https://www.freeformatter.com/json-escape.html) regular expression used to match URLs in feature attribute values. Default: see `qwc2/utils/MiscUtils.js`. |
50-
|`wmsHidpi` | Whether to honour the device pixel ratio for WMS GetMap requests. Default value: `true`. |
51-
|`wmsMaxGetUrlLength` | URL length limit before switching to a POST request for GetMap and GetFeatureInfo. Default: 2048. |
52-
|`wmsWktPrecision` | Precision (as number of decimals) of WKT geometries passed in WMS requests. Default: 4. |
45+
|`storeAllLayersInPermalink` | Whether to store the full layertree in the permalink data, rather than only local (i.e. redlining) layers. If `false`, remote layers are re-queried from the respective services, if `true`, they are statically reloaded (meaning restored layers may be outdated compared to current service capabilities). Default: `false`. |
46+
|`tilePreloadLevels` | For tiled layers, load low-resolution tiles up to preload levels. 0 means no preloading. Default: `0`. |
47+
|`translationsPath` | Relative path to the `translations` folder. Default: `"translations"`. |
48+
|`trustWmsCapabilityURLs` | Whether to trust the GetMap etc. URLs reported in WMS service capabilities. If not `true`, the protocol, host and pathname portion of the URLs are inherited from the called capabilities URL. Default: `false`. |
49+
|`urlPositionCrs` | The CRS used to encode the current map extent coordinates in the URL. Default: the current map projection. |
50+
|`urlPositionFormat` | How to encode the current map extent in the URL, either `"centerAndZoom"` or `"extent"`. See [URL parameters](../topics/Interfacing.md#url-parameters) for details. Default: `"extent"`. |
51+
|`urlRegEx` | A [JSON-escaped](https://www.freeformatter.com/json-escape.html) regular expression used to match URLs in feature attribute values. Default: see [`qwc2/utils/MiscUtils.js`](https://raw.githubusercontent.com/qgis/qwc2/refs/heads/master/utils/MiscUtils.js). |
52+
|`wmsHidpi` | Whether to honour the device pixel ratio for WMS GetMap requests. Default: `true`. |
53+
|`wmsMaxGetUrlLength` | URL length limit before switching to a POST request for GetMap and GetFeatureInfo. Default: `2048`. |
54+
|`wmsWktPrecision` | Precision (as number of decimals) of WKT geometries passed in WMS requests. Default: `4`. |
5355

5456
### Global settings, overridable per theme<a name="theme-overridable-settings"></a>
5557

@@ -58,24 +60,24 @@ All settings are optional, with fallback to the default values as documented.
5860

5961
| Setting | Description |
6062
|--------------------------------------|-------------|
61-
|`allowAddingOtherThemes` | Whether to allow adding another theme to a currently loaded theme. Default value: `false`. |
62-
|`allowLayerTreeSeparators` | Allows users to add separator items in a flat layer tree. Default value: `false`. |
63-
|`allowRemovingThemeLayers` | Whether to allow removing any theme layers from the layer tree. Default value: `false`. |
64-
|`allowReorderingLayers` | Whether to allow re-ordering layers in the layer tree. Default value: `false`. |
65-
|`disableImportingLocalLayers` | Whether to hide the option to import local layers from the layer tree. Default value: `false`. |
66-
|`flattenLayerTreeGroups` | Whether to display a flat layer tree, omitting the groups. Default value: `false`. |
67-
|`globallyDisableDockableDialogs` | Whether to globally disable the dockable feature of popup dialogs. Default value: `false`. |
68-
|`globallyDisableMaximizeableDialogs` | Whether to globally disable the maximizeable feature of popup dialogs. Default value: `false`. |
69-
|`identifyTool` | The name of the identify plugin to use as default identify tool. If set to an empty string, no identify tool will be active by default. Default value: `Identify`. |
63+
|`allowAddingOtherThemes` | Whether to allow adding another theme to a currently loaded theme. Default: `false`. |
64+
|`allowLayerTreeSeparators` | Allows users to add separator items in a flat layer tree. Default: `false`. |
65+
|`allowRemovingThemeLayers` | Whether to allow removing any theme layers from the layer tree. Default: `false`. |
66+
|`allowReorderingLayers` | Whether to allow re-ordering layers in the layer tree. Default: `false`. |
67+
|`disableImportingLocalLayers` | Whether to hide the option to import local layers from the layer tree. Default: `false`. |
68+
|`flattenLayerTreeGroups` | Whether to display a flat layer tree, omitting the groups. Default: `false`. |
69+
|`globallyDisableDockableDialogs` | Whether to globally disable the dockable feature of popup dialogs. Default: `false`. |
70+
|`globallyDisableMaximizeableDialogs` | Whether to globally disable the maximizeable feature of popup dialogs. Default: `false`. |
71+
|`identifyTool` | The name of the identify plugin to use as default identify tool. If set to an empty string, no identify tool will be active by default. Default: `"Identify"`. |
7072
|`importLayerUrlPresets` | A list of predefined URLs from which the user can choose when importing layers from the layer tree. Entries must be strings or objects of the format `{"label": "<Label>", "value": "<URL>"}`. |
71-
|`preserveBackgroundOnThemeSwitch` | Whether to preserve the current background layer when switching theme, if possible. Default value: `false`. |
72-
|`preserveExtentOnThemeSwitch` | Whether to preserve the current map extent when switching theme, if possible (see below). Default value: `false`. |
73-
|`preserveNonThemeLayersOnThemeSwitch` | Whether to preserve non-theme layers when switching theme. Default value: `false`. |
74-
|`preventSplittingGroupsWhenReordering`| Whether to prevent splitting sibling groups or the group itself when reordering items. Default value: `false`. |
73+
|`preserveBackgroundOnThemeSwitch` | Whether to preserve the current background layer when switching theme, if possible. Default: `false`. |
74+
|`preserveExtentOnThemeSwitch` | Whether to preserve the current map extent when switching theme, if possible (see below). Default: `false`. |
75+
|`preserveNonThemeLayersOnThemeSwitch` | Whether to preserve non-theme layers when switching theme. Default: `false`. |
76+
|`preventSplittingGroupsWhenReordering`| Whether to prevent splitting sibling groups or the group itself when reordering items. Default: `false`. |
7577
|`searchFilterRegions` | List of predefined search filter regions, see [Search filtering](../topics/Search.md#filtering). |
76-
|`searchThemeLayers` | Whether to allow searching for theme layers from the global search field. Default value: `false`. |
77-
|`searchThemes` | Whether to allow searching for themes from the global search field. Default value: `false`. |
78-
|`startupTask` | Task to automatically start when switching to the theme, in the format `{key: "<Task>", "mode": "<Mode>"}`. Takes precedence over the global `startupTask`. Note that the task whenever switching to the theme, not only on application start. |
78+
|`searchThemeLayers` | Whether to allow searching for theme layers from the global search field. Default: `false`. |
79+
|`searchThemes` | Whether to allow searching for themes from the global search field. Default: `false`. |
80+
|`startupTask` | Task to automatically start when switching to the theme, in the format `{key: "<Task>", "mode": "<Mode>"}`. Takes precedence over the global `startupTask`. Note that the task is activated whenever switching to the theme, not only on application start. |
7981

8082
Note:
8183

src/release_notes/QWC2UpgradeNotes.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ This document describes incompatibilites and other aspects which QWC2 applicatio
44

55
When updating the `qwc2` submodule, run `yarn install` to ensure the dependencies are up to date!
66

7+
Update to qwc2 submodule revision [](https://github.com/qgis/qwc2/tree/) (11.12.2024)
8+
---------------------------------------------------------------------------------------------------
9+
10+
**CRS precision**
11+
12+
You can now globally specify the desired ordinate display precision (number of decimals) for a CRS in `config.json` &to; `precision`, i.e.:
13+
14+
{
15+
"code": "EPSG:2056",
16+
"proj": "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs",
17+
"label": "CH1903+ / LV95",
18+
"precision": 2
19+
}
20+
21+
Consequently, the `cooPrecision` and `degreeCooPrecision` config props of the `MapInfoToolTip` plugin have been removed.
22+
723
Update to qwc2 submodule revision [e39dbde](https://github.com/qgis/qwc2/tree/e39dbde) (26.11.2024)
824
---------------------------------------------------------------------------------------------------
925

0 commit comments

Comments
 (0)